Commands
Below is a list of Garden CLI commands and usage information.
The commands should be run in a Garden project, and are always scoped to that project.
Note: You can get a list of commands in the CLI by running garden -h/--help, and detailed help for each command using garden <command> -h/--help
The Outputs sections show the output structure when running the command with --output yaml. The same structure is used when --output json is used and when querying through the REST API, but in JSON format.
Global options
The following option flags can be used with any of the CLI commands:
--root
-r
path
Override project root directory (defaults to working directory). Can be absolute or relative to current directory.
--silent
-s
boolean
Suppress log output. Same as setting --logger-type=quiet.
--env
-e
string
The environment (and optionally namespace) to work against.
--logger-type
quiet basic fancy json
Set logger type. fancy updates log lines in-place when their status changes (e.g. when tasks complete), basic appends a new log line when a log line's status changes, json same as basic, but renders log lines as JSON, quiet suppresses all log output, same as --silent.
--log-level
-l
error warn info verbose debug silly 0 1 2 3 4 5
Set logger level. Values can be either string or numeric and are prioritized from 0 to 5 (highest to lowest) as follows: error: 0, warn: 1, info: 2, verbose: 3, debug: 4, silly: 5.
--output
-o
json yaml
Output command result in specified format (note: disables progress logging and interactive functionality).
--emoji
boolean
Enable emoji in output (defaults to true if the environment supports it).
--show-timestamps
boolean
Show timestamps with log output. When enabled, Garden will use the basic logger. I.e., log status changes are rendered as new lines instead of being updated in-place.
--yes
-y
boolean
Automatically approve any yes/no prompts during execution.
--force-refresh
boolean
Force refresh of any caches, e.g. cached provider statuses.
--var
array:string
Set a specific variable value, using the format <key>=<value>, e.g. `--var some-key=custom-value`. This will override any value set in your project configuration. You can specify multiple variables by separating with a comma, e.g. `--var key-a=foo,key-b="value with quotes"`.
--version
-v
boolean
Show the current CLI version.
--help
-h
boolean
Show help
--disable-port-forwards
boolean
Disable automatic port forwarding when in watch/hot-reload mode. Note that you can also set GARDEN_DISABLE_PORT_FORWARDS=true in your environment.
garden build
Build your modules.
Builds all or specified modules, taking into account build dependency order. Optionally stays running and automatically builds modules if their source (or their dependencies' sources) change.
Examples:
Usage
Arguments
modules
No
Specify module(s) to build. Use comma as a separator to specify multiple modules.
Options
--force
-f
boolean
Force rebuild of module(s).
--watch
-w
boolean
Watch for changes in module(s) and auto-build.
--with-dependants
boolean
Also rebuild modules that have build dependencies on one of the modules specified as CLI arguments (recursively). Note: This option has no effect unless a list of module names is specified as CLI arguments (since then, every module in the project will be rebuilt).
Outputs
garden call
Call a service ingress endpoint.
Resolves the deployed ingress endpoint for the given service and path, calls the given endpoint and outputs the result.
Examples:
Note: Currently only supports simple GET requests for HTTP/HTTPS ingresses.
Usage
Arguments
serviceAndPath
Yes
The name of the service to call followed by the ingress path (e.g. my-container/somepath).
garden config analytics-enabled
Update your preferences regarding analytics.
To help us make Garden better, you can opt in to the collection of usage data. We make sure all the data collected is anonymized and stripped of sensitive information. We collect data about which commands are run, what tasks they trigger, which API calls are made to your local Garden server, as well as some info about the environment in which Garden runs.
You will be asked if you want to opt-in when running Garden for the first time and you can use this command to update your preferences later.
Examples:
Usage
Arguments
enable
No
Enable analytics. Defaults to "true"
garden create project
Create a new Garden project.
Creates a new Garden project configuration. The generated config includes some default values, as well as the schema of the config in the form of commentented-out fields. Also creates a default (blank) .gardenignore file in the same path.
Examples:
Usage
Options
--skip-comments
boolean
Set to true to disable comment generation.
--dir
path
Directory to place the project in (defaults to current directory).
--filename
string
Filename to place the project config in (defaults to project.garden.yml).
--interactive
-i
boolean
Set to false to disable interactive prompts.
--name
string
Name of the project (defaults to current directory name).
garden create module
Create a new Garden module.
Creates a new Garden module configuration. The generated config includes some default values, as well as the schema of the config in the form of commentented-out fields.
Examples:
Usage
Options
--skip-comments
boolean
Set to true to disable comment generation.
--dir
path
Directory to place the module in (defaults to current directory).
--filename
string
Filename to place the module config in (defaults to garden.yml).
--interactive
-i
boolean
Set to false to disable interactive prompts.
--name
string
Name of the module (defaults to current directory name).
--type
string
The module type to create. Required if --interactive=false.
garden delete secret
Delete a secret from the environment.
Returns with an error if the provided key could not be found by the provider.
Examples:
Usage
Arguments
provider
Yes
The name of the provider to remove the secret from.
key
Yes
The key of the configuration variable. Separate with dots to get a nested key (e.g. key.nested).
garden delete environment
Deletes a running environment.
This will delete all services in the specified environment, and trigger providers to clear up any other resources and reset it. When you then run garden deploy, the environment will be reconfigured.
This can be useful if you find the environment to be in an inconsistent state, or need/want to free up resources.
Usage
Options
--dependants-first
boolean
Delete services in reverse dependency order. That is, if service-a has a dependency on service-b, service-a will be deleted before service-b when calling garden delete environment service-a,service-b --dependants-first. When this flag is not used, all services in the project are deleted simultaneously.
Outputs
garden delete service
Deletes running services.
Deletes (i.e. un-deploys) the specified services. Deletes all services in the project if no arguments are provided. Note that this command does not take into account any services depending on the deleted service/services, and might therefore leave the project in an unstable state. Running garden deploy will re-deploy any missing services.
Examples:
Usage
Arguments
services
No
The name(s) of the service(s) to delete. Use comma as a separator to specify multiple services.
Options
--dependants-first
boolean
Delete services in reverse dependency order. That is, if service-a has a dependency on service-b, service-a will be deleted before service-b when calling garden delete environment service-a,service-b --dependants-first. When this flag is not used, all services in the project are deleted simultaneously.
--with-dependants
boolean
Also delete services that have service dependencies on one of the services specified as CLI arguments (recursively). When used, this option implies --dependants-first. Note: This option has no effect unless a list of service names is specified as CLI arguments (since then, every service in the project will be deleted).
Outputs
garden deploy
Deploy service(s) to your environment.
Deploys all or specified services, taking into account service dependency order. Also builds modules and dependencies if needed.
Optionally stays running and automatically re-builds and re-deploys services if their module source (or their dependencies' sources) change.
Examples:
Usage
Arguments
services
No
The name(s) of the service(s) to deploy (skip to deploy all services). Use comma as a separator to specify multiple services.
Options
--force
boolean
Force redeploy of service(s).
--force-build
boolean
Force rebuild of module(s).
--watch
-w
boolean
Watch for changes in module(s) and auto-deploy.
--dev-mode
--dev
array:string
The name(s) of the service(s) to deploy with dev mode enabled. Use comma as a separator to specify multiple services. Use * to deploy all services with dev mode enabled. When this option is used, the command is run in watch mode (i.e. implicitly sets the --watch/-w flag).
--hot-reload
--hot
array:string
The name(s) of the service(s) to deploy with hot reloading enabled. Use comma as a separator to specify multiple services. Use * to deploy all services with hot reloading enabled (ignores services belonging to modules that don't support or haven't configured hot reloading). When this option is used, the command is run in watch mode (i.e. implicitly sets the --watch/-w flag).
--local-mode
--local
array:string
[EXPERIMENTAL] The name(s) of the service(s) to be started locally with local mode enabled. Use comma as a separator to specify multiple services. Use * to deploy all services with local mode enabled. When this option is used, the command is run in persistent mode.
This always takes the precedence over the dev mode if there are any conflicts, i.e. if the same services are passed to both `--dev` and `--local` options.
--skip
array:string
The name(s) of services you'd like to skip when deploying.
--skip-dependencies
--nodeps
boolean
Deploy the specified services, but don't deploy any additional services that they depend on or run any tasks that they depend on. This option can only be used when a list of service names is passed as CLI arguments. This can be useful e.g. when your stack has already been deployed, and you want to deploy a subset of services in dev mode without redeploying any service dependencies that may have changed since you last deployed.
--forward
boolean
Create port forwards and leave process running without watching for changes. Ignored if --watch/-w flag is set or when in dev or hot-reload mode.
--skip-watch
boolean
[EXPERIMENTAL] If set to `false` while in dev-mode (i.e. the --dev-mode/--dev flag is used) then file syncing will still work but Garden will ignore changes to config files and services that are not in dev mode.
This can be a performance improvement for projects that have a large number of files and where only syncing is needed when in dev mode.
Note that this flag cannot used if hot reloading is enabled.
This behaviour will change in a future release in favour of a "smarter" watching mechanism.
Outputs
garden dev
Starts the garden development console.
The Garden dev console is a combination of the build, deploy and test commands. It builds, deploys and tests all your modules and services, and re-builds, re-deploys and re-tests as you modify the code.
Examples:
Usage
Arguments
services
No
Specify which services to develop (defaults to all configured services).
Options
--force
boolean
Force redeploy of service(s).
--hot-reload
--hot
array:string
The name(s) of the service(s) to deploy with hot reloading enabled. Use comma as a separator to specify multiple services. Use * to deploy all services with hot reloading enabled (ignores services belonging to modules that don't support or haven't configured hot reloading).
--local-mode
--local
array:string
[EXPERIMENTAL] The name(s) of the service(s) to be started locally with local mode enabled. Use comma as a separator to specify multiple services. Use * to deploy all services with local mode enabled. When this option is used, the command is run in persistent mode.
This always takes the precedence over the dev mode if there are any conflicts, i.e. if the same services are passed to both `--dev` and `--local` options.
--skip-tests
boolean
Disable running the tests.
--test-names
--tn
array:string
Filter the tests to run by test name across all modules (leave unset to run all tests). Accepts glob patterns (e.g. integ* would run both 'integ' and 'integration').
--skip-watch
boolean
[EXPERIMENTAL] Watching is enabled by default but can be disabled by setting this flag to `false`.
If set to `false` then file syncing will still work but Garden will ignore changes to config files and services that are not in dev mode.
This can be a performance improvement for projects that have a large number of files and where only file syncing is needed when in dev mode.
Note that this flag cannot be used if hot reloading is enabled.
This flag will be removed in future release in favour of a "smarter" watching mechanism.
garden exec
Executes a command (such as an interactive shell) in a running service.
Finds an active container for a deployed service and executes the given command within the container. Supports interactive shells.
NOTE: This command may not be supported for all module types.
Examples:
Usage
Arguments
service
Yes
The service to exec the command in.
command
Yes
The command to run.
Options
--interactive
boolean
Set to false to skip interactive mode and just output the command result
Outputs
garden cloud secrets list
List secrets.
List all secrets from Garden Cloud. Optionally filter on environment, user IDs, or secret names.
Examples: garden cloud secrets list # list all secrets garden cloud secrets list --filter-envs dev # list all secrets from the dev environment garden cloud secrets list --filter-envs dev --filter-names DB # list all secrets from the dev environment that have 'DB' in their name.
Usage
Options
--filter-envs
array:string
Filter on environment. Use comma as a separator to filter on multiple environments. Accepts glob patterns."
--filter-user-ids
array:string
Filter on user ID. Use comma as a separator to filter on multiple user IDs. Accepts glob patterns.
--filter-names
array:string
Filter on secret name. Use comma as a separator to filter on multiple secret names. Accepts glob patterns.
garden cloud secrets create
Create secrets
Create secrets in Garden Cloud. You can create project wide secrets or optionally scope them to an environment, or an environment and a user.
To scope secrets to a user, you will need the user's ID which you can get from the garden cloud users list command.
You can optionally read the secrets from a file.
Examples: garden cloud secrets create DB_PASSWORD=my-pwd,ACCESS_KEY=my-key # create two secrets garden cloud secrets create ACCESS_KEY=my-key --scope-to-env ci # create a secret and scope it to the ci environment garden cloud secrets create ACCESS_KEY=my-key --scope-to-env ci --scope-to-user 9 # create a secret and scope it to the ci environment and user with ID 9 garden cloud secrets create --from-file /path/to/secrets.txt # create secrets from the key value pairs in the secrets.txt file
Usage
Arguments
secrets
No
The names and values of the secrets to create, separated by '='. Use comma as a separator to specify multiple secret name/value pairs. Note that you can also leave this empty and have Garden read the secrets from file.
Options
--scope-to-user-id
number
Scope the secret to a user with the given ID. User scoped secrets must be scoped to an environment as well.
--scope-to-env
string
Scope the secret to an environment. Note that this does not default to the environment that the command runs in (i.e. the one set via the --env flag) and that you need to set this explicitly if you want to create an environment scoped secret.
--from-file
path
Read the secrets from the file at the given path. The file should have standard "dotenv" format, as defined by dotenv.
garden cloud secrets delete
Delete secrets.
Delete secrets in Garden Cloud. You will need the IDs of the secrets you want to delete, which you which you can get from the garden cloud secrets list command.
Examples: garden cloud secrets delete <ID 1>,<ID 2>,<ID 3> # delete three secrets with the given IDs.
Usage
Arguments
ids
No
The IDs of the secrets to delete.
garden cloud users list
List users.
List all users from Garden Cloud. Optionally filter on group names or user names.
Examples: garden cloud users list # list all users garden cloud users list --filter-names Gordon* # list all the Gordons in Garden Cloud. Useful if you have a lot of Gordons. garden cloud users list --filter-groups devs-* # list all users in groups that with names that start with 'dev-'
Usage
Options
--filter-names
array:string
Filter on user name. Use comma as a separator to filter on multiple names. Accepts glob patterns.
--filter-groups
array:string
Filter on the groups the user belongs to. Use comma as a separator to filter on multiple groups. Accepts glob patterns.
garden cloud users create
Create users
Create users in Garden Cloud and optionally add the users to specific groups. You can get the group IDs from the garden cloud users list command.
To create a user, you'll need their GitHub or GitLab username, depending on which one is your VCS provider, and the name they should have in Garden Cloud. Note that it must the their GitHub/GitLab username, not their email, as people can have several emails tied to their GitHub/GitLab accounts.
You can optionally read the users from a file. The file must have the format vcs-username="Actual Username". For example:
fatema_m="Fatema M" gordon99="Gordon G"
Examples: garden cloud users create fatema_m="Fatema M",gordon99="Gordon G" # create two users garden cloud users create fatema_m="Fatema M" --add-to-groups 1,2 # create a user and add two groups with IDs 1,2 garden cloud users create --from-file /path/to/users.txt # create users from the key value pairs in the users.txt file
Usage
Arguments
users
No
The VCS usernames and the names of the users to create, separated by '='. Use comma as a separator to specify multiple VCS username/name pairs. Note that you can also leave this empty and have Garden read the users from file.
Options
--add-to-groups
array:string
Add the user to the group with the given ID. Use comma as a separator to add the user to multiple groups.
--from-file
path
Read the users from the file at the given path. The file should have standard "dotenv" format (as defined by dotenv) where the VCS username is the key and the name is the value.
garden cloud users delete
Delete users.
Delete users in Garden Cloud. You will need the IDs of the users you want to delete, which you which you can get from the garden cloud users list command. Use a comma- separated list to delete multiple users.
Examples: garden cloud users delete <ID 1>,<ID 2>,<ID 3> # delete three users with the given IDs.
Usage
Arguments
ids
No
The IDs of the users to delete.
garden cloud groups list
List groups.
List all groups from Garden Cloud. This is useful for getting the group IDs when creating users via the garden cloud users create command.
Examples: garden cloud groups list # list all groups garden cloud groups list --filter-names dev-* # list all groups that start with 'dev-'
Usage
Options
--filter-names
array:string
Filter on group name. Use comma as a separator to filter on multiple names. Accepts glob patterns.
garden get graph
Outputs the dependency relationships specified in this project's garden.yml files.
Usage
garden get config
Outputs the full configuration for this project and environment.
Usage
Options
--exclude-disabled
boolean
Exclude disabled module, service, test, and task configs from output.
--resolve
full partial
Choose level of resolution of config templates. Defaults to full. Specify --resolve=partial to avoid resolving providers.
Outputs
garden get linked-repos
Outputs a list of all linked remote sources and modules for this project.
Usage
garden get outputs
Resolves and returns the outputs of the project.
Resolves and returns the outputs of the project. If necessary, this may involve deploying services and/or running tasks referenced by the outputs in the project configuration.
Examples:
Usage
Outputs
garden get modules
Outputs all or specified modules.
Outputs all or specified modules. Use with --output=json and jq to extract specific fields.
Examples:
Usage
Arguments
modules
No
Specify module(s) to list. Use comma as a separator to specify multiple modules. Skip to return all modules.
Options
--full
boolean
Show the full config for each module, with template strings resolved. Has no effect when the --output option is used.
--exclude-disabled
boolean
Exclude disabled modules from output.
Outputs
garden get status
Outputs the full status of your environment.
Usage
Outputs
garden get tasks
Lists the tasks defined in your project's modules.
Usage
Arguments
tasks
No
Specify task(s) to list. Use comma as a separator to specify multiple tasks.
garden get tests
Lists the tests defined in your project's modules.
Usage
Arguments
tests
No
Specify tests(s) to list. Use comma as a separator to specify multiple tests.
garden get task-result
Outputs the latest execution result of a provided task.
Usage
Arguments
name
Yes
The name of the task
Outputs
garden get test-result
Outputs the latest execution result of a provided test.
Usage
Arguments
module
Yes
Module name of where the test runs.
name
Yes
Test name.
Outputs
garden get debug-info
Outputs the status of your environment for debug purposes.
Examples:
garden get debug-info # create a zip file at the root of the project with debug information garden get debug-info --format yaml # output provider info as YAML files (default is JSON) garden get debug-info --include-project # include provider info for the project namespace (disabled by default)
Usage
Options
--format
json yaml
The output format for plugin-generated debug info.
--include-project
boolean
Include project-specific information from configured providers.
Note that this may include sensitive data, depending on the provider and your configuration.
garden get workflows
Lists the workflows defined in your project.
Usage
Arguments
workflows
No
Specify workflow(s) to list. Use comma as a separator to specify multiple workflows.
garden link source
Link a remote source to a local directory.
After linking a remote source, Garden will read it from its local directory instead of from the remote URL. Garden can only link remote sources that have been declared in the project level garden.yml config.
Examples:
Usage
Arguments
source
Yes
Name of the source to link as declared in the project config.
path
Yes
Path to the local directory that contains the source.
Outputs
garden link module
Link a module to a local directory.
After linking a remote module, Garden will read the source from the module's local directory instead of from the remote URL. Garden can only link modules that have a remote source, i.e. modules that specifiy a repositoryUrl in their garden.yml config file.
Examples:
Usage
Arguments
module
Yes
Name of the module to link.
path
Yes
Path to the local directory that contains the module.
Outputs
garden logs
Retrieves the most recent logs for the specified service(s).
Outputs logs for all or specified services, and optionally waits for news logs to come in. Defaults to getting logs from the last minute when in --follow mode. You can change this with the --since or --tail options.
Examples:
Usage
Arguments
services
No
The name(s) of the service(s) to log (skip to log all services). Use comma as a separator to specify multiple services.
Options
--tag
array:tag
Only show log lines that match the given tag, e.g. `--tag 'container=foo'`. If you specify multiple filters in a single tag option (e.g. `--tag 'container=foo,someOtherTag=bar'`), they must all be matched. If you provide multiple `--tag` options (e.g. `--tag 'container=api' --tag 'container=frontend'`), they will be OR-ed together (i.e. if any of them match, the log line will be included). You can specify glob-style wildcards, e.g. `--tag 'container=prefix-*'`.
--follow
-f
boolean
Continuously stream new logs from the service(s). When the `--follow` option is set, we default to `--since 1m`.
--tail
-t
number
Number of lines to show for each service. Defaults to showing all log lines (up to a certain limit). Takes precedence over the `--since` flag if both are set. Note that we don't recommend using a large value here when in follow mode.
--show-container
boolean
Show the name of the container with log output. May not apply to all providers
--show-tags
boolean
Show any tags attached to each log line. May not apply to all providers
--timestamps
boolean
Show timestamps with log output.
--since
moment
Only show logs newer than a relative duration like 5s, 2m, or 3h. Defaults to `"1m"` when `--follow` is true unless `--tail` is set. Note that we don't recommend using a large value here when in follow mode.
--hide-service
boolean
Hide the service name and render the logs directly.
garden migrate
Migrate garden.yml configuration files to version 0.12
Scans the project for garden.yml configuration files and updates those that are not compatible with version 0.12. By default the command prints the updated versions to the terminal. You can optionally update the files in place with the write flag.
Note: This command does not validate the configs per se. It will simply try to convert a given configuration file so that it is compatible with version 0.12 or greater, regardless of whether that file was ever a valid Garden config. It is therefore recommended that this is used on existing garden.yml files that were valid in version v0.10.x.
Examples:
Usage
Arguments
configPaths
No
Specify the path to a `garden.yml` file to convert. Use comma as a separator to specify multiple files.
Options
--write
boolean
Update the `garden.yml` in place.
garden options
Print global options.
Prints all global options (options that can be applied to any command).
Usage
garden plugins
Plugin-specific commands.
Execute a command defined by a plugin in your project. Run without arguments to get a list of all plugin commands available. Run with just the plugin name to get a list of commands provided by that plugin.
Examples:
Usage
Arguments
plugin
No
The name of the plugin, whose command you wish to run.
command
No
The name of the command to run.
garden publish
Build and publish module(s) (e.g. container images) to a remote registry.
Publishes built module artifacts for all or specified modules. Also builds modules and build dependencies if needed.
By default the artifacts/images are tagged with the Garden module version, but you can also specify the --tag option to specify a specific string tag or a templated tag. Any template values that can be used on the module being tagged are available, in addition to ${module.name}, ${module.version} and ${module.hash} tags that allows referencing the name of the module being tagged, as well as its Garden version. ${module.version} includes the "v-" prefix normally used for Garden versions, and ${module.hash} doesn't.
Examples:
Usage
Arguments
modules
No
The name(s) of the module(s) to publish (skip to publish all modules). Use comma as a separator to specify multiple modules.
Options
--force-build
boolean
Force rebuild of module(s) before publishing.
--allow-dirty
boolean
Allow publishing dirty builds (with untracked/uncommitted changes).
--tag
string
Override the tag on the built artifacts. You can use the same sorts of template strings as when templating values in module configs, with the addition of ${module.*} tags, allowing you to reference the name and Garden version of the module being tagged.
Outputs
garden run module
Run an ad-hoc instance of a module.
This is useful for debugging or ad-hoc experimentation with modules.
Examples:
Usage
Arguments
module
Yes
The name of the module to run.
arguments
No
The arguments to run the module with. Example: 'yarn run my-script'.
Options
--interactive
boolean
Set to false to skip interactive mode and just output the command result.
--force-build
boolean
Force rebuild of module before running.
--command
-c
string
The base command (a.k.a. entrypoint) to run in the module. For container modules, for example, this overrides the image's default command/entrypoint. This option may not be relevant for all module types. Example: '/bin/sh -c'.
garden run service
Run an ad-hoc instance of the specified service.
This can be useful for debugging or ad-hoc experimentation with services.
Examples:
Usage
Arguments
service
Yes
The service to run.
Options
--force
boolean
Run the service even if it's disabled for the environment.
--force-build
boolean
Force rebuild of module.
garden run task
Run a task (in the context of its parent module).
This is useful for re-running tasks ad-hoc, for example after writing/modifying database migrations.
Examples:
Usage
Arguments
task
Yes
The name of the task to run.
Options
--force
boolean
Run the task even if it's disabled for the environment.
--force-build
boolean
Force rebuild of module before running.
Outputs
garden run test
Run the specified module test.
This can be useful for debugging tests, particularly integration/end-to-end tests.
Examples:
Usage
Arguments
module
Yes
The name of the module to run.
test
Yes
The name of the test to run in the module.
Options
--interactive
-i
boolean
Set to false to skip interactive mode and just output the command result. Note that Garden won't retrieve artifacts if set to true (the default).
--force
boolean
Run the test even if it's disabled for the environment.
--force-build
boolean
Force rebuild of module before running.
Outputs
garden run workflow
Run a workflow.
Runs the commands and/or scripts defined in the workflow's steps, in sequence.
Examples:
Usage
Arguments
workflow
Yes
The name of the workflow to be run.
garden scan
Scans your project and outputs an overview of all modules.
Usage
garden dashboard
[DEPRECATED] Starts the Garden dashboard for the current project and environment.
Deprecation Warning: The Garden Dashboard will be deprecated in the next major Garden release (0.13). As an alternative you can try out a beta version of Garden Cloud Dashboard at https://app.garden.io.
Starts the Garden dashboard for the current project, and your selected environment+namespace. The dashboard can be used to monitor your Garden project, look at logs, provider-specific dashboard pages and more.
The dashboard will receive and display updates from other Garden processes that you run with the same Garden project, environment and namespace.
Note: You must currently run one dashboard per-environment and namespace.
Usage
Options
--port
number
The port number for the Garden dashboard to listen on.
garden self-update
Update the Garden CLI.
Updates your Garden CLI in-place.
Defaults to the latest minor release version, but you can also request a specific release version as an argument.
Examples:
garden self-update # update to the latest minor Garden CLI version garden self-update edge-acorn # switch to the latest edge build of garden 0.12 (which is created anytime a PR is merged to the 0.12 branch) garden self-update edge-bonsai # switch to the latest edge build of garden Bonsai (0.13) (which is created anytime a PR is merged to main) garden self-update 0.12.24 # switch to the exact version 0.12.24 of the CLI garden self-update --major # install the latest version, even if it's a major bump garden self-update --force # re-install even if the same version is detected garden self-update --install-dir ~/garden # install to ~/garden instead of detecting the directory
Usage
Arguments
version
No
Specify which version to switch/update to. It can be either a stable release, a pre-release, or an edge release version.
Options
--force
boolean
Install the Garden CLI even if the specified or detected latest version is the same as the current version.
--install-dir
string
Specify an installation directory, instead of using the directory of the Garden CLI being used. Implies --force.
--platform
macos linux windows
Override the platform, instead of detecting it automatically.
--major
boolean
Install the latest major version of Garden. Falls back to the current version if the greater major version does not exist.
Note! If you use a non-stable version (i.e. pre-release, or draft, or edge), then the latest possible major version will be installed.
garden test
Test all or specified modules.
Runs all or specified tests defined in the project. Also builds modules and dependencies, and deploys service dependencies if needed.
Optionally stays running and automatically re-runs tests if their module source (or their dependencies' sources) change.
Examples:
Usage
Arguments
modules
No
The name(s) of the module(s) to test (skip to test all modules). Use comma as a separator to specify multiple modules.
Options
--name
-n
array:string
Only run tests with the specfied name (e.g. unit or integ). Accepts glob patterns (e.g. integ* would run both 'integ' and 'integration').
--force
-f
boolean
Force re-test of module(s).
--force-build
boolean
Force rebuild of module(s).
--watch
-w
boolean
Watch for changes in module(s) and auto-test.
--skip
array:string
The name(s) of tests you'd like to skip. Accepts glob patterns (e.g. integ* would skip both 'integ' and 'integration'). Applied after the 'name' filter.
--skip-dependencies
--nodeps
boolean
Don't deploy any services or run any tasks that the requested tests depend on. This can be useful e.g. when your stack has already been deployed, and you want to run tests with runtime dependencies without redeploying any service dependencies that may have changed since you last deployed. Warning: Take great care when using this option in CI, since Garden won't ensure that the runtime dependencies of your test suites are up to date when this option is used.
--skip-dependants
boolean
When using the modules argument, only run tests for those modules (and skip tests in other modules with dependencies on those modules).
Outputs
garden tools
Access tools included by providers.
Run a tool defined by a provider in your project, downloading and extracting it if necessary. Run without arguments to get a list of all tools available.
Run with the --get-path flag to just print the path to the binary or library directory (depending on the tool type). If the tool is a non-executable library, this flag is implicit.
When multiple plugins provide a tool with the same name, you can choose a specific plugin/version by specifying ., instead of just . This is generally advisable when using this command in scripts, to avoid accidental conflicts.
When there are name conflicts and a plugin name is not specified, we first prefer tools defined by configured providers in the current project (if applicable), and then alphabetical by plugin name.
Examples:
Usage
Arguments
tool
No
The name of the tool to run.
Options
--get-path
boolean
If specified, we print the path to the binary or library instead of running it.
garden unlink source
Unlink a previously linked remote source from its local directory.
After unlinking a remote source, Garden will go back to reading it from its remote URL instead of its local directory.
Examples:
Usage
Arguments
sources
No
The name(s) of the source(s) to unlink. Use comma as a separator to specify multiple sources.
Options
--all
-a
boolean
Unlink all sources.
garden unlink module
Unlink a previously linked remote module from its local directory.
After unlinking a remote module, Garden will go back to reading the module's source from its remote URL instead of its local directory.
Examples:
Usage
Arguments
modules
No
The name(s) of the module(s) to unlink. Use comma as a separator to specify multiple modules.
Options
--all
-a
boolean
Unlink all modules.
garden update-remote sources
Update remote sources.
Updates the remote sources declared in the project level garden.yml config file.
Examples:
Usage
Arguments
sources
No
The name(s) of the remote source(s) to update. Use comma as a separator to specify multiple sources.
Options
--parallel
boolean
Allow git updates to happen in parallel. This will automatically reject any Git prompt, such as username / password.
Outputs
garden update-remote modules
Update remote modules.
Updates remote modules, i.e. modules that have a repositoryUrl field in their garden.yml config that points to a remote repository.
Examples:
Usage
Arguments
modules
No
The name(s) of the remote module(s) to update. Use comma as a separator to specify multiple modules.
Options
--parallel
boolean
Allow git updates to happen in parallel. This will automatically reject any Git prompt, such as username / password.
Outputs
garden update-remote all
Update all remote sources and modules.
Examples:
Usage
Options
--parallel
boolean
Allow git updates to happen in parallel. This will automatically reject any Git prompt, such as username / password.
Outputs
garden util fetch-tools
Pre-fetch plugin tools.
Pre-fetch all the available tools for the configured providers in the current project/environment, or all registered providers if the --all parameter is specified.
Examples:
Usage
Options
--all
boolean
Fetch all tools for registered plugins, instead of just ones in the current env/project.
garden util hide-warning
Hide a specific warning message.
Hides the specified warning message. The command and key is generally provided along with displayed warning messages.
Usage
Arguments
key
Yes
The key of the warning to hide (this will be shown along with relevant warning messages).
garden validate
Check your garden configuration for errors.
Throws an error and exits with code 1 if something's not right in your garden.yml files.
Usage
Last updated
Was this helpful?

