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:
Argument
Alias
Type
Description
--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 fullscreen 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:
1
garden build # build all modules in the project
2
garden build my-module # only build my-module
3
garden build --force # force rebuild of modules
4
garden build --watch # watch for changes to code
Copied!
Supported in workflows
​
Yes
​

Usage

1
garden build [modules] [options]
Copied!

Arguments

Argument
Required
Description
modules
No
Specify module(s) to build. Use comma as a separator to specify multiple modules.

Options

Argument
Alias
Type
Description
--force
-f
boolean
Force rebuild of module(s).
--watch
-w
boolean
Watch for changes in module(s) and auto-build.

Outputs

1
# A map of all modules that were built (or builds scheduled/attempted for) and information about the builds.
2
builds:
3
<module name>:
4
# The full log from the build.
5
buildLog:
6
​
7
# Set to true if the build was fetched from a remote registry.
8
fetched:
9
​
10
# Set to true if the build was performed, false if it was already built, or fetched from a registry
11
fresh:
12
​
13
# Additional information, specific to the provider.
14
details:
15
​
16
# Set to true if the build was not attempted, e.g. if a dependency build failed.
17
aborted:
18
​
19
# The duration of the build in msec, if applicable.
20
durationMsec:
21
​
22
# Whether the build was succeessful.
23
success:
24
​
25
# An error message, if the build failed.
26
error:
27
​
28
# The version of the module, service, task or test.
29
version:
30
​
31
# A map of all services that were deployed (or deployment scheduled/attempted for) and the service status.
32
deployments:
33
<service name>:
34
# When the service was first deployed by the provider.
35
createdAt:
36
​
37
# Additional detail, specific to the provider.
38
detail:
39
​
40
namespaceStatuses:
41
- pluginName:
42
​
43
# Valid RFC1035/RFC1123 (DNS) label (may contain lowercase letters, numbers and dashes, must start with a
44
# letter, and cannot end with a dash) and must not be longer than 63 characters.
45
namespaceName:
46
​
47
state:
48
​
49
# The ID used for the service by the provider (if not the same as the service name).
50
externalId:
51
​
52
# The provider version of the deployed service (if different from the Garden module version.
53
externalVersion:
54
​
55
# A list of ports that can be forwarded to from the Garden agent by the provider.
56
forwardablePorts:
57
- # A descriptive name for the port. Should correspond to user-configured ports where applicable.
58
name:
59
​
60
# The preferred local port to use for forwarding.
61
preferredLocalPort:
62
​
63
# The protocol of the port.
64
protocol:
65
​
66
# The target name/hostname to forward to (defaults to the service name).
67
targetName:
68
​
69
# The target port on the service.
70
targetPort:
71
​
72
# The protocol to use for URLs pointing at the port. This can be any valid URI protocol.
73
urlProtocol:
74
​
75
# List of currently deployed ingress endpoints for the service.
76
ingresses:
77
- # The ingress path that should be matched to route to this service.
78
path:
79
​
80
# The protocol to use for the ingress.
81
protocol:
82
​
83
# The hostname where the service can be accessed.
84
hostname:
85
​
86
# The port number that the service is exposed on internally.
87
# This defaults to the first specified port for the service.
88
port:
89
​
90
# Latest status message of the service (if any).
91
lastMessage:
92
​
93
# Latest error status message of the service (if any).
94
lastError:
95
​
96
# A map of values output from the service.
97
outputs:
98
<name>:
99
​
100
# How many replicas of the service are currently running.
101
runningReplicas:
102
​
103
# The current deployment status of the service.
104
state:
105
​
106
# When the service was last updated by the provider.
107
updatedAt:
108
​
109
# Set to true if the build was not attempted, e.g. if a dependency build failed.
110
aborted:
111
​
112
# The duration of the build in msec, if applicable.
113
durationMsec:
114
​
115
# Whether the build was succeessful.
116
success:
117
​
118
# An error message, if the build failed.
119
error:
120
​
121
# The version of the module, service, task or test.
122
version:
123
​
124
# A map of all tests that were run (or scheduled/attempted) and the test results.
125
tests:
126
<test name>:
127
# The name of the module that was run.
128
moduleName:
129
​
130
# The command that was run in the module.
131
command:
132
​
133
# The exit code of the run (if applicable).
134
exitCode:
135
​
136
# When the module run was started.
137
startedAt:
138
​
139
# When the module run was completed.
140
completedAt:
141
​
142
# The output log from the run.
143
log:
144
​
145
namespaceStatus:
146
pluginName:
147
​
148
# Valid RFC1035/RFC1123 (DNS) label (may contain lowercase letters, numbers and dashes, must start with a
149
# letter, and cannot end with a dash) and must not be longer than 63 characters.
150
namespaceName:
151
​
152
state:
153
​
154
# A map of primitive values, output from the test.
155
outputs:
156
# Number, string or boolean
157
<name>:
158
​
159
# The name of the test that was run.
160
testName:
161
​
162
# Set to true if the build was not attempted, e.g. if a dependency build failed.
163
aborted:
164
​
165
# The duration of the build in msec, if applicable.
166
durationMsec:
167
​
168
# Whether the build was succeessful.
169
success:
170
​
171
# An error message, if the build failed.
172
error:
173
​
174
# The version of the module, service, task or test.
175
version:
176
​
177
# A map of all raw graph results. Avoid using this programmatically if you can, and use more structured keys instead.
178
graphResults:
Copied!

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:
1
garden call my-container
2
garden call my-container/some-path
Copied!
Note: Currently only supports simple GET requests for HTTP/HTTPS ingresses.
Supported in workflows
​
No
​

