Skip to content

Commit f4c1f66

Browse files
committed
docs: generate cli reference
1 parent 4ddb406 commit f4c1f66

63 files changed

Lines changed: 487 additions & 947 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/hack/cli/main.go

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ import (
1515
"github.com/spf13/cobra/doc"
1616
)
1717

18-
const cliDocsDir = "./docs/pages/commands"
18+
const cliDocsDir = "./docs/pages/cli"
1919
const headerTemplate = `---
20-
title: "%s"
20+
title: "%s --help"
2121
sidebar_label: %s
2222
---
2323
@@ -46,11 +46,14 @@ func main() {
4646
}
4747
}
4848

49-
return fmt.Sprintf(headerTemplate, "Command - "+title, sidebarLabel)
49+
return fmt.Sprintf(headerTemplate, title, sidebarLabel)
5050
}
5151

5252
linkHandler := func(name string) string {
5353
base := strings.TrimSuffix(name, path.Ext(name))
54+
if base == "devspace" {
55+
base = "README"
56+
}
5457
return strings.ToLower(base) + ".md"
5558
}
5659

@@ -87,6 +90,10 @@ func main() {
8790
return err
8891
}
8992

93+
if info.Name() == "devspace.md" {
94+
os.Rename(path, filepath.Join(cliDocsDir, "..", "cli.md"))
95+
}
96+
9097
return nil
9198
})
9299
if err != nil {
Lines changed: 7 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,27 @@
11
---
2-
title: "Command - devspace"
2+
title: "devspace --help"
33
sidebar_label: devspace
44
---
55

6-
## devspace
7-
8-
Welcome to the DevSpace!
9-
106
### Synopsis
11-
7+
```
128
DevSpace accelerates developing, deploying and debugging applications with Docker and Kubernetes. Get started by running the init command in one of your projects:
139
1410
devspace init
11+
```
1512

16-
### Options
17-
13+
### Global Flags
1814
```
19-
--config string The devspace config file to use
2015
--debug Prints the stack trace if an error occurs
2116
--disable-profile-activation If true will ignore all profile activations
2217
-h, --help help for devspace
23-
--inactivity-timeout int Minutes the current user is inactive (no mouse or keyboard interaction) until DevSpace will exit automatically. 0 to disable. Only supported on windows and mac operating systems (default 180)
18+
--inactivity-timeout int Minutes the current user is inactive (no mouse or keyboard interaction) until DevSpace will exit automatically. 0 to disable. Only supported on windows and mac operating systems
2419
--kube-context string The kubernetes context to use
2520
-n, --namespace string The kubernetes namespace to use
2621
--no-warn If true does not show any warning when deploying into a different namespace or kube-context than before
22+
--override-name string If specified will override the devspace.yaml name
2723
-p, --profile strings The DevSpace profiles to apply. Multiple profiles are applied in the order they are specified
28-
--profile-parent strings One or more profiles that should be applied before the specified profile (e.g. devspace dev --profile-parent=base1 --profile-parent=base2 --profile=my-profile)
29-
--profile-refresh If true will pull and re-download profile parent sources
30-
--restore-vars If true will restore the variables from kubernetes before loading the config
31-
--save-vars If true will save the variables to kubernetes after loading the config
3224
--silent Run in silent mode and prevents any devspace log output except panics & fatals
33-
-s, --switch-context DEPRECATED: Switches and uses the last kube context and namespace that was used to deploy the DevSpace project
25+
-s, --switch-context Switches and uses the last kube context and namespace that was used to deploy the DevSpace project
3426
--var strings Variables to override during execution (e.g. --var=MYVAR=MYVALUE)
35-
--vars-secret string The secret to restore/save the variables from/to, if --restore-vars or --save-vars is enabled (default "devspace-vars")
3627
```
37-
38-
```
39-
40-
```
41-
42-
43-
## Flags
44-
## Global & Inherited Flags
Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
2-
title: "Command - devspace add"
2+
title: "devspace add --help"
33
sidebar_label: devspace add
44
---
55

66

7-
Convenience command: adds something to devspace.yaml
7+
Adds something to devspace.yaml
88

99
## Synopsis
1010

@@ -27,21 +27,16 @@ Adds config sections to devspace.yaml
2727
## Global & Inherited Flags
2828

2929
```
30-
--config string The devspace config file to use
3130
--debug Prints the stack trace if an error occurs
3231
--disable-profile-activation If true will ignore all profile activations
33-
--inactivity-timeout int Minutes the current user is inactive (no mouse or keyboard interaction) until DevSpace will exit automatically. 0 to disable. Only supported on windows and mac operating systems (default 180)
32+
--inactivity-timeout int Minutes the current user is inactive (no mouse or keyboard interaction) until DevSpace will exit automatically. 0 to disable. Only supported on windows and mac operating systems
3433
--kube-context string The kubernetes context to use
3534
-n, --namespace string The kubernetes namespace to use
3635
--no-warn If true does not show any warning when deploying into a different namespace or kube-context than before
36+
--override-name string If specified will override the devspace.yaml name
3737
-p, --profile strings The DevSpace profiles to apply. Multiple profiles are applied in the order they are specified
38-
--profile-parent strings One or more profiles that should be applied before the specified profile (e.g. devspace dev --profile-parent=base1 --profile-parent=base2 --profile=my-profile)
39-
--profile-refresh If true will pull and re-download profile parent sources
40-
--restore-vars If true will restore the variables from kubernetes before loading the config
41-
--save-vars If true will save the variables to kubernetes after loading the config
4238
--silent Run in silent mode and prevents any devspace log output except panics & fatals
43-
-s, --switch-context DEPRECATED: Switches and uses the last kube context and namespace that was used to deploy the DevSpace project
39+
-s, --switch-context Switches and uses the last kube context and namespace that was used to deploy the DevSpace project
4440
--var strings Variables to override during execution (e.g. --var=MYVAR=MYVALUE)
45-
--vars-secret string The secret to restore/save the variables from/to, if --restore-vars or --save-vars is enabled (default "devspace-vars")
4641
```
4742

docs/pages/commands/devspace_add_plugin.md renamed to docs/pages/cli/devspace_add_plugin.md

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
2-
title: "Command - devspace add plugin"
2+
title: "devspace add plugin --help"
33
sidebar_label: devspace add plugin
44
---
55

66

7-
Add a plugin to devspace
7+
Adds a plugin to devspace
88

99
## Synopsis
1010

@@ -35,21 +35,16 @@ devspace add plugin https://github.com/my-plugin/plugin
3535
## Global & Inherited Flags
3636

3737
```
38-
--config string The devspace config file to use
3938
--debug Prints the stack trace if an error occurs
4039
--disable-profile-activation If true will ignore all profile activations
41-
--inactivity-timeout int Minutes the current user is inactive (no mouse or keyboard interaction) until DevSpace will exit automatically. 0 to disable. Only supported on windows and mac operating systems (default 180)
40+
--inactivity-timeout int Minutes the current user is inactive (no mouse or keyboard interaction) until DevSpace will exit automatically. 0 to disable. Only supported on windows and mac operating systems
4241
--kube-context string The kubernetes context to use
4342
-n, --namespace string The kubernetes namespace to use
4443
--no-warn If true does not show any warning when deploying into a different namespace or kube-context than before
44+
--override-name string If specified will override the devspace.yaml name
4545
-p, --profile strings The DevSpace profiles to apply. Multiple profiles are applied in the order they are specified
46-
--profile-parent strings One or more profiles that should be applied before the specified profile (e.g. devspace dev --profile-parent=base1 --profile-parent=base2 --profile=my-profile)
47-
--profile-refresh If true will pull and re-download profile parent sources
48-
--restore-vars If true will restore the variables from kubernetes before loading the config
49-
--save-vars If true will save the variables to kubernetes after loading the config
5046
--silent Run in silent mode and prevents any devspace log output except panics & fatals
51-
-s, --switch-context DEPRECATED: Switches and uses the last kube context and namespace that was used to deploy the DevSpace project
47+
-s, --switch-context Switches and uses the last kube context and namespace that was used to deploy the DevSpace project
5248
--var strings Variables to override during execution (e.g. --var=MYVAR=MYVALUE)
53-
--vars-secret string The secret to restore/save the variables from/to, if --restore-vars or --save-vars is enabled (default "devspace-vars")
5449
```
5550

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: "Command - devspace analyze"
2+
title: "devspace analyze --help"
33
sidebar_label: devspace analyze
44
---
55

@@ -41,21 +41,16 @@ devspace analyze --namespace=mynamespace
4141
## Global & Inherited Flags
4242

4343
```
44-
--config string The devspace config file to use
4544
--debug Prints the stack trace if an error occurs
4645
--disable-profile-activation If true will ignore all profile activations
47-
--inactivity-timeout int Minutes the current user is inactive (no mouse or keyboard interaction) until DevSpace will exit automatically. 0 to disable. Only supported on windows and mac operating systems (default 180)
46+
--inactivity-timeout int Minutes the current user is inactive (no mouse or keyboard interaction) until DevSpace will exit automatically. 0 to disable. Only supported on windows and mac operating systems
4847
--kube-context string The kubernetes context to use
4948
-n, --namespace string The kubernetes namespace to use
5049
--no-warn If true does not show any warning when deploying into a different namespace or kube-context than before
50+
--override-name string If specified will override the devspace.yaml name
5151
-p, --profile strings The DevSpace profiles to apply. Multiple profiles are applied in the order they are specified
52-
--profile-parent strings One or more profiles that should be applied before the specified profile (e.g. devspace dev --profile-parent=base1 --profile-parent=base2 --profile=my-profile)
53-
--profile-refresh If true will pull and re-download profile parent sources
54-
--restore-vars If true will restore the variables from kubernetes before loading the config
55-
--save-vars If true will save the variables to kubernetes after loading the config
5652
--silent Run in silent mode and prevents any devspace log output except panics & fatals
57-
-s, --switch-context DEPRECATED: Switches and uses the last kube context and namespace that was used to deploy the DevSpace project
53+
-s, --switch-context Switches and uses the last kube context and namespace that was used to deploy the DevSpace project
5854
--var strings Variables to override during execution (e.g. --var=MYVAR=MYVALUE)
59-
--vars-secret string The secret to restore/save the variables from/to, if --restore-vars or --save-vars is enabled (default "devspace-vars")
6055
```
6156

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: "Command - devspace attach"
2+
title: "devspace attach --help"
33
sidebar_label: devspace attach
44
---
55

@@ -32,7 +32,6 @@ devspace attach -n my-namespace
3232
```
3333
-c, --container string Container name within pod where to execute command
3434
-h, --help help for attach
35-
--image string Image is the config name of an image to select in the devspace config (e.g. 'default'), it is NOT a docker image like myuser/myimage
3635
--image-selector string The image to search a pod for (e.g. nginx, nginx:latest, ${runtime.images.app}, nginx:${runtime.images.app.tag})
3736
-l, --label-selector string Comma separated key=value selector list (e.g. release=test)
3837
--pick Select a pod (default true)
@@ -43,21 +42,16 @@ devspace attach -n my-namespace
4342
## Global & Inherited Flags
4443

