Search…
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 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!

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.
--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

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

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!

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!

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!

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!

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.

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
# Whether the service was deployed with dev mode enabled.
37
devMode:
38
​
39
namespaceStatuses:
40
- pluginName:
41
​
42
# Valid RFC1035/RFC1123 (DNS) label (may contain lowercase letters, numbers and dashes, must start with a
43
# letter, and cannot end with a dash) and must not be longer than 63 characters.
44
namespaceName:
45
​
46
state:
47
​
48
# The ID used for the service by the provider (if not the same as the service name).
49
externalId:
50
​
51
# The provider version of the deployed service (if different from the Garden module version.
52
externalVersion:
53
​
54
# A list of ports that can be forwarded to from the Garden agent by the provider.
55
forwardablePorts:
56
- # A descriptive name for the port. Should correspond to user-configured ports where applicable.
57
name:
58
​
59
# The preferred local port to use for forwarding.
60
preferredLocalPort:
61
​
62
# The protocol of the port.
63
protocol:
64
​
65
# The target name/hostname to forward to (defaults to the service name).
66
targetName:
67
​
68
# The target port on the service.
69
targetPort:
70
​
71
# The protocol to use for URLs pointing at the port. This can be any valid URI protocol.
72
urlProtocol:
73
​
74
# List of currently deployed ingress endpoints for the service.
75
ingresses:
76
- # The port number that the service is exposed on internally.
77
# This defaults to the first specified port for the service.
78
port:
79
​
80
# The ingress path that should be matched to route to this service.
81
path:
82
​
83
# The protocol to use for the ingress.
84
protocol:
85
​
86
# The hostname where the service can be accessed.
87
hostname:
88
​
89
# Latest status message of the service (if any).
90
lastMessage:
91
​
92
# Latest error status message of the service (if any).
93
lastError:
94
​
95
# A map of values output from the service.
96
outputs:
97
<name>:
98
​
99
# How many replicas of the service are currently running.
100
runningReplicas:
101
​
102
# The current deployment status of the service.
103
state:
104
​
105
# When the service was last updated by the provider.
106
updatedAt:
107
​
108
# The Garden module version of the deployed service.
109
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!

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
# Whether the service was deployed with dev mode enabled.
9
devMode:
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
# The ID used for the service by the provider (if not the same as the service name).
21
externalId:
22
​
23
# The provider version of the deployed service (if different from the Garden module version.
24
externalVersion:
25
​
26
# A list of ports that can be forwarded to from the Garden agent by the provider.
27
forwardablePorts:
28
- # A descriptive name for the port. Should correspond to user-configured ports where applicable.
29
name:
30
​
31
# The preferred local port to use for forwarding.
32
preferredLocalPort:
33
​
34
# The protocol of the port.
35
protocol:
36
​
37
# The target name/hostname to forward to (defaults to the service name).
38
targetName:
39
​
40
# The target port on the service.
41
targetPort:
42
​
43
# The protocol to use for URLs pointing at the port. This can be any valid URI protocol.
44
urlProtocol:
45
​
46
# List of currently deployed ingress endpoints for the service.
47
ingresses:
48
- # The port number that the service is exposed on internally.
49
# This defaults to the first specified port for the service.
50
port:
51
​
52
# The ingress path that should be matched to route to this service.
53
path:
54
​
55
# The protocol to use for the ingress.
56
protocol:
57
​
58
# The hostname where the service can be accessed.
59
hostname:
60
​
61
# Latest status message of the service (if any).
62
lastMessage:
63
​
64
# Latest error status message of the service (if any).
65
lastError:
66
​
67
# A map of values output from the service.
68
outputs:
69
<name>:
70
​
71
# How many replicas of the service are currently running.
72
runningReplicas:
73
​
74
# The current deployment status of the service.
75
state:
76
​
77
# When the service was last updated by the provider.
78
updatedAt:
79
​
80
# The Garden module version of the deployed service.
81
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!

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.
--skip-dependencies
-no-deps
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.

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

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
--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).
--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!

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 cloud secrets list

[EXPERIMENTAL] 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

1
garden cloud 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 cloud secrets create

[EXPERIMENTAL] 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

1
garden cloud 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 cloud secrets delete

[EXPERIMENTAL] Delete secrets.
Delete secrets in Garden Cloud. You will nee 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 1,2,3 # delete secrets with IDs 1,2, and 3.

Usage

1
garden cloud secrets delete [ids]
Copied!

Arguments

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

garden cloud users list

[EXPERIMENTAL] 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

1
garden cloud 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 cloud users create

[EXPERIMENTAL] 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

1
garden cloud 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 dotenv) where the VCS username is the key and the name is the value.

garden cloud users delete

[EXPERIMENTAL] Delete users.
Delete users in Garden Cloud. You will nee the IDs of the users you want to delete, which you which you can get from the garden cloud users list command.
Examples: garden cloud users delete 1,2,3 # delete users with IDs 1,2, and 3.

Usage

1
garden cloud users delete [ids]
Copied!

Arguments

Argument
Required
Description
ids
No