Usage

1
garden call <serviceAndPath>
Copied!

Arguments

Argument
Required
Description
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:
1
garden config analytics-enabled true # enable analytics
2
garden config analytics-enabled false # disable analytics
Copied!
Supported in workflows
​
No
​

Usage

1
garden config analytics-enabled [enable]
Copied!

Arguments

Argument
Required
Description
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:
1
garden create project # create a Garden project config in the current directory
2
garden create project --dir some-dir # create a Garden project config in the ./some-dir directory
3
garden create project --name my-project # set the project name to my-project
4
garden create project --interactive=false # don't prompt for user inputs when creating the config
Copied!
Supported in workflows
​
No
​

Usage

1
garden create project [options]
Copied!

Options

Argument
Alias
Type
Description
--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:
1
garden create module # create a Garden module config in the current directory
2
garden create module --dir some-dir # create a Garden module config in the ./some-dir directory
3
garden create module --name my-module # set the module name to my-module
4
garden create module --interactive=false # don't prompt for user inputs when creating the module
Copied!
Supported in workflows
​
No
​

Usage

1
garden create module [options]
Copied!

Options

Argument
Alias
Type
Description
--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:
1
garden delete secret kubernetes somekey
2
garden del secret local-kubernetes some-other-key
Copied!
Supported in workflows
​
No
​

Usage

1
garden delete secret <provider> <key>
Copied!

Arguments

Argument
Required
Description
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.
Supported in workflows
​
Yes
​

Usage

1
garden delete environment
Copied!

Outputs

1
# The status of each provider in the environment.
2
providerStatuses:
3
# Description of an environment's status for a provider.
4
<name>:
5
# Set to true if the environment is fully configured for a provider.
6
ready:
7
​
8
# Use this to include additional information that is specific to the provider.
9
detail:
10
​
11
namespaceStatuses:
12
- pluginName:
13
​
14
# Valid RFC1035/RFC1123 (DNS) label (may contain lowercase letters, numbers and dashes, must start with a
15
# letter, and cannot end with a dash) and must not be longer than 63 characters.
16
namespaceName:
17
​
18
state:
19
​
20
# Output variables that modules and other variables can reference.
21
outputs:
22
<name>:
23
​
24
# Set to true to disable caching of the status.
25
disableCache:
26
​
27
# The status of each service in the environment.
28
serviceStatuses:
29
<name>:
30
# When the service was first deployed by the provider.
31
createdAt:
32
​
33
# Additional detail, specific to the provider.
34
detail:
35
​
36
namespaceStatuses:
37
- pluginName:
38
​
39
# Valid RFC1035/RFC1123 (DNS) label (may contain lowercase letters, numbers and dashes, must start with a
40
# letter, and cannot end with a dash) and must not be longer than 63 characters.
41
namespaceName:
42
​
43
state:
44
​
45
# The ID used for the service by the provider (if not the same as the service name).
46
externalId:
47
​
48
# The provider version of the deployed service (if different from the Garden module version.
49
externalVersion:
50
​
51
# A list of ports that can be forwarded to from the Garden agent by the provider.
52
forwardablePorts:
53
- # A descriptive name for the port. Should correspond to user-configured ports where applicable.
54
name:
55
​
56
# The preferred local port to use for forwarding.
57
preferredLocalPort:
58
​
59
# The protocol of the port.
60
protocol:
61
​
62
# The target name/hostname to forward to (defaults to the service name).
63
targetName:
64
​
65
# The target port on the service.
66
targetPort:
67
​
68
# The protocol to use for URLs pointing at the port. This can be any valid URI protocol.
69
urlProtocol:
70
​
71
# List of currently deployed ingress endpoints for the service.
72
ingresses:
73
- # The ingress path that should be matched to route to this service.
74
path:
75
​
76
# The protocol to use for the ingress.
77
protocol:
78
​
79
# The hostname where the service can be accessed.
80
hostname:
81
​
82
# The port number that the service is exposed on internally.
83
# This defaults to the first specified port for the service.
84
port:
85
​
86
# Latest status message of the service (if any).
87
lastMessage:
88
​
89
# Latest error status message of the service (if any).
90
lastError:
91
​
92
# A map of values output from the service.
93
outputs:
94
<name>:
95
​
96
# How many replicas of the service are currently running.
97
runningReplicas:
98
​
99
# The current deployment status of the service.
100
state:
101
​
102
# When the service was last updated by the provider.
103
updatedAt:
104
​
105
# The Garden module version of the deployed service.
106
version:
Copied!

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:
1
garden delete service my-service # deletes my-service
2
garden delete service # deletes all deployed services in the project
Copied!
Supported in workflows
​
Yes
​

