From 30680c5a950a4221f0e3f6fbdcb14b66a32a28f2 Mon Sep 17 00:00:00 2001 From: Xudong Guo Date: Tue, 9 Jan 2024 09:59:02 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=F0=9F=A4=96=20update=20doc-gen=20scri?= =?UTF-8?q?pt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/en-us/cli/kubecm.md | 9 +++--- docs/en-us/cli/kubecm_add.md | 5 ++-- docs/en-us/cli/kubecm_add_docs.md | 43 ++++++++++++++++++++++++++ docs/en-us/cli/kubecm_alias.md | 5 ++-- docs/en-us/cli/kubecm_alias_docs.md | 42 ++++++++++++++++++++++++++ docs/en-us/cli/kubecm_clear.md | 7 +++-- docs/en-us/cli/kubecm_clear_docs.md | 42 ++++++++++++++++++++++++++ docs/en-us/cli/kubecm_cloud.md | 5 ++-- docs/en-us/cli/kubecm_cloud_add.md | 4 +-- docs/en-us/cli/kubecm_cloud_docs.md | 45 ++++++++++++++++++++++++++++ docs/en-us/cli/kubecm_cloud_list.md | 4 +-- docs/en-us/cli/kubecm_create.md | 4 +-- docs/en-us/cli/kubecm_delete.md | 5 ++-- docs/en-us/cli/kubecm_delete_docs.md | 42 ++++++++++++++++++++++++++ docs/en-us/cli/kubecm_docs.md | 42 ++++++++++++++++++++++++++ docs/en-us/cli/kubecm_export.md | 5 ++-- docs/en-us/cli/kubecm_export_docs.md | 42 ++++++++++++++++++++++++++ docs/en-us/cli/kubecm_list.md | 5 ++-- docs/en-us/cli/kubecm_list_docs.md | 42 ++++++++++++++++++++++++++ docs/en-us/cli/kubecm_merge.md | 5 ++-- docs/en-us/cli/kubecm_merge_docs.md | 42 ++++++++++++++++++++++++++ docs/en-us/cli/kubecm_rename.md | 5 ++-- docs/en-us/cli/kubecm_rename_docs.md | 42 ++++++++++++++++++++++++++ docs/en-us/cli/kubecm_switch.md | 7 ++--- docs/en-us/cli/kubecm_switch_docs.md | 42 ++++++++++++++++++++++++++ docs/en-us/cli/kubecm_version.md | 4 +-- hack/docgen/gen.go | 17 +++++++++++ 27 files changed, 526 insertions(+), 36 deletions(-) create mode 100644 docs/en-us/cli/kubecm_add_docs.md create mode 100644 docs/en-us/cli/kubecm_alias_docs.md create mode 100644 docs/en-us/cli/kubecm_clear_docs.md create mode 100644 docs/en-us/cli/kubecm_cloud_docs.md create mode 100644 docs/en-us/cli/kubecm_delete_docs.md create mode 100644 docs/en-us/cli/kubecm_docs.md create mode 100644 docs/en-us/cli/kubecm_export_docs.md create mode 100644 docs/en-us/cli/kubecm_list_docs.md create mode 100644 docs/en-us/cli/kubecm_merge_docs.md create mode 100644 docs/en-us/cli/kubecm_rename_docs.md create mode 100644 docs/en-us/cli/kubecm_switch_docs.md diff --git a/docs/en-us/cli/kubecm.md b/docs/en-us/cli/kubecm.md index cc9cb064..dd3a4a7e 100644 --- a/docs/en-us/cli/kubecm.md +++ b/docs/en-us/cli/kubecm.md @@ -15,17 +15,17 @@ KubeConfig Manager. ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██  ██ ██ ██████ ██████ ███████ ██████ ██ ██  - Tips  Find more information at: ]8;;https://kubecm.cloudkubecm.cloud]8;; + Tips  Find more information at: kubecm.cloud (https://kubecm.cloud) ### Options ``` - --config string path of kubeconfig (default "/Users/guoxudong/.kube/config") + --config string path of kubeconfig (default "/Users/guoxd/.kube/config") -h, --help help for kubecm -m, --mac-notify enable to display Mac notification banner -s, --silence-table enable/disable output of context table on successful config update - --ui-size int number of list items to show in menu at once (default 4) + -u, --ui-size int number of list items to show in menu at once (default 4) ``` ### SEE ALSO @@ -34,13 +34,12 @@ KubeConfig Manager. * [kubecm alias](kubecm_alias.md) - Generate alias for all contexts * [kubecm clear](kubecm_clear.md) - Clear lapsed context, cluster and user * [kubecm cloud](kubecm_cloud.md) - Manage kubeconfig from cloud -* [kubecm completion](kubecm_completion.md) - Generate completion script * [kubecm create](kubecm_create.md) - Create new KubeConfig(experiment) * [kubecm delete](kubecm_delete.md) - Delete the specified context from the kubeconfig +* [kubecm docs](kubecm_docs.md) - Open document website * [kubecm export](kubecm_export.md) - Export the specified context from the kubeconfig * [kubecm list](kubecm_list.md) - List KubeConfig * [kubecm merge](kubecm_merge.md) - Merge multiple kubeconfig files into one -* [kubecm namespace](kubecm_namespace.md) - Switch or change namespace interactively * [kubecm rename](kubecm_rename.md) - Rename the contexts of kubeconfig * [kubecm switch](kubecm_switch.md) - Switch Kube Context interactively * [kubecm version](kubecm_version.md) - Print version info diff --git a/docs/en-us/cli/kubecm_add.md b/docs/en-us/cli/kubecm_add.md index 704bf8f5..8773c19b 100644 --- a/docs/en-us/cli/kubecm_add.md +++ b/docs/en-us/cli/kubecm_add.md @@ -39,13 +39,14 @@ cat /etc/kubernetes/admin.conf | kubecm add -f - ### Options inherited from parent commands ``` - --config string path of kubeconfig (default "/Users/guoxudong/.kube/config") + --config string path of kubeconfig (default "/Users/guoxd/.kube/config") -m, --mac-notify enable to display Mac notification banner -s, --silence-table enable/disable output of context table on successful config update - --ui-size int number of list items to show in menu at once (default 4) + -u, --ui-size int number of list items to show in menu at once (default 4) ``` ### SEE ALSO * [kubecm](kubecm.md) - KubeConfig Manager. +* [kubecm add docs](kubecm_add_docs.md) - Open document website diff --git a/docs/en-us/cli/kubecm_add_docs.md b/docs/en-us/cli/kubecm_add_docs.md new file mode 100644 index 00000000..57055958 --- /dev/null +++ b/docs/en-us/cli/kubecm_add_docs.md @@ -0,0 +1,43 @@ +## kubecm add docs + +Open document website + +### Synopsis + +Open document website in your browser + +``` +kubecm add docs [flags] +``` + +### Examples + +``` + +# Open kubecm website +kubecm docs +# Open add command document page +kubecm add docs + +``` + +### Options + +``` + -h, --help help for docs +``` + +### Options inherited from parent commands + +``` + --config string path of kubeconfig (default "/Users/guoxd/.kube/config") + -c, --cover Overwrite local kubeconfig files + -m, --mac-notify enable to display Mac notification banner + -s, --silence-table enable/disable output of context table on successful config update + -u, --ui-size int number of list items to show in menu at once (default 4) +``` + +### SEE ALSO + +* [kubecm add](kubecm_add.md) - Add KubeConfig to $HOME/.kube/config + diff --git a/docs/en-us/cli/kubecm_alias.md b/docs/en-us/cli/kubecm_alias.md index 70f54759..b14e35b7 100644 --- a/docs/en-us/cli/kubecm_alias.md +++ b/docs/en-us/cli/kubecm_alias.md @@ -31,13 +31,14 @@ $ kubecm alias -o bash ### Options inherited from parent commands ``` - --config string path of kubeconfig (default "/Users/guoxudong/.kube/config") + --config string path of kubeconfig (default "/Users/guoxd/.kube/config") -m, --mac-notify enable to display Mac notification banner -s, --silence-table enable/disable output of context table on successful config update - --ui-size int number of list items to show in menu at once (default 4) + -u, --ui-size int number of list items to show in menu at once (default 4) ``` ### SEE ALSO * [kubecm](kubecm.md) - KubeConfig Manager. +* [kubecm alias docs](kubecm_alias_docs.md) - Open document website diff --git a/docs/en-us/cli/kubecm_alias_docs.md b/docs/en-us/cli/kubecm_alias_docs.md new file mode 100644 index 00000000..aee4a4df --- /dev/null +++ b/docs/en-us/cli/kubecm_alias_docs.md @@ -0,0 +1,42 @@ +## kubecm alias docs + +Open document website + +### Synopsis + +Open document website in your browser + +``` +kubecm alias docs [flags] +``` + +### Examples + +``` + +# Open kubecm website +kubecm docs +# Open add command document page +kubecm add docs + +``` + +### Options + +``` + -h, --help help for docs +``` + +### Options inherited from parent commands + +``` + --config string path of kubeconfig (default "/Users/guoxd/.kube/config") + -m, --mac-notify enable to display Mac notification banner + -s, --silence-table enable/disable output of context table on successful config update + -u, --ui-size int number of list items to show in menu at once (default 4) +``` + +### SEE ALSO + +* [kubecm alias](kubecm_alias.md) - Generate alias for all contexts + diff --git a/docs/en-us/cli/kubecm_clear.md b/docs/en-us/cli/kubecm_clear.md index d47cc9b6..051c426b 100644 --- a/docs/en-us/cli/kubecm_clear.md +++ b/docs/en-us/cli/kubecm_clear.md @@ -14,7 +14,7 @@ kubecm clear ``` -# Clear lapsed context, cluster and user (default is /Users/guoxudong/.kube/config) +# Clear lapsed context, cluster and user (default is /Users/guoxd/.kube/config) kubecm clear # Customised clear lapsed files kubecm clear config.yaml test.yaml @@ -30,13 +30,14 @@ kubecm clear config.yaml test.yaml ### Options inherited from parent commands ``` - --config string path of kubeconfig (default "/Users/guoxudong/.kube/config") + --config string path of kubeconfig (default "/Users/guoxd/.kube/config") -m, --mac-notify enable to display Mac notification banner -s, --silence-table enable/disable output of context table on successful config update - --ui-size int number of list items to show in menu at once (default 4) + -u, --ui-size int number of list items to show in menu at once (default 4) ``` ### SEE ALSO * [kubecm](kubecm.md) - KubeConfig Manager. +* [kubecm clear docs](kubecm_clear_docs.md) - Open document website diff --git a/docs/en-us/cli/kubecm_clear_docs.md b/docs/en-us/cli/kubecm_clear_docs.md new file mode 100644 index 00000000..3f430233 --- /dev/null +++ b/docs/en-us/cli/kubecm_clear_docs.md @@ -0,0 +1,42 @@ +## kubecm clear docs + +Open document website + +### Synopsis + +Open document website in your browser + +``` +kubecm clear docs [flags] +``` + +### Examples + +``` + +# Open kubecm website +kubecm docs +# Open add command document page +kubecm add docs + +``` + +### Options + +``` + -h, --help help for docs +``` + +### Options inherited from parent commands + +``` + --config string path of kubeconfig (default "/Users/guoxd/.kube/config") + -m, --mac-notify enable to display Mac notification banner + -s, --silence-table enable/disable output of context table on successful config update + -u, --ui-size int number of list items to show in menu at once (default 4) +``` + +### SEE ALSO + +* [kubecm clear](kubecm_clear.md) - Clear lapsed context, cluster and user + diff --git a/docs/en-us/cli/kubecm_cloud.md b/docs/en-us/cli/kubecm_cloud.md index cf720c1f..468bbd7f 100644 --- a/docs/en-us/cli/kubecm_cloud.md +++ b/docs/en-us/cli/kubecm_cloud.md @@ -18,15 +18,16 @@ Manage kubeconfig from cloud ### Options inherited from parent commands ``` - --config string path of kubeconfig (default "/Users/guoxudong/.kube/config") + --config string path of kubeconfig (default "/Users/guoxd/.kube/config") -m, --mac-notify enable to display Mac notification banner -s, --silence-table enable/disable output of context table on successful config update - --ui-size int number of list items to show in menu at once (default 4) + -u, --ui-size int number of list items to show in menu at once (default 4) ``` ### SEE ALSO * [kubecm](kubecm.md) - KubeConfig Manager. * [kubecm cloud add](kubecm_cloud_add.md) - Add kubeconfig from cloud +* [kubecm cloud docs](kubecm_cloud_docs.md) - Open document website * [kubecm cloud list](kubecm_cloud_list.md) - List Cluster from cloud diff --git a/docs/en-us/cli/kubecm_cloud_add.md b/docs/en-us/cli/kubecm_cloud_add.md index 656109c4..13f85ad3 100644 --- a/docs/en-us/cli/kubecm_cloud_add.md +++ b/docs/en-us/cli/kubecm_cloud_add.md @@ -60,12 +60,12 @@ kubecm cloud add --provider alibabacloud --cluster_id=xxxxxx ``` --cluster_id string kubernetes cluster id - --config string path of kubeconfig (default "/Users/guoxudong/.kube/config") + --config string path of kubeconfig (default "/Users/guoxd/.kube/config") -m, --mac-notify enable to display Mac notification banner --provider string public cloud --region_id string cloud region id -s, --silence-table enable/disable output of context table on successful config update - --ui-size int number of list items to show in menu at once (default 4) + -u, --ui-size int number of list items to show in menu at once (default 4) ``` ### SEE ALSO diff --git a/docs/en-us/cli/kubecm_cloud_docs.md b/docs/en-us/cli/kubecm_cloud_docs.md new file mode 100644 index 00000000..b1877475 --- /dev/null +++ b/docs/en-us/cli/kubecm_cloud_docs.md @@ -0,0 +1,45 @@ +## kubecm cloud docs + +Open document website + +### Synopsis + +Open document website in your browser + +``` +kubecm cloud docs [flags] +``` + +### Examples + +``` + +# Open kubecm website +kubecm docs +# Open add command document page +kubecm add docs + +``` + +### Options + +``` + -h, --help help for docs +``` + +### Options inherited from parent commands + +``` + --cluster_id string kubernetes cluster id + --config string path of kubeconfig (default "/Users/guoxd/.kube/config") + -m, --mac-notify enable to display Mac notification banner + --provider string public cloud + --region_id string cloud region id + -s, --silence-table enable/disable output of context table on successful config update + -u, --ui-size int number of list items to show in menu at once (default 4) +``` + +### SEE ALSO + +* [kubecm cloud](kubecm_cloud.md) - Manage kubeconfig from cloud + diff --git a/docs/en-us/cli/kubecm_cloud_list.md b/docs/en-us/cli/kubecm_cloud_list.md index 9da816d8..2e953db0 100644 --- a/docs/en-us/cli/kubecm_cloud_list.md +++ b/docs/en-us/cli/kubecm_cloud_list.md @@ -45,12 +45,12 @@ kubecm cloud list --provider alibabacloud --cluster_id=xxxxxx ``` --cluster_id string kubernetes cluster id - --config string path of kubeconfig (default "/Users/guoxudong/.kube/config") + --config string path of kubeconfig (default "/Users/guoxd/.kube/config") -m, --mac-notify enable to display Mac notification banner --provider string public cloud --region_id string cloud region id -s, --silence-table enable/disable output of context table on successful config update - --ui-size int number of list items to show in menu at once (default 4) + -u, --ui-size int number of list items to show in menu at once (default 4) ``` ### SEE ALSO diff --git a/docs/en-us/cli/kubecm_create.md b/docs/en-us/cli/kubecm_create.md index 4882cef0..abd12df9 100644 --- a/docs/en-us/cli/kubecm_create.md +++ b/docs/en-us/cli/kubecm_create.md @@ -28,10 +28,10 @@ kubecm create ### Options inherited from parent commands ``` - --config string path of kubeconfig (default "/Users/guoxudong/.kube/config") + --config string path of kubeconfig (default "/Users/guoxd/.kube/config") -m, --mac-notify enable to display Mac notification banner -s, --silence-table enable/disable output of context table on successful config update - --ui-size int number of list items to show in menu at once (default 4) + -u, --ui-size int number of list items to show in menu at once (default 4) ``` ### SEE ALSO diff --git a/docs/en-us/cli/kubecm_delete.md b/docs/en-us/cli/kubecm_delete.md index a65ee579..732417cc 100644 --- a/docs/en-us/cli/kubecm_delete.md +++ b/docs/en-us/cli/kubecm_delete.md @@ -32,13 +32,14 @@ kubecm delete my-context1 my-context2 ### Options inherited from parent commands ``` - --config string path of kubeconfig (default "/Users/guoxudong/.kube/config") + --config string path of kubeconfig (default "/Users/guoxd/.kube/config") -m, --mac-notify enable to display Mac notification banner -s, --silence-table enable/disable output of context table on successful config update - --ui-size int number of list items to show in menu at once (default 4) + -u, --ui-size int number of list items to show in menu at once (default 4) ``` ### SEE ALSO * [kubecm](kubecm.md) - KubeConfig Manager. +* [kubecm delete docs](kubecm_delete_docs.md) - Open document website diff --git a/docs/en-us/cli/kubecm_delete_docs.md b/docs/en-us/cli/kubecm_delete_docs.md new file mode 100644 index 00000000..dbf3fc85 --- /dev/null +++ b/docs/en-us/cli/kubecm_delete_docs.md @@ -0,0 +1,42 @@ +## kubecm delete docs + +Open document website + +### Synopsis + +Open document website in your browser + +``` +kubecm delete docs [flags] +``` + +### Examples + +``` + +# Open kubecm website +kubecm docs +# Open add command document page +kubecm add docs + +``` + +### Options + +``` + -h, --help help for docs +``` + +### Options inherited from parent commands + +``` + --config string path of kubeconfig (default "/Users/guoxd/.kube/config") + -m, --mac-notify enable to display Mac notification banner + -s, --silence-table enable/disable output of context table on successful config update + -u, --ui-size int number of list items to show in menu at once (default 4) +``` + +### SEE ALSO + +* [kubecm delete](kubecm_delete.md) - Delete the specified context from the kubeconfig + diff --git a/docs/en-us/cli/kubecm_docs.md b/docs/en-us/cli/kubecm_docs.md new file mode 100644 index 00000000..25fe9de3 --- /dev/null +++ b/docs/en-us/cli/kubecm_docs.md @@ -0,0 +1,42 @@ +## kubecm docs + +Open document website + +### Synopsis + +Open document website in your browser + +``` +kubecm docs [flags] +``` + +### Examples + +``` + +# Open kubecm website +kubecm docs +# Open add command document page +kubecm add docs + +``` + +### Options + +``` + -h, --help help for docs +``` + +### Options inherited from parent commands + +``` + --config string path of kubeconfig (default "/Users/guoxd/.kube/config") + -m, --mac-notify enable to display Mac notification banner + -s, --silence-table enable/disable output of context table on successful config update + -u, --ui-size int number of list items to show in menu at once (default 4) +``` + +### SEE ALSO + +* [kubecm](kubecm.md) - KubeConfig Manager. + diff --git a/docs/en-us/cli/kubecm_export.md b/docs/en-us/cli/kubecm_export.md index 472a9541..7b23cfae 100644 --- a/docs/en-us/cli/kubecm_export.md +++ b/docs/en-us/cli/kubecm_export.md @@ -31,13 +31,14 @@ kubecm export -f myconfig.yaml my-context1 my-context2 ### Options inherited from parent commands ``` - --config string path of kubeconfig (default "/Users/guoxudong/.kube/config") + --config string path of kubeconfig (default "/Users/guoxd/.kube/config") -m, --mac-notify enable to display Mac notification banner -s, --silence-table enable/disable output of context table on successful config update - --ui-size int number of list items to show in menu at once (default 4) + -u, --ui-size int number of list items to show in menu at once (default 4) ``` ### SEE ALSO * [kubecm](kubecm.md) - KubeConfig Manager. +* [kubecm export docs](kubecm_export_docs.md) - Open document website diff --git a/docs/en-us/cli/kubecm_export_docs.md b/docs/en-us/cli/kubecm_export_docs.md new file mode 100644 index 00000000..4159f08c --- /dev/null +++ b/docs/en-us/cli/kubecm_export_docs.md @@ -0,0 +1,42 @@ +## kubecm export docs + +Open document website + +### Synopsis + +Open document website in your browser + +``` +kubecm export docs [flags] +``` + +### Examples + +``` + +# Open kubecm website +kubecm docs +# Open add command document page +kubecm add docs + +``` + +### Options + +``` + -h, --help help for docs +``` + +### Options inherited from parent commands + +``` + --config string path of kubeconfig (default "/Users/guoxd/.kube/config") + -m, --mac-notify enable to display Mac notification banner + -s, --silence-table enable/disable output of context table on successful config update + -u, --ui-size int number of list items to show in menu at once (default 4) +``` + +### SEE ALSO + +* [kubecm export](kubecm_export.md) - Export the specified context from the kubeconfig + diff --git a/docs/en-us/cli/kubecm_list.md b/docs/en-us/cli/kubecm_list.md index 851b7ad1..ef57a551 100644 --- a/docs/en-us/cli/kubecm_list.md +++ b/docs/en-us/cli/kubecm_list.md @@ -33,13 +33,14 @@ kubecm ls kind k3s ### Options inherited from parent commands ``` - --config string path of kubeconfig (default "/Users/guoxudong/.kube/config") + --config string path of kubeconfig (default "/Users/guoxd/.kube/config") -m, --mac-notify enable to display Mac notification banner -s, --silence-table enable/disable output of context table on successful config update - --ui-size int number of list items to show in menu at once (default 4) + -u, --ui-size int number of list items to show in menu at once (default 4) ``` ### SEE ALSO * [kubecm](kubecm.md) - KubeConfig Manager. +* [kubecm list docs](kubecm_list_docs.md) - Open document website diff --git a/docs/en-us/cli/kubecm_list_docs.md b/docs/en-us/cli/kubecm_list_docs.md new file mode 100644 index 00000000..106156c8 --- /dev/null +++ b/docs/en-us/cli/kubecm_list_docs.md @@ -0,0 +1,42 @@ +## kubecm list docs + +Open document website + +### Synopsis + +Open document website in your browser + +``` +kubecm list docs [flags] +``` + +### Examples + +``` + +# Open kubecm website +kubecm docs +# Open add command document page +kubecm add docs + +``` + +### Options + +``` + -h, --help help for docs +``` + +### Options inherited from parent commands + +``` + --config string path of kubeconfig (default "/Users/guoxd/.kube/config") + -m, --mac-notify enable to display Mac notification banner + -s, --silence-table enable/disable output of context table on successful config update + -u, --ui-size int number of list items to show in menu at once (default 4) +``` + +### SEE ALSO + +* [kubecm list](kubecm_list.md) - List KubeConfig + diff --git a/docs/en-us/cli/kubecm_merge.md b/docs/en-us/cli/kubecm_merge.md index 653c6d0e..fd35e753 100644 --- a/docs/en-us/cli/kubecm_merge.md +++ b/docs/en-us/cli/kubecm_merge.md @@ -34,13 +34,14 @@ kubecm merge -f dir --config kubecm.config ### Options inherited from parent commands ``` - --config string path of kubeconfig (default "/Users/guoxudong/.kube/config") + --config string path of kubeconfig (default "/Users/guoxd/.kube/config") -m, --mac-notify enable to display Mac notification banner -s, --silence-table enable/disable output of context table on successful config update - --ui-size int number of list items to show in menu at once (default 4) + -u, --ui-size int number of list items to show in menu at once (default 4) ``` ### SEE ALSO * [kubecm](kubecm.md) - KubeConfig Manager. +* [kubecm merge docs](kubecm_merge_docs.md) - Open document website diff --git a/docs/en-us/cli/kubecm_merge_docs.md b/docs/en-us/cli/kubecm_merge_docs.md new file mode 100644 index 00000000..bbe2575e --- /dev/null +++ b/docs/en-us/cli/kubecm_merge_docs.md @@ -0,0 +1,42 @@ +## kubecm merge docs + +Open document website + +### Synopsis + +Open document website in your browser + +``` +kubecm merge docs [flags] +``` + +### Examples + +``` + +# Open kubecm website +kubecm docs +# Open add command document page +kubecm add docs + +``` + +### Options + +``` + -h, --help help for docs +``` + +### Options inherited from parent commands + +``` + --config string path of kubeconfig (default "/Users/guoxd/.kube/config") + -m, --mac-notify enable to display Mac notification banner + -s, --silence-table enable/disable output of context table on successful config update + -u, --ui-size int number of list items to show in menu at once (default 4) +``` + +### SEE ALSO + +* [kubecm merge](kubecm_merge.md) - Merge multiple kubeconfig files into one + diff --git a/docs/en-us/cli/kubecm_rename.md b/docs/en-us/cli/kubecm_rename.md index 4d718217..f4043ff4 100644 --- a/docs/en-us/cli/kubecm_rename.md +++ b/docs/en-us/cli/kubecm_rename.md @@ -28,13 +28,14 @@ kubecm rename ### Options inherited from parent commands ``` - --config string path of kubeconfig (default "/Users/guoxudong/.kube/config") + --config string path of kubeconfig (default "/Users/guoxd/.kube/config") -m, --mac-notify enable to display Mac notification banner -s, --silence-table enable/disable output of context table on successful config update - --ui-size int number of list items to show in menu at once (default 4) + -u, --ui-size int number of list items to show in menu at once (default 4) ``` ### SEE ALSO * [kubecm](kubecm.md) - KubeConfig Manager. +* [kubecm rename docs](kubecm_rename_docs.md) - Open document website diff --git a/docs/en-us/cli/kubecm_rename_docs.md b/docs/en-us/cli/kubecm_rename_docs.md new file mode 100644 index 00000000..8f7a1e5b --- /dev/null +++ b/docs/en-us/cli/kubecm_rename_docs.md @@ -0,0 +1,42 @@ +## kubecm rename docs + +Open document website + +### Synopsis + +Open document website in your browser + +``` +kubecm rename docs [flags] +``` + +### Examples + +``` + +# Open kubecm website +kubecm docs +# Open add command document page +kubecm add docs + +``` + +### Options + +``` + -h, --help help for docs +``` + +### Options inherited from parent commands + +``` + --config string path of kubeconfig (default "/Users/guoxd/.kube/config") + -m, --mac-notify enable to display Mac notification banner + -s, --silence-table enable/disable output of context table on successful config update + -u, --ui-size int number of list items to show in menu at once (default 4) +``` + +### SEE ALSO + +* [kubecm rename](kubecm_rename.md) - Rename the contexts of kubeconfig + diff --git a/docs/en-us/cli/kubecm_switch.md b/docs/en-us/cli/kubecm_switch.md index 4f02bfbf..f358be13 100644 --- a/docs/en-us/cli/kubecm_switch.md +++ b/docs/en-us/cli/kubecm_switch.md @@ -12,8 +12,6 @@ Switch Kube Context interactively kubecm switch [flags] ``` -![switch](../../static/switch.gif) - ### Examples ``` @@ -34,13 +32,14 @@ kubecm switch dev ### Options inherited from parent commands ``` - --config string path of kubeconfig (default "/Users/guoxudong/.kube/config") + --config string path of kubeconfig (default "/Users/guoxd/.kube/config") -m, --mac-notify enable to display Mac notification banner -s, --silence-table enable/disable output of context table on successful config update - --ui-size int number of list items to show in menu at once (default 4) + -u, --ui-size int number of list items to show in menu at once (default 4) ``` ### SEE ALSO * [kubecm](kubecm.md) - KubeConfig Manager. +* [kubecm switch docs](kubecm_switch_docs.md) - Open document website diff --git a/docs/en-us/cli/kubecm_switch_docs.md b/docs/en-us/cli/kubecm_switch_docs.md new file mode 100644 index 00000000..b26405b2 --- /dev/null +++ b/docs/en-us/cli/kubecm_switch_docs.md @@ -0,0 +1,42 @@ +## kubecm switch docs + +Open document website + +### Synopsis + +Open document website in your browser + +``` +kubecm switch docs [flags] +``` + +### Examples + +``` + +# Open kubecm website +kubecm docs +# Open add command document page +kubecm add docs + +``` + +### Options + +``` + -h, --help help for docs +``` + +### Options inherited from parent commands + +``` + --config string path of kubeconfig (default "/Users/guoxd/.kube/config") + -m, --mac-notify enable to display Mac notification banner + -s, --silence-table enable/disable output of context table on successful config update + -u, --ui-size int number of list items to show in menu at once (default 4) +``` + +### SEE ALSO + +* [kubecm switch](kubecm_switch.md) - Switch Kube Context interactively + diff --git a/docs/en-us/cli/kubecm_version.md b/docs/en-us/cli/kubecm_version.md index c9e341b6..2ae31a0a 100644 --- a/docs/en-us/cli/kubecm_version.md +++ b/docs/en-us/cli/kubecm_version.md @@ -19,10 +19,10 @@ kubecm version [flags] ### Options inherited from parent commands ``` - --config string path of kubeconfig (default "/Users/guoxudong/.kube/config") + --config string path of kubeconfig (default "/Users/guoxd/.kube/config") -m, --mac-notify enable to display Mac notification banner -s, --silence-table enable/disable output of context table on successful config update - --ui-size int number of list items to show in menu at once (default 4) + -u, --ui-size int number of list items to show in menu at once (default 4) ``` ### SEE ALSO diff --git a/hack/docgen/gen.go b/hack/docgen/gen.go index f2a14910..8d77e2f0 100644 --- a/hack/docgen/gen.go +++ b/hack/docgen/gen.go @@ -1,6 +1,7 @@ package main import ( + "github.com/spf13/cobra" "log" "github.com/spf13/cobra/doc" @@ -9,8 +10,24 @@ import ( func main() { kubecm := cmd.NewBaseCommand().CobraCmd() + // Docs of the completion command is not generated + removeCommand(kubecm, "completion") + // Docs of the namespace command is not generated + removeCommand(kubecm, "namespace") err := doc.GenMarkdownTree(kubecm, "./docs/en-us/cli/") if err != nil { log.Fatal(err) } } + +// removeCommand +func removeCommand(root *cobra.Command, cmdToRemove string) { + var newCommands []*cobra.Command + for _, cmd := range root.Commands() { + if cmd.Name() != cmdToRemove { + newCommands = append(newCommands, cmd) + } + } + root.ResetCommands() + root.AddCommand(newCommands...) +}