4544
```
46-
--config string The devspace config file to use
4745
--debug Prints the stack trace if an error occurs
4846
--disable-profile-activation If true will ignore all profile activations
49-
--inactivity-timeout int Minutes the current user is inactive (no mouse or keyboard interaction) until DevSpace will exit automatically. 0 to disable. Only supported on windows and mac operating systems (default 180)
47+
--inactivity-timeout int Minutes the current user is inactive (no mouse or keyboard interaction) until DevSpace will exit automatically. 0 to disable. Only supported on windows and mac operating systems
5048
--kube-context string The kubernetes context to use
5149
-n, --namespace string The kubernetes namespace to use
5250
--no-warn If true does not show any warning when deploying into a different namespace or kube-context than before
51+
--override-name string If specified will override the devspace.yaml name
5352
-p, --profile strings The DevSpace profiles to apply. Multiple profiles are applied in the order they are specified
54-
--profile-parent strings One or more profiles that should be applied before the specified profile (e.g. devspace dev --profile-parent=base1 --profile-parent=base2 --profile=my-profile)
55-
--profile-refresh If true will pull and re-download profile parent sources
56-
--restore-vars If true will restore the variables from kubernetes before loading the config
57-
--save-vars If true will save the variables to kubernetes after loading the config
5853
--silent Run in silent mode and prevents any devspace log output except panics & fatals
59-
-s, --switch-context DEPRECATED: Switches and uses the last kube context and namespace that was used to deploy the DevSpace project
54+
-s, --switch-context Switches and uses the last kube context and namespace that was used to deploy the DevSpace project
6055
--var strings Variables to override during execution (e.g. --var=MYVAR=MYVALUE)
61-
--vars-secret string The secret to restore/save the variables from/to, if --restore-vars or --save-vars is enabled (default "devspace-vars")
6256
```
6357

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: "Command - devspace build"
2+
title: "devspace build --help"
33
sidebar_label: devspace build
44
---
55