Usage

1
garden delete service [services]
Copied!

Arguments

Argument
Required
Description
services
No
The name(s) of the service(s) to delete. Use comma as a separator to specify multiple services.

Outputs

1
<name>:
2
# When the service was first deployed by the provider.
3
createdAt:
4
​
5
# Additional detail, specific to the provider.
6
detail:
7
​
8
namespaceStatuses:
9
- pluginName:
10
​
11
# Valid RFC1035/RFC1123 (DNS) label (may contain lowercase letters, numbers and dashes, must start with a
12
# letter, and cannot end with a dash) and must not be longer than 63 characters.
13
namespaceName:
14
​
15
state:
16
​
17
# The ID used for the service by the provider (if not the same as the service name).
18
externalId:
19
​
20
# The provider version of the deployed service (if different from the Garden module version.
21
externalVersion:
22
​
23
# A list of ports that can be forwarded to from the Garden agent by the provider.
24
forwardablePorts:
25
- # A descriptive name for the port. Should correspond to user-configured ports where applicable.
26
name:
27
​
28
# The preferred local port to use for forwarding.
29
preferredLocalPort:
30
​
31
# The protocol of the port.
32
protocol:
33
​
34
# The target name/hostname to forward to (defaults to the service name).
35
targetName:
36
​
37
# The target port on the service.
38
targetPort:
39
​
40
# The protocol to use for URLs pointing at the port. This can be any valid URI protocol.
41
urlProtocol:
42
​
43
# List of currently deployed ingress endpoints for the service.
44
ingresses:
45
- # The ingress path that should be matched to route to this service.
46
path:
47
​
48
# The protocol to use for the ingress.
49
protocol:
50
​
51
# The hostname where the service can be accessed.
52
hostname:
53
​
54
# The port number that the service is exposed on internally.
55
# This defaults to the first specified port for the service.
56
port:
57
​
58
# Latest status message of the service (if any).
59
lastMessage:
60
​
61
# Latest error status message of the service (if any).
62
lastError:
63
​
64
# A map of values output from the service.
65
outputs:
66
<name>:
67
​
68
# How many replicas of the service are currently running.
69
runningReplicas:
70
​
71
# The current deployment status of the service.
72
state:
73
​
74
# When the service was last updated by the provider.
75
updatedAt:
76
​
77
# The Garden module version of the deployed service.
78
version:
Copied!

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:
1
garden deploy # deploy all modules in the project
2
garden deploy my-service # only deploy my-service
3
garden deploy service-a,service-b # only deploy service-a and service-b
4
garden deploy --force # force re-deploy of modules, even if they're already deployed
5
garden deploy --watch # watch for changes to code
6
garden deploy --dev=my-service # deploys all services, with dev mode enabled for my-service
7
garden deploy --dev # deploys all compatible services with dev mode enabled
8
garden deploy --env stage # deploy your services to an environment called stage
9
garden deploy --skip service-b # deploy all services except service-b
Copied!
Supported in workflows
​
Yes
​

Usage

1
garden deploy [services] [options]
Copied!

Arguments

Argument
Required
Description
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

Argument
Alias
Type
Description
--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
[EXPERIMENTAL] 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).
--skip
​
array:string
The name(s) of services you'd like to skip when deploying.
--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.

Outputs

