CLI Reference
Complete reference for all EMB commands.
Global Options
Section titled “Global Options”These options are available for all commands:
| Option | Env Var | Description |
|---|---|---|
-C, --root <path> | EMB_ROOT | Run as if emb was started in <path> |
--verbose / --no-verbose | EMB_VERBOSE | Enable verbose output |
--flavor <name> | EMB_FLAVOR | Use a specific flavor configuration |
--json | — | Format output as JSON |
--help | — | Show help for command |
Environment Variables
Section titled “Environment Variables”Any flag with an env-var fallback is resolved in the following order (first non-empty value wins):
- The CLI flag, if provided
- The environment variable
- The command’s built-in default
This lets you set defaults in your shell (or CI pipeline) and still override them on individual invocations:
export EMB_FLAVOR=productionexport EMB_VERBOSE=1
emb resources build # uses the production flavor, verboseemb resources build --flavor staging # flag overrides EMB_FLAVORemb resources build --no-verbose # flag overrides EMB_VERBOSEFor Kubernetes commands, the namespace also honors the K8S_NAMESPACE environment variable — see Kubernetes Integration.
Core Commands
Section titled “Core Commands”emb up
Section titled “emb up”Start the project services.
emb up [SERVICE...] [OPTIONS]Arguments:
SERVICE...- Optional services to start (defaults to all)
Options:
-f, --force- Force recreation of containers--flavor <name>- Use a specific flavor
Examples:
emb up # Start all servicesemb up api web # Start specific servicesemb up --flavor production # Start with production configemb up -f # Force recreate containersemb down
Section titled “emb down”Stop all project services.
emb downemb restart
Section titled “emb restart”Restart project services.
emb restart [SERVICE...]emb ps
Section titled “emb ps”List running containers.
emb psemb logs
Section titled “emb logs”View container logs.
emb logs [SERVICE...] [OPTIONS]Arguments:
SERVICE...- Optional services to show logs for (defaults to all)
Options:
-f, --follow / --no-follow- Follow log output (default: true)
Examples:
emb logs # Follow logs for all containersemb logs api # Follow API logsemb logs api web # Follow logs for multiple servicesemb logs --no-follow api # Get log snapshot without followingemb shell
Section titled “emb shell”Get a shell in a running container.
emb shell <SERVICE>emb clean
Section titled “emb clean”Clean project build artifacts and caches.
emb cleanBuild Commands
Section titled “Build Commands”emb resources build
Section titled “emb resources build”Build project resources (images, files).
emb resources build [RESOURCE...] [OPTIONS]Arguments:
RESOURCE...- Optional resources to build (defaults to all)
Options:
-f, --force- Force rebuild, bypass cache--dry-run- Show what would be built without building--publishable- Only build resources marked as publishable (and their dependencies)--flavor <name>- Use a specific flavor
Examples:
emb resources build # Build allemb resources build api:image # Build specific resourceemb resources build -f # Force rebuild allemb resources build --flavor production # Build for productionemb resources build --publishable # Build only publishable resourcesemb resources publish
Section titled “emb resources publish”Publish resources to their registries (e.g., push Docker images).
emb resources publish [RESOURCE...] [OPTIONS]Arguments:
RESOURCE...- Optional resources to publish (defaults to all publishable)
Options:
--dry-run- Show what would be published without publishing--flavor <name>- Use a specific flavor
Only resources with publish: true in their configuration are published. The registry and tag can be configured via defaults.docker.publish or per-resource params.publish.
Examples:
emb resources publish # Publish all publishable resourcesemb resources publish api:image # Publish specific resourceemb resources publish --dry-run # Preview without pushingemb resources publish --flavor production # Publish with production configList Commands
Section titled “List Commands”emb components
Section titled “emb components”List discovered components.
emb components [OPTIONS]Example output:
NAME IMAGE_NAME TAG CONTAINER api myapp/api latest web myapp/web latestemb resources
Section titled “emb resources”List all resources.
emb resources [OPTIONS]Options:
--publishable- Only show resources marked as publishable
Example output:
ID NAME TYPE PUBLISHABLE REFERENCE api:image image docker/image ✓ myapp/api:latest web:image image docker/image ✓ myapp/web:latestemb tasks
Section titled “emb tasks”List available tasks.
emb tasks [OPTIONS]Example output:
NAME COMPONENT DESCRIPTION ID test api Run API tests api:test build web Build frontend web:buildemb images
Section titled “emb images”List Docker images for the project.
emb images [OPTIONS]emb containers
Section titled “emb containers”List Docker containers for the project.
emb containers [OPTIONS]Task Commands
Section titled “Task Commands”emb run
Section titled “emb run”Run one or more tasks.
emb run <TASK...> [OPTIONS]Arguments:
TASK...- Task IDs or names to run
Options:
-x, --executor <type>- Force executor:local,container, orkubernetes-a, --all-matching- Run all tasks matching name
Examples:
emb run test # Run task by nameemb run api:test # Run specific component taskemb run test --all-matching # Run all 'test' tasksemb run deploy -x local # Force local executionemb run migrate -x kubernetes # Run on Kubernetes podConfiguration Commands
Section titled “Configuration Commands”emb config print
Section titled “emb config print”Print the resolved configuration.
emb config print [OPTIONS]Useful for debugging configuration issues.
Examples:
emb config print # Print full configemb config print --flavor production # Print production configUtility Commands
Section titled “Utility Commands”emb autocomplete
Section titled “emb autocomplete”Set up shell autocompletion.
emb autocomplete [SHELL]Supported shells: bash, zsh, fish
emb update
Section titled “emb update”Update EMB to the latest version.
emb updateemb help
Section titled “emb help”Show help for a command.
emb help [COMMAND]Command Topics
Section titled “Command Topics”Some commands are grouped into topics with subcommands:
components
Section titled “components”emb components # List componentsemb components logs # View service logs (alias: emb logs)emb components shell # Get shell in service (alias: emb shell)resources
Section titled “resources”emb resources # List resourcesemb resources build # Build resourcesemb resources publish # Publish resources to registriesemb tasks # List tasksimages
Section titled “images”emb images # List imagesemb images delete # Delete imagesemb images prune # Prune unused imagescontainers
Section titled “containers”emb containers # List containersemb containers delete # Delete containersemb containers prune # Prune stopped containersconfig
Section titled “config”emb config print # Print configurationsecrets
Section titled “secrets”EMB discovers secret references (${vault:...}, ${op:...}) across .emb.yml and all component Embfiles.
emb secrets # List secret references in configurationemb secrets validate # Validate that secrets can be resolvedemb secrets providers # Show configured secret providersCommon flags:
--flavor <name>- Evaluate against a specific flavor--json- Machine-readable output
emb secrets
Section titled “emb secrets”Lists every secret reference found in the config (aggregated by provider + path + key), along with usage count and the component(s) that reference it. Values are never fetched or displayed.
PROVIDER PATH KEY COMPONENT USAGECOUNT vault secret/myapp/database url api 2 op Production/db-credentials password api 1emb secrets validate
Section titled “emb secrets validate”Attempts to resolve each reference against its provider and reports pass/fail per secret, without printing values. Useful in CI to catch missing or renamed secrets before deploy.
Additional flag:
--fail-fast- Stop on the first validation error
emb secrets providers
Section titled “emb secrets providers”Shows configured secret providers and their connection status (e.g. vault, op). Handy for diagnosing auth/connectivity issues before running validate.
See Secrets Management for provider configuration, authentication methods (including OIDC with cached tokens), and reference syntax.
kubernetes
Section titled “kubernetes”emb kubernetes shell <COMPONENT> # Open shell in podemb kubernetes logs <COMPONENT> # View pod logsemb kubernetes ps <COMPONENT> # List podsemb kubernetes restart <COMPONENT> # Restart podsCommon options:
-n, --namespace <name>- Target namespace
See Kubernetes Integration for detailed usage.
Exit Codes
Section titled “Exit Codes”| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | General error |
| 2 | Command not found |