@@ -26,37 +26,37 @@ Builds all defined images and pushes them
2626

2727
```
2828
--build-sequential Builds the images one after another instead of in parallel
29-
--dependency strings Builds only the specific named dependencies
30-
-b, --force-build Forces to build every image
31-
--force-dependencies Forces to re-evaluate dependencies (use with --force-build --force-deploy to actually force building & deployment of dependencies) (default true)
29+
--dependency strings Deploys only the specified named dependencies
30+
-b, --force-build Forces to build every image (default true)
31+
-d, --force-deploy Forces to deploy every deployment
32+
--force-purge Forces to purge every deployment even though it might be in use by another DevSpace project
3233
-h, --help help for build
3334
--max-concurrent-builds int The maximum number of image builds built in parallel (0 for infinite)
34-
--skip-dependency strings Skips building the following dependencies
35+
--pipeline string The pipeline to execute (default "build")
36+
--render If true will render manifests and print them instead of actually deploying them
37+
--show-ui Shows the ui server
38+
--skip-build Skips building of images
39+
--skip-dependency strings Skips the following dependencies for deployment
40+
--skip-deploy If enabled will skip deploying
3541
--skip-push Skips image pushing, useful for minikube deployment
3642
--skip-push-local-kube Skips image pushing, if a local kubernetes environment is detected
3743
-t, --tag strings Use the given tag for all built images
38-
--verbose-dependencies Builds the dependencies verbosely (default true)
3944
```
4045

