File tree Expand file tree Collapse file tree 3 files changed +19
-8
lines changed Expand file tree Collapse file tree 3 files changed +19
-8
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,12 @@ Provides functionality for CLI configuration options
44
55### Synopsis
66
7- Provides functionality for CLI configuration options.
7+ Provides functionality for CLI configuration options
8+ The configuration is stored in a file in the user's config directory, which is OS dependent.
9+ Windows: %APPDATA%\stackit
10+ Linux: $XDG_CONFIG_HOME/stackit
11+ macOS: $HOME/Library/Application Support/stackit
12+ The configuration file is named ` cli-config.json ` and is created automatically in your first CLI run.
813
914```
1015stackit config [flags]
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ require (
99 github.com/inhies/go-bytesize v0.0.0-20220417184213-4913239db9cf
1010 github.com/jedib0t/go-pretty/v6 v6.5.8
1111 github.com/lmittmann/tint v1.0.4
12+ github.com/mattn/go-colorable v0.1.13
1213 github.com/spf13/cobra v1.8.0
1314 github.com/spf13/pflag v1.0.5
1415 github.com/spf13/viper v1.18.2
@@ -28,10 +29,7 @@ require (
2829 golang.org/x/text v0.15.0
2930)
3031
31- require (
32- github.com/mattn/go-colorable v0.1.13 // indirect
33- github.com/mattn/go-isatty v0.0.17 // indirect
34- )
32+ require github.com/mattn/go-isatty v0.0.17 // indirect
3533
3634require (
3735 github.com/alessio/shellescape v1.4.2 // indirect
Original file line number Diff line number Diff line change 11package config
22
33import (
4+ "fmt"
5+
46 "github.com/stackitcloud/stackit-cli/internal/cmd/config/list"
57 "github.com/stackitcloud/stackit-cli/internal/cmd/config/set"
68 "github.com/stackitcloud/stackit-cli/internal/cmd/config/unset"
@@ -15,9 +17,15 @@ func NewCmd(p *print.Printer) *cobra.Command {
1517 cmd := & cobra.Command {
1618 Use : "config" ,
1719 Short : "Provides functionality for CLI configuration options" ,
18- Long : "Provides functionality for CLI configuration options." ,
19- Args : args .NoArgs ,
20- Run : utils .CmdHelp ,
20+ Long : fmt .Sprintf ("%s\n %s\n %s\n %s\n %s\n %s" , "Provides functionality for CLI configuration options" ,
21+ "The configuration is stored in a file in the user's config directory, which is OS dependent." ,
22+ "Windows: %APPDATA%\\ stackit" ,
23+ "Linux: $XDG_CONFIG_HOME/stackit" ,
24+ "macOS: $HOME/Library/Application Support/stackit" ,
25+ "The configuration file is named `cli-config.json` and is created automatically in your first CLI run." ,
26+ ),
27+ Args : args .NoArgs ,
28+ Run : utils .CmdHelp ,
2129 }
2230 addSubcommands (cmd , p )
2331 return cmd
You can’t perform that action at this time.
0 commit comments