1
# A map of all modules that were built (or builds scheduled/attempted for) and information about the builds.
2
builds:
3
<module name>:
4
# The full log from the build.
5
buildLog:
6
​
7
# Set to true if the build was fetched from a remote registry.
8
fetched:
9
​
10
# Set to true if the build was performed, false if it was already built, or fetched from a registry
11
fresh:
12
​
13
# Additional information, specific to the provider.
14
details:
15
​
16
# Set to true if the build was not attempted, e.g. if a dependency build failed.
17
aborted:
18
​
19
# The duration of the build in msec, if applicable.
20
durationMsec:
21
​
22
# Whether the build was succeessful.
23
success:
24
​
25
# An error message, if the build failed.
26
error:
27
​
28
# The version of the module, service, task or test.
29
version:
30
​
31
# A map of all services that were deployed (or deployment scheduled/attempted for) and the service status.
32
deployments:
33
<service name>:
34
# When the service was first deployed by the provider.
35
createdAt:
36
​
37
# Additional detail, specific to the provider.
38
detail:
39
​
40
namespaceStatuses:
41
- pluginName:
42
​
43
# Valid RFC1035/RFC1123 (DNS) label (may contain lowercase letters, numbers and dashes, must start with a
44
# letter, and cannot end with a dash) and must not be longer than 63 characters.
45
namespaceName:
46
​
47
state:
48
​
49
# The ID used for the service by the provider (if not the same as the service name).
50
externalId:
51
​
52
# The provider version of the deployed service (if different from the Garden module version.
53
externalVersion:
54
​
55
# A list of ports that can be forwarded to from the Garden agent by the provider.
56
forwardablePorts:
57
- # A descriptive name for the port. Should correspond to user-configured ports where applicable.
58
name:
59
​
60
# The preferred local port to use for forwarding.
61
preferredLocalPort:
62
​
63
# The protocol of the port.
64
protocol:
65
​
66
# The target name/hostname to forward to (defaults to the service name).
67
targetName:
68
​
69
# The target port on the service.
70
targetPort:
71
​
72
# The protocol to use for URLs pointing at the port. This can be any valid URI protocol.
73
urlProtocol:
74
​
75
# List of currently deployed ingress endpoints for the service.
76
ingresses:
77
- # The ingress path that should be matched to route to this service.
78
path:
79
​
80
# The protocol to use for the ingress.
81
protocol:
82
​
83
# The hostname where the service can be accessed.
84
hostname:
85
​
86
# The port number that the service is exposed on internally.
87
# This defaults to the first specified port for the service.
88
port:
89
​
90
# Latest status message of the service (if any).
91
lastMessage:
92
​
93
# Latest error status message of the service (if any).
94
lastError:
95
​
96
# A map of values output from the service.
97
outputs:
98
<name>:
99
​
100
# How many replicas of the service are currently running.
101
runningReplicas:
102
​
103
# The current deployment status of the service.
104
state:
105
​
106
# When the service was last updated by the provider.
107
updatedAt:
108
​
109
# Set to true if the build was not attempted, e.g. if a dependency build failed.
110
aborted:
111
​
112
# The duration of the build in msec, if applicable.
113
durationMsec:
114
​
115
# Whether the build was succeessful.
116
success:
117
​
118
# An error message, if the build failed.
119
error:
120
​
121
# The version of the module, service, task or test.
122
version:
123
​
124
# A map of all tests that were run (or scheduled/attempted) and the test results.
125
tests:
126
<test name>:
127
# The name of the module that was run.
128
moduleName:
129
​
130
# The command that was run in the module.
131
command:
132
​
133
# The exit code of the run (if applicable).
134
exitCode:
135
​
136
# When the module run was started.
137
startedAt:
138
​
139
# When the module run was completed.
140
completedAt:
141
​
142
# The output log from the run.
143
log:
144
​
145
namespaceStatus:
146
pluginName:
147
​
148
# Valid RFC1035/RFC1123 (DNS) label (may contain lowercase letters, numbers and dashes, must start with a
149
# letter, and cannot end with a dash) and must not be longer than 63 characters.
150
namespaceName:
151
​
152
state:
153
​
154
# A map of primitive values, output from the test.
155
outputs:
156
# Number, string or boolean
157
<name>:
158
​
159
# The name of the test that was run.
160
testName:
161
​
162
# Set to true if the build was not attempted, e.g. if a dependency build failed.
163
aborted:
164
​
165
# The duration of the build in msec, if applicable.
166
durationMsec:
167
​
168
# Whether the build was succeessful.
169
success:
170
​
171
# An error message, if the build failed.
172
error:
173
​
174
# The version of the module, service, task or test.
175
version:
176
​
177
# A map of all raw graph results. Avoid using this programmatically if you can, and use more structured keys instead.
178
graphResults:
Copied!

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:
1
garden dev
2
garden dev --hot=foo-service,bar-service # enable hot reloading for foo-service and bar-service
3
garden dev --hot=* # enable hot reloading for all compatible services
4
garden dev --skip-tests= # skip running any tests
5
garden dev --name integ # run all tests with the name 'integ' in the project
6
garden test --name integ* # run all tests with the name starting with 'integ' in the project
Copied!
Supported in workflows
​
No
​