4146

4247
## Global & Inherited Flags
4348

4449
```
45-
--config string The devspace config file to use
4650
--debug Prints the stack trace if an error occurs
4751
--disable-profile-activation If true will ignore all profile activations
48-
--inactivity-timeout int Minutes the current user is inactive (no mouse or keyboard interaction) until DevSpace will exit automatically. 0 to disable. Only supported on windows and mac operating systems (default 180)
52+
--inactivity-timeout int Minutes the current user is inactive (no mouse or keyboard interaction) until DevSpace will exit automatically. 0 to disable. Only supported on windows and mac operating systems
4953
--kube-context string The kubernetes context to use
5054
-n, --namespace string The kubernetes namespace to use
5155
--no-warn If true does not show any warning when deploying into a different namespace or kube-context than before
56+
--override-name string If specified will override the devspace.yaml name
5257
-p, --profile strings The DevSpace profiles to apply. Multiple profiles are applied in the order they are specified
53-
--profile-parent strings One or more profiles that should be applied before the specified profile (e.g. devspace dev --profile-parent=base1 --profile-parent=base2 --profile=my-profile)
54-
--profile-refresh If true will pull and re-download profile parent sources
55-
--restore-vars If true will restore the variables from kubernetes before loading the config
56-
--save-vars If true will save the variables to kubernetes after loading the config
5758
--silent Run in silent mode and prevents any devspace log output except panics & fatals
58-
-s, --switch-context DEPRECATED: Switches and uses the last kube context and namespace that was used to deploy the DevSpace project
59+
-s, --switch-context Switches and uses the last kube context and namespace that was used to deploy the DevSpace project
5960
--var strings Variables to override during execution (e.g. --var=MYVAR=MYVALUE)
60-
--vars-secret string The secret to restore/save the variables from/to, if --restore-vars or --save-vars is enabled (default "devspace-vars")
6161
```
6262

0 commit comments

Comments
 (0)