Skip to content

CLI Reference

Complete reference for all EMB commands.

These options are available for all commands:

OptionEnv VarDescription
-C, --root <path>EMB_ROOTRun as if emb was started in <path>
--verbose / --no-verboseEMB_VERBOSEEnable verbose output
--flavor <name>EMB_FLAVORUse a specific flavor configuration
--jsonFormat output as JSON
--helpShow help for command

Any flag with an env-var fallback is resolved in the following order (first non-empty value wins):

  1. The CLI flag, if provided
  2. The environment variable
  3. The command’s built-in default

This lets you set defaults in your shell (or CI pipeline) and still override them on individual invocations:

Terminal window
export EMB_FLAVOR=production
export EMB_VERBOSE=1
emb resources build # uses the production flavor, verbose
emb resources build --flavor staging # flag overrides EMB_FLAVOR
emb resources build --no-verbose # flag overrides EMB_VERBOSE

For Kubernetes commands, the namespace also honors the K8S_NAMESPACE environment variable — see Kubernetes Integration.

Start the project services.

Terminal window
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:

Terminal window
emb up # Start all services
emb up api web # Start specific services
emb up --flavor production # Start with production config
emb up -f # Force recreate containers

Stop all project services.

Terminal window
emb down

Restart project services.

Terminal window
emb restart [SERVICE...]

List running containers.

Terminal window
emb ps

View container logs.

Terminal window
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:

Terminal window
emb logs # Follow logs for all containers
emb logs api # Follow API logs
emb logs api web # Follow logs for multiple services
emb logs --no-follow api # Get log snapshot without following

Get a shell in a running container.

Terminal window
emb shell <SERVICE>

Clean project build artifacts and caches.

Terminal window
emb clean

Build project resources (images, files).

Terminal window
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:

Terminal window
emb resources build # Build all
emb resources build api:image # Build specific resource
emb resources build -f # Force rebuild all
emb resources build --flavor production # Build for production
emb resources build --publishable # Build only publishable resources

Publish resources to their registries (e.g., push Docker images).

Terminal window
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:

Terminal window
emb resources publish # Publish all publishable resources
emb resources publish api:image # Publish specific resource
emb resources publish --dry-run # Preview without pushing
emb resources publish --flavor production # Publish with production config

List discovered components.

Terminal window
emb components [OPTIONS]

Example output:

NAME IMAGE_NAME TAG CONTAINER
api myapp/api latest
web myapp/web latest

List all resources.

Terminal window
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:latest

List available tasks.

Terminal window
emb tasks [OPTIONS]

Example output:

NAME COMPONENT DESCRIPTION ID
test api Run API tests api:test
build web Build frontend web:build

List Docker images for the project.

Terminal window
emb images [OPTIONS]

List Docker containers for the project.

Terminal window
emb containers [OPTIONS]

Run one or more tasks.

Terminal window
emb run <TASK...> [OPTIONS]

Arguments:

  • TASK... - Task IDs or names to run

Options:

  • -x, --executor <type> - Force executor: local, container, or kubernetes
  • -a, --all-matching - Run all tasks matching name

Examples:

Terminal window
emb run test # Run task by name
emb run api:test # Run specific component task
emb run test --all-matching # Run all 'test' tasks
emb run deploy -x local # Force local execution
emb run migrate -x kubernetes # Run on Kubernetes pod

Print the resolved configuration.

Terminal window
emb config print [OPTIONS]

Useful for debugging configuration issues.

Examples:

Terminal window
emb config print # Print full config
emb config print --flavor production # Print production config

Set up shell autocompletion.

Terminal window
emb autocomplete [SHELL]

Supported shells: bash, zsh, fish

Update EMB to the latest version.

Terminal window
emb update

Show help for a command.

Terminal window
emb help [COMMAND]

Some commands are grouped into topics with subcommands:

Terminal window
emb components # List components
emb components logs # View service logs (alias: emb logs)
emb components shell # Get shell in service (alias: emb shell)
Terminal window
emb resources # List resources
emb resources build # Build resources
emb resources publish # Publish resources to registries
Terminal window
emb tasks # List tasks
Terminal window
emb images # List images
emb images delete # Delete images
emb images prune # Prune unused images
Terminal window
emb containers # List containers
emb containers delete # Delete containers
emb containers prune # Prune stopped containers
Terminal window
emb config print # Print configuration

EMB discovers secret references (${vault:...}, ${op:...}) across .emb.yml and all component Embfiles.

Terminal window
emb secrets # List secret references in configuration
emb secrets validate # Validate that secrets can be resolved
emb secrets providers # Show configured secret providers

Common flags:

  • --flavor <name> - Evaluate against a specific flavor
  • --json - Machine-readable output

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 1

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

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.

Terminal window
emb kubernetes shell <COMPONENT> # Open shell in pod
emb kubernetes logs <COMPONENT> # View pod logs
emb kubernetes ps <COMPONENT> # List pods
emb kubernetes restart <COMPONENT> # Restart pods

Common options:

  • -n, --namespace <name> - Target namespace

See Kubernetes Integration for detailed usage.

CodeMeaning
0Success
1General error
2Command not found