A replacement for our Makefile-for-monorepos
npm install @enspirit/embemb (Enspirit's Monorepo Builder)
=================
A CLI to help on Enspirit monorepos. This aims at replacing our aging Makefile for monorepos
sh-session
$ npm install -g @enspirit/emb
$ emb COMMAND
running command...
$ emb (--version)
@enspirit/emb/0.25.1 darwin-arm64 node-v22.21.1
$ emb --help [COMMAND]
USAGE
$ emb COMMAND
...
`
Commands
* [emb autocomplete [SHELL]](#emb-autocomplete-shell)
* emb clean
* emb components
* emb components shell SERVICE
* emb config print
* emb containers
* emb containers prune
* [emb down [SERVICE]](#emb-down-service)
* [emb help [COMMAND]](#emb-help-command)
* emb images
* emb images delete
* emb images prune
* emb images push
* emb kubernetes logs COMPONENT
* emb kubernetes ps
* [emb kubernetes restart [DEPLOYMENT]](#emb-kubernetes-restart-deployment)
* emb kubernetes shell COMPONENT
* [emb logs [SERVICE]](#emb-logs-service)
* [emb logs archive [SERVICE]](#emb-logs-archive-service)
* emb ps
* emb resources
* [emb resources build [COMPONENT]](#emb-resources-build-component)
* [emb resources publish [RESOURCES]](#emb-resources-publish-resources)
* [emb restart [SERVICE]](#emb-restart-service)
* emb run TASK
* emb secrets
* emb secrets providers
* emb secrets validate
* emb shell SERVICE
* [emb start [SERVICE]](#emb-start-service)
* [emb stop [SERVICE]](#emb-stop-service)
* emb tasks
* emb tasks run TASK
* [emb up [SERVICE]](#emb-up-service)
* [emb update [CHANNEL]](#emb-update-channel)emb autocomplete [SHELL]Display autocomplete installation instructions.
`
USAGE
$ emb autocomplete [SHELL] [-r]ARGUMENTS
[SHELL] (zsh|bash|powershell) Shell type
FLAGS
-r, --refresh-cache Refresh cache (ignores displaying instructions)
DESCRIPTION
Display autocomplete installation instructions.
EXAMPLES
$ emb autocomplete
$ emb autocomplete bash
$ emb autocomplete zsh
$ emb autocomplete powershell
$ emb autocomplete --refresh-cache
`_See code: @oclif/plugin-autocomplete_
emb cleanClean the project.
`
USAGE
$ emb clean [--json] [--verbose] [-C ] [-f]FLAGS
-C, --root= Run as if emb was started in . Can also be set via EMB_ROOT env var.
-f, --force Force the deletion of containers & images
--[no-]verbose
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Clean the project.
EXAMPLES
$ emb clean
`_See code: src/commands/clean.ts_
emb componentsList components.
`
USAGE
$ emb components [--json] [--verbose] [-C ] [--flavor ]FLAGS
-C, --root= Run as if emb was started in . Can also be set via EMB_ROOT env var.
--flavor= Specify the flavor to use.
--[no-]verbose
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
List components.
EXAMPLES
$ emb components
`_See code: src/commands/components/index.ts_
emb components shell SERVICEGet a shell on a running service.
`
USAGE
$ emb components shell SERVICE [--verbose] [-C ] [-s ]ARGUMENTS
SERVICE The service you want to get a shell on
FLAGS
-C, --root= Run as if emb was started in . Can also be set via EMB_ROOT env var.
-s, --shell= [default: bash] The shell to run
--[no-]verbose
DESCRIPTION
Get a shell on a running service.
ALIASES
$ emb shell
EXAMPLES
$ emb components shell
`_See code: src/commands/components/shell.ts_
emb config printPrint the current config.
`
USAGE
$ emb config print [--json] [--verbose] [-C ] [--flavor ]FLAGS
-C, --root= Run as if emb was started in . Can also be set via EMB_ROOT env var.
--flavor= Specify the flavor to use.
--[no-]verbose
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Print the current config.
EXAMPLES
$ emb config print
`_See code: src/commands/config/print.ts_
emb containersList docker containers.
`
USAGE
$ emb containers [--json] [--verbose] [-C ] [-a]FLAGS
-C, --root= Run as if emb was started in . Can also be set via EMB_ROOT env var.
-a, --all Retun all containers. By default, only running containers are shown
--[no-]verbose
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
List docker containers.
EXAMPLES
$ emb containers
`_See code: src/commands/containers/index.ts_
emb containers prunePrune containers.
`
USAGE
$ emb containers prune [--json] [--verbose] [-C ]FLAGS
-C, --root= Run as if emb was started in . Can also be set via EMB_ROOT env var.
--[no-]verbose
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Prune containers.
EXAMPLES
$ emb containers prune
`_See code: src/commands/containers/prune.ts_
emb down [SERVICE]Stop the whole project.
`
USAGE
$ emb down [SERVICE...] [--json] [--verbose] [-C ] [--flavor ]ARGUMENTS
[SERVICE...] The service(s) to stop and remove
FLAGS
-C, --root= Run as if emb was started in . Can also be set via EMB_ROOT env var.
--flavor= Specify the flavor to use.
--[no-]verbose
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Stop the whole project.
EXAMPLES
$ emb down
`_See code: src/commands/down.ts_
emb help [COMMAND]Display help for emb.
`
USAGE
$ emb help [COMMAND...] [-n]ARGUMENTS
[COMMAND...] Command to show help for.
FLAGS
-n, --nested-commands Include all nested commands in the output.
DESCRIPTION
Display help for emb.
`_See code: @oclif/plugin-help_
emb imagesList docker images.
`
USAGE
$ emb images [--json] [--verbose] [-C ] [--flavor ] [-a]FLAGS
-C, --root= Run as if emb was started in . Can also be set via EMB_ROOT env var.
-a, --all Show all images. Only images from a final layer (no children) are shown by default.
--flavor= Specify the flavor to use.
--[no-]verbose
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
List docker images.
EXAMPLES
$ emb images
`_See code: src/commands/images/index.ts_
emb images deleteDelete project images.
`
USAGE
$ emb images delete [--json] [--verbose] [-C ] [-f]FLAGS
-C, --root= Run as if emb was started in . Can also be set via EMB_ROOT env var.
-f, --force Remove the image even if it is being used by stopped containers or has other tags
--[no-]verbose
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Delete project images.
EXAMPLES
$ emb images delete
`_See code: src/commands/images/delete.ts_
emb images prunePrune project images.
`
USAGE
$ emb images prune [--json] [--verbose] [-C ] [-a]FLAGS
-C, --root= Run as if emb was started in . Can also be set via EMB_ROOT env var.
-a, --all Prune all images. When set to true all images will be pruned, not only dangling ones
--[no-]verbose
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Prune project images.
EXAMPLES
$ emb images prune
`_See code: src/commands/images/prune.ts_
emb images push[DEPRECATED] Push docker images. Use "emb resources publish" instead.
`
USAGE
$ emb images push [--json] [--verbose] [-C ] [--flavor ] [--registry ] [--retag ]FLAGS
-C, --root= Run as if emb was started in . Can also be set via EMB_ROOT env var.
--flavor= Specify the flavor to use.
--registry= Override the registry to push to
--retag= Override the original tag to push to a new tag
--[no-]verbose
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
[DEPRECATED] Push docker images. Use "emb resources publish" instead.
EXAMPLES
$ emb images push
$ emb images push --registry my.registry.io --retag newtag
`_See code: src/commands/images/push.ts_
emb kubernetes logs COMPONENTFollow kubernetes logs.
`
USAGE
$ emb kubernetes logs COMPONENT [--verbose] [-C ] [-n ] [-f]ARGUMENTS
COMPONENT The component you want to see the logs of
FLAGS
-C, --root= Run as if emb was started in . Can also be set via EMB_ROOT env var.
-f, --[no-]follow Follow log output
-n, --namespace= The Kubernetes namespace to target
--[no-]verbose
DESCRIPTION
Follow kubernetes logs.
EXAMPLES
$ emb kubernetes logs
`_See code: src/commands/kubernetes/logs.ts_
emb kubernetes psShow running pods.
`
USAGE
$ emb kubernetes ps [--verbose] [-C ] [-n ] [--watch]FLAGS
-C, --root= Run as if emb was started in . Can also be set via EMB_ROOT env var.
-n, --namespace= The Kubernetes namespace to target
--[no-]verbose
--[no-]watch
DESCRIPTION
Show running pods.
EXAMPLES
$ emb kubernetes ps
`_See code: src/commands/kubernetes/ps.ts_
emb kubernetes restart [DEPLOYMENT]Restart pods of an instance.
`
USAGE
$ emb kubernetes restart [DEPLOYMENT...] [--verbose] [-C ] [-n ]ARGUMENTS
[DEPLOYMENT...] The deployment(s) to restart
FLAGS
-C, --root= Run as if emb was started in . Can also be set via EMB_ROOT env var.
-n, --namespace= The Kubernetes namespace to target
--[no-]verbose
DESCRIPTION
Restart pods of an instance.
EXAMPLES
$ emb kubernetes restart
`_See code: src/commands/kubernetes/restart.ts_
emb kubernetes shell COMPONENTGet a shell on a deployed component.
`
USAGE
$ emb kubernetes shell COMPONENT [--verbose] [-C ] [-n ] [-s ]ARGUMENTS
COMPONENT The component you want to get a shell on
FLAGS
-C, --root= Run as if emb was started in . Can also be set via EMB_ROOT env var.
-n, --namespace= The Kubernetes namespace to target
-s, --shell= [default: bash] The shell to run
--[no-]verbose
DESCRIPTION
Get a shell on a deployed component.
ALIASES
$ emb shell
EXAMPLES
$ emb kubernetes shell
`_See code: src/commands/kubernetes/shell.ts_
emb logs [SERVICE]Get service logs.
`
USAGE
$ emb logs [SERVICE...] [--verbose] [-C ] [-f]ARGUMENTS
[SERVICE...] The service(s) you want to see the logs of (all if omitted)
FLAGS
-C, --root= Run as if emb was started in . Can also be set via EMB_ROOT env var.
-f, --[no-]follow Follow log output
--[no-]verbose
DESCRIPTION
Get service logs.
EXAMPLES
$ emb logs
$ emb logs backend
$ emb logs backend frontend
$ emb logs --no-follow backend
`_See code: src/commands/logs/index.ts_
emb logs archive [SERVICE]Archive docker compose logs to files (one file per service).
`
USAGE
$ emb logs archive [SERVICE...] [--json] [--verbose] [-C ] [-t] [--tail ] [-o ]ARGUMENTS
[SERVICE...] The service(s) to archive logs for (all if omitted)
FLAGS
-C, --root= Run as if emb was started in . Can also be set via EMB_ROOT env var.
-o, --output= Output directory for log files (defaults to .emb//logs/docker/compose)
-t, --timestamps Include timestamps in logs
--tail= Number of lines to show from the end of the logs
--[no-]verbose
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Archive docker compose logs to files (one file per service).
EXAMPLES
$ emb logs archive
$ emb logs archive backend frontend
$ emb logs archive --timestamps
$ emb logs archive --tail 1000
`_See code: src/commands/logs/archive.ts_
emb psLists the containers running in the project.
`
USAGE
$ emb ps [--verbose] [-C ] [--flavor ] [-a]FLAGS
-C, --root= Run as if emb was started in . Can also be set via EMB_ROOT env var.
-a, --all Show all stopped containers
--flavor= Specify the flavor to use.
--[no-]verbose
DESCRIPTION
Lists the containers running in the project.
EXAMPLES
$ emb ps
`_See code: src/commands/ps.ts_
emb resourcesList resources.
`
USAGE
$ emb resources [--json] [--verbose] [-C ] [--flavor ] [--publishable]FLAGS
-C, --root= Run as if emb was started in . Can also be set via EMB_ROOT env var.
--flavor= Specify the flavor to use.
--publishable Only show resources that are publishable (publish: true)
--[no-]verbose
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
List resources.
EXAMPLES
$ emb resources
$ emb resources --publishable
`_See code: src/commands/resources/index.ts_
emb resources build [COMPONENT]Build the resources of the monorepo
`
USAGE
$ emb resources build [COMPONENT...] [--json] [--verbose] [-C ] [--flavor ] [--dry-run] [-f]
[--publishable]ARGUMENTS
[COMPONENT...] List of resources to build (defaults to all)
FLAGS
-C, --root= Run as if emb was started in . Can also be set via EMB_ROOT env var.
-f, --force Bypass the cache and force the build
--dry-run Do not build the resources but only produce build meta information
--flavor= Specify the flavor to use.
--publishable Only build resources that are publishable (publish: true) and their dependencies
--[no-]verbose
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Build the resources of the monorepo
EXAMPLES
$ emb resources build build --flavor development
$ emb resources build build --publishable --flavor production
`_See code: src/commands/resources/build.ts_
emb resources publish [RESOURCES]Publish resources to their registries
`
USAGE
$ emb resources publish [RESOURCES...] [--json] [--verbose] [-C ] [--flavor ] [--dry-run]ARGUMENTS
[RESOURCES...] List of resources to publish (defaults to all publishable)
FLAGS
-C, --root= Run as if emb was started in . Can also be set via EMB_ROOT env var.
--dry-run Do not publish, just show what would be published
--flavor= Specify the flavor to use.
--[no-]verbose
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Publish resources to their registries
EXAMPLES
$ emb resources publish --flavor production
$ emb resources publish api:image --flavor production
`_See code: src/commands/resources/publish.ts_
emb restart [SERVICE]Restart the whole project.
`
USAGE
$ emb restart [SERVICE...] [--json] [--verbose] [-C ] [-f]ARGUMENTS
[SERVICE...] The service(s) to restart
FLAGS
-C, --root= Run as if emb was started in . Can also be set via EMB_ROOT env var.
-f, --no-deps Don't restart dependent services
--[no-]verbose
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Restart the whole project.
EXAMPLES
$ emb restart
`_See code: src/commands/restart.ts_
emb run TASKRun tasks.
`
USAGE
$ emb run TASK... [--json] [--verbose] [-C ] [-x container|kubernetes|local] [-a]ARGUMENTS
TASK... List of tasks to run. You can provide either ids or names (eg: component:task or task)
FLAGS
-C, --root= Run as if emb was started in . Can also be set via EMB_ROOT env var.
-a, --all-matching Run all tasks matching (when multiple matches)
-x, --executor=
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Run tasks.
ALIASES
$ emb run
EXAMPLES
$ emb run
`emb secretsList all secret references in the configuration.
`
USAGE
$ emb secrets [--json] [--verbose] [-C ] [--flavor ]FLAGS
-C, --root= Run as if emb was started in . Can also be set via EMB_ROOT env var.
--flavor= Specify the flavor to use.
--[no-]verbose
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
List all secret references in the configuration.
EXAMPLES
$ emb secrets
$ emb secrets --json
`_See code: src/commands/secrets/index.ts_
emb secrets providersShow configured secret providers and their status.
`
USAGE
$ emb secrets providers [--json] [--verbose] [-C ] [--flavor ]FLAGS
-C, --root= Run as if emb was started in . Can also be set via EMB_ROOT env var.
--flavor= Specify the flavor to use.
--[no-]verbose
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Show configured secret providers and their status.
EXAMPLES
$ emb secrets providers
`_See code: src/commands/secrets/providers.ts_
emb secrets validateValidate that all secret references can be resolved (without showing values).
`
USAGE
$ emb secrets validate [--json] [--verbose] [-C ] [--flavor ] [--fail-fast]FLAGS
-C, --root= Run as if emb was started in . Can also be set via EMB_ROOT env var.
--fail-fast Stop on first validation error
--flavor= Specify the flavor to use.
--[no-]verbose
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Validate that all secret references can be resolved (without showing values).
EXAMPLES
$ emb secrets validate
$ emb secrets validate --fail-fast
$ emb secrets validate --json
`_See code: src/commands/secrets/validate.ts_
emb shell SERVICEGet a shell on a running service.
`
USAGE
$ emb shell SERVICE [--verbose] [-C ] [-s ]ARGUMENTS
SERVICE The service you want to get a shell on
FLAGS
-C, --root= Run as if emb was started in . Can also be set via EMB_ROOT env var.
-s, --shell= [default: bash] The shell to run
--[no-]verbose
DESCRIPTION
Get a shell on a running service.
ALIASES
$ emb shell
EXAMPLES
$ emb shell
`emb start [SERVICE]Starts the whole project.
`
USAGE
$ emb start [SERVICE...] [--json] [--verbose] [-C ]ARGUMENTS
[SERVICE...] The service(s) to start
FLAGS
-C, --root= Run as if emb was started in . Can also be set via EMB_ROOT env var.
--[no-]verbose
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Starts the whole project.
EXAMPLES
$ emb start
`_See code: src/commands/start.ts_
emb stop [SERVICE]Stop the whole project.
`
USAGE
$ emb stop [SERVICE...] [--json] [--verbose] [-C ] [--flavor ]ARGUMENTS
[SERVICE...] The service(s) to stop
FLAGS
-C, --root= Run as if emb was started in . Can also be set via EMB_ROOT env var.
--flavor= Specify the flavor to use.
--[no-]verbose
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Stop the whole project.
EXAMPLES
$ emb stop
`_See code: src/commands/stop.ts_
emb tasksList tasks.
`
USAGE
$ emb tasks [--json] [--verbose] [-C ]FLAGS
-C, --root= Run as if emb was started in . Can also be set via EMB_ROOT env var.
--[no-]verbose
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
List tasks.
EXAMPLES
$ emb tasks
`_See code: src/commands/tasks/index.ts_
emb tasks run TASKRun tasks.
`
USAGE
$ emb tasks run TASK... [--json] [--verbose] [-C ] [-x container|kubernetes|local] [-a]ARGUMENTS
TASK... List of tasks to run. You can provide either ids or names (eg: component:task or task)
FLAGS
-C, --root= Run as if emb was started in . Can also be set via EMB_ROOT env var.
-a, --all-matching Run all tasks matching (when multiple matches)
-x, --executor=
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Run tasks.
ALIASES
$ emb run
EXAMPLES
$ emb tasks run
`_See code: src/commands/tasks/run.ts_
emb up [SERVICE]Start the whole project.
`
USAGE
$ emb up [SERVICE...] [--json] [--verbose] [-C ] [--flavor ] [-f]ARGUMENTS
[SERVICE...] The service(s) to build and start
FLAGS
-C, --root= Run as if emb was started in . Can also be set via EMB_ROOT env var.
-f, --force Bypass caches, force the recreation of containers, etc
--flavor= Specify the flavor to use.
--[no-]verbose
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Start the whole project.
EXAMPLES
$ emb up
`_See code: src/commands/up.ts_
emb update [CHANNEL]update the emb CLI
`
USAGE
$ emb update [CHANNEL] [--force | | [-a | -v | -i]] [-b ]FLAGS
-a, --available See available versions.
-b, --verbose Show more details about the available versions.
-i, --interactive Interactively select version to install. This is ignored if a channel is provided.
-v, --version= Install a specific version.
--force Force a re-download of the requested version.
DESCRIPTION
update the emb CLI
EXAMPLES
Update to the stable channel:
$ emb update stable
Update to a specific version:
$ emb update --version 1.0.0
Interactively select version:
$ emb update --interactive
See available versions:
$ emb update --available
``_See code: @oclif/plugin-update_