Usage

1
garden dev [services] [options]
Copied!

Arguments

Argument
Required
Description
services
No
Specify which services to develop (defaults to all configured services).

Options

Argument
Alias
Type
Description
--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).
--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').

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:
1
garden exec my-service /bin/sh # runs a shell in the my-service container
Copied!
Supported in workflows
​
Yes
​

Usage

1
garden exec <service> <command> [options]
Copied!

Arguments

Argument
Required
Description
service
Yes
The service to exec the command in.
command
Yes
The command to run.

Options

Argument
Alias
Type
Description
--interactive
​
boolean
Set to false to skip interactive mode and just output the command result

Outputs

1
# The exit code of the command executed in the service container.
2
code:
3
​
4
# The output of the executed command.
5
output:
6
​
7
# The stdout output of the executed command (if available).
8
stdout:
9
​
10
# The stderr output of the executed command (if available).
11
stderr:
Copied!

garden enterprise secrets list

[EXPERIMENTAL] List secrets.
List all secrets from Garden Enterprise. Optionally filter on environment, user IDs, or secret names.
Examples: garden enterprise secrets list # list all secrets garden enterprise secrets list --filter-envs dev # list all secrets from the dev environment garden enterprise secrets list --filter-envs dev --filter-names DB # list all secrets from the dev environment that have 'DB' in their name.
Supported in workflows
​
No
​

Usage

1
garden enterprise secrets list [options]
Copied!

Options

Argument
Alias
Type
Description
--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 enterprise secrets create

[EXPERIMENTAL] Create secrets
Create secrets in Garden Enterprise. 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 enterprise users list command.
You can optionally read the secrets from a file.
Examples: garden enterprise secrets create DB_PASSWORD=my-pwd,ACCESS_KEY=my-key # create two secrets garden enterprise secrets create ACCESS_KEY=my-key --scope-to-env ci # create a secret and scope it to the ci environment garden enterprise 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 enterprise secrets create --from-file /path/to/secrets.txt # create secrets from the key value pairs in the secrets.txt file
Supported in workflows
​
No
​

Usage

1
garden enterprise secrets create [secrets] [options]
Copied!

Arguments

Argument
Required
Description
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

Argument
Alias
Type
Description
--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 enterprise secrets delete

[EXPERIMENTAL] Delete secrets.
Delete secrets in Garden Enterprise. You will nee the IDs of the secrets you want to delete, which you which you can get from the garden enterprise secrets list command.
Examples: garden enterprise secrets delete 1,2,3 # delete secrets with IDs 1,2, and 3.
Supported in workflows
​
No
​

Usage

1
garden enterprise secrets delete [ids]
Copied!

Arguments

Argument
Required
Description
ids
No
The IDs of the secrets to delete.

garden enterprise users list

[EXPERIMENTAL] List users.
List all users from Garden Enterprise. Optionally filter on group names or user names.
Examples: garden enterprise users list # list all users garden enterprise users list --filter-names Gordon # list all the Gordons in Garden Enterprise. Useful if you have a lot of Gordons. garden enterprise users list --filter-groups devs- # list all users in groups that with names that start with 'dev-'
Supported in workflows
​
No
​

Usage

1
garden enterprise users list [options]
Copied!

Options

Argument
Alias
Type
Description
--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 enterprise users create

[EXPERIMENTAL] Create users
Create users in Garden Enterprise and optionally add the users to specific groups. You can get the group IDs from the garden enterprise 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 Enterprise. 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 enterprise users create fatema_m="Fatema M",gordon99="Gordon G" # create two users garden enterprise users create fatema_m="Fatema M" --add-to-groups 1,2 # create a user and add two groups with IDs 1,2 garden enterprise users create --from-file /path/to/users.txt # create users from the key value pairs in the users.txt file
Supported in workflows
​
No
​

Usage

1
garden enterprise users create [users] [options]
Copied!

Arguments

Argument
Required
Description
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

Argument
Alias
Type
Description
--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