Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ dist/

# IDE
.vscode
.idea

# OS generated files
.DS_Store
7 changes: 7 additions & 0 deletions CONTRIBUTION.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,13 @@ func outputResult(p *print.Printer, cmd *cobra.Command, outputFormat string, res
}
p.Outputln(string(details))
return nil
case print.YAMLOutputFormat:
details, err := yaml.Marshal(resources)
if err != nil {
return fmt.Errorf("marshal resource list: %w", err)
}
p.Outputln(string(details))
return nil
default:
table := tables.NewTable()
table.SetHeader("ID", "NAME", "STATE")
Expand Down
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,33 @@ stackit config list

You can also edit the configuration file manually.

## Customization

### Pager

To specify a custom pager, use the `PAGER` environment variable.

If the variable is not set, STACKIT CLI uses the `less` as default pager.

When using `less` as a pager, STACKIT CLI will automatically pass following options
- -F, --quit-if-one-screen - Less will automatically exit if the entire file can be displayed on the first screen.
- -S, --chop-long-lines - Lines longer than the screen width will be chopped rather than being folded.
- -w, --hilite-unread - Temporarily highlights the first "new" line after a forward movement of a full page.
- -R, --RAW-CONTROL-CHARS - ANSI color and style sequences will be interpreted.

> These options will not be added automatically if a custom pager is defined.
>
> In that case, users can define the parameters by using the specific environment variable required by the `PAGER` (if supported).

>
> For example, if user sets the `PAGER` environment variable to `less` and would like to pass some arguments, `LESS` environment variable must be used as following:

>
> export PAGER="less"
>
> export LESS="-R"


## Autocompletion

If you wish to set up command autocompletion in your shell for the STACKIT CLI, please refer to our [autocompletion guide](./AUTOCOMPLETION.md).
Expand Down
2 changes: 1 addition & 1 deletion docs/stackit.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ stackit [flags]
-y, --assume-yes If set, skips all confirmation prompts
--async If set, runs the command asynchronously
-h, --help Help for "stackit"
-o, --output-format string Output format, one of ["json" "pretty" "none"]
-o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"]
-p, --project-id string Project ID
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
-v, --version Show "stackit" version
Expand Down
2 changes: 1 addition & 1 deletion docs/stackit_argus.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ stackit argus [flags]
```
-y, --assume-yes If set, skips all confirmation prompts
--async If set, runs the command asynchronously
-o, --output-format string Output format, one of ["json" "pretty" "none"]
-o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"]
-p, --project-id string Project ID
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
```
Expand Down
2 changes: 1 addition & 1 deletion docs/stackit_argus_credentials.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ stackit argus credentials [flags]
```
-y, --assume-yes If set, skips all confirmation prompts
--async If set, runs the command asynchronously
-o, --output-format string Output format, one of ["json" "pretty" "none"]
-o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"]
-p, --project-id string Project ID
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
```
Expand Down
2 changes: 1 addition & 1 deletion docs/stackit_argus_credentials_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ stackit argus credentials create [flags]
```
-y, --assume-yes If set, skips all confirmation prompts
--async If set, runs the command asynchronously
-o, --output-format string Output format, one of ["json" "pretty" "none"]
-o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"]
-p, --project-id string Project ID
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
```
Expand Down
2 changes: 1 addition & 1 deletion docs/stackit_argus_credentials_delete.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ stackit argus credentials delete USERNAME [flags]
```
-y, --assume-yes If set, skips all confirmation prompts
--async If set, runs the command asynchronously
-o, --output-format string Output format, one of ["json" "pretty" "none"]
-o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"]
-p, --project-id string Project ID
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
```
Expand Down
2 changes: 1 addition & 1 deletion docs/stackit_argus_credentials_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ stackit argus credentials list [flags]
```
-y, --assume-yes If set, skips all confirmation prompts
--async If set, runs the command asynchronously
-o, --output-format string Output format, one of ["json" "pretty" "none"]
-o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"]
-p, --project-id string Project ID
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
```
Expand Down
2 changes: 1 addition & 1 deletion docs/stackit_argus_grafana.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ stackit argus grafana [flags]
```
-y, --assume-yes If set, skips all confirmation prompts
--async If set, runs the command asynchronously
-o, --output-format string Output format, one of ["json" "pretty" "none"]
-o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"]
-p, --project-id string Project ID
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
```
Expand Down
2 changes: 1 addition & 1 deletion docs/stackit_argus_grafana_describe.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ stackit argus grafana describe INSTANCE_ID [flags]
```
-y, --assume-yes If set, skips all confirmation prompts
--async If set, runs the command asynchronously
-o, --output-format string Output format, one of ["json" "pretty" "none"]
-o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"]
-p, --project-id string Project ID
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
```
Expand Down
2 changes: 1 addition & 1 deletion docs/stackit_argus_grafana_public-read-access.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ stackit argus grafana public-read-access [flags]
```
-y, --assume-yes If set, skips all confirmation prompts
--async If set, runs the command asynchronously
-o, --output-format string Output format, one of ["json" "pretty" "none"]
-o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"]
-p, --project-id string Project ID
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
```
Expand Down
2 changes: 1 addition & 1 deletion docs/stackit_argus_grafana_public-read-access_disable.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ stackit argus grafana public-read-access disable INSTANCE_ID [flags]
```
-y, --assume-yes If set, skips all confirmation prompts
--async If set, runs the command asynchronously
-o, --output-format string Output format, one of ["json" "pretty" "none"]
-o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"]
-p, --project-id string Project ID
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
```
Expand Down
2 changes: 1 addition & 1 deletion docs/stackit_argus_grafana_public-read-access_enable.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ stackit argus grafana public-read-access enable INSTANCE_ID [flags]
```
-y, --assume-yes If set, skips all confirmation prompts
--async If set, runs the command asynchronously
-o, --output-format string Output format, one of ["json" "pretty" "none"]
-o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"]
-p, --project-id string Project ID
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
```
Expand Down
2 changes: 1 addition & 1 deletion docs/stackit_argus_grafana_single-sign-on.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ stackit argus grafana single-sign-on [flags]
```
-y, --assume-yes If set, skips all confirmation prompts
--async If set, runs the command asynchronously
-o, --output-format string Output format, one of ["json" "pretty" "none"]
-o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"]
-p, --project-id string Project ID
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
```
Expand Down
2 changes: 1 addition & 1 deletion docs/stackit_argus_grafana_single-sign-on_disable.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ stackit argus grafana single-sign-on disable INSTANCE_ID [flags]
```
-y, --assume-yes If set, skips all confirmation prompts
--async If set, runs the command asynchronously
-o, --output-format string Output format, one of ["json" "pretty" "none"]
-o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"]
-p, --project-id string Project ID
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
```
Expand Down
2 changes: 1 addition & 1 deletion docs/stackit_argus_grafana_single-sign-on_enable.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ stackit argus grafana single-sign-on enable INSTANCE_ID [flags]
```
-y, --assume-yes If set, skips all confirmation prompts
--async If set, runs the command asynchronously
-o, --output-format string Output format, one of ["json" "pretty" "none"]
-o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"]
-p, --project-id string Project ID
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
```
Expand Down
2 changes: 1 addition & 1 deletion docs/stackit_argus_instance.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ stackit argus instance [flags]
```
-y, --assume-yes If set, skips all confirmation prompts
--async If set, runs the command asynchronously
-o, --output-format string Output format, one of ["json" "pretty" "none"]
-o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"]
-p, --project-id string Project ID
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
```
Expand Down
2 changes: 1 addition & 1 deletion docs/stackit_argus_instance_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ stackit argus instance create [flags]
```
-y, --assume-yes If set, skips all confirmation prompts
--async If set, runs the command asynchronously
-o, --output-format string Output format, one of ["json" "pretty" "none"]
-o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"]
-p, --project-id string Project ID
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
```
Expand Down
2 changes: 1 addition & 1 deletion docs/stackit_argus_instance_delete.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ stackit argus instance delete INSTANCE_ID [flags]
```
-y, --assume-yes If set, skips all confirmation prompts
--async If set, runs the command asynchronously
-o, --output-format string Output format, one of ["json" "pretty" "none"]
-o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"]
-p, --project-id string Project ID
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
```
Expand Down
2 changes: 1 addition & 1 deletion docs/stackit_argus_instance_describe.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ stackit argus instance describe INSTANCE_ID [flags]
```
-y, --assume-yes If set, skips all confirmation prompts
--async If set, runs the command asynchronously
-o, --output-format string Output format, one of ["json" "pretty" "none"]
-o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"]
-p, --project-id string Project ID
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
```
Expand Down
2 changes: 1 addition & 1 deletion docs/stackit_argus_instance_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ stackit argus instance list [flags]
```
-y, --assume-yes If set, skips all confirmation prompts
--async If set, runs the command asynchronously
-o, --output-format string Output format, one of ["json" "pretty" "none"]
-o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"]
-p, --project-id string Project ID
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
```
Expand Down
2 changes: 1 addition & 1 deletion docs/stackit_argus_instance_update.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ stackit argus instance update INSTANCE_ID [flags]
```
-y, --assume-yes If set, skips all confirmation prompts
--async If set, runs the command asynchronously
-o, --output-format string Output format, one of ["json" "pretty" "none"]
-o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"]
-p, --project-id string Project ID
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
```
Expand Down
2 changes: 1 addition & 1 deletion docs/stackit_argus_plans.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ stackit argus plans [flags]
```
-y, --assume-yes If set, skips all confirmation prompts
--async If set, runs the command asynchronously
-o, --output-format string Output format, one of ["json" "pretty" "none"]
-o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"]
-p, --project-id string Project ID
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
```
Expand Down
2 changes: 1 addition & 1 deletion docs/stackit_argus_scrape-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ stackit argus scrape-config [flags]
```
-y, --assume-yes If set, skips all confirmation prompts
--async If set, runs the command asynchronously
-o, --output-format string Output format, one of ["json" "pretty" "none"]
-o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"]
-p, --project-id string Project ID
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
```
Expand Down
2 changes: 1 addition & 1 deletion docs/stackit_argus_scrape-config_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ stackit argus scrape-config create [flags]
```
-y, --assume-yes If set, skips all confirmation prompts
--async If set, runs the command asynchronously
-o, --output-format string Output format, one of ["json" "pretty" "none"]
-o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"]
-p, --project-id string Project ID
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
```
Expand Down
2 changes: 1 addition & 1 deletion docs/stackit_argus_scrape-config_delete.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ stackit argus scrape-config delete JOB_NAME [flags]
```
-y, --assume-yes If set, skips all confirmation prompts
--async If set, runs the command asynchronously
-o, --output-format string Output format, one of ["json" "pretty" "none"]
-o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"]
-p, --project-id string Project ID
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
```
Expand Down
2 changes: 1 addition & 1 deletion docs/stackit_argus_scrape-config_describe.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ stackit argus scrape-config describe JOB_NAME [flags]
```
-y, --assume-yes If set, skips all confirmation prompts
--async If set, runs the command asynchronously
-o, --output-format string Output format, one of ["json" "pretty" "none"]
-o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"]
-p, --project-id string Project ID
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
```
Expand Down
2 changes: 1 addition & 1 deletion docs/stackit_argus_scrape-config_generate-payload.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ stackit argus scrape-config generate-payload [flags]
```
-y, --assume-yes If set, skips all confirmation prompts
--async If set, runs the command asynchronously
-o, --output-format string Output format, one of ["json" "pretty" "none"]
-o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"]
-p, --project-id string Project ID
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
```
Expand Down
2 changes: 1 addition & 1 deletion docs/stackit_argus_scrape-config_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ stackit argus scrape-config list [flags]
```
-y, --assume-yes If set, skips all confirmation prompts
--async If set, runs the command asynchronously
-o, --output-format string Output format, one of ["json" "pretty" "none"]
-o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"]
-p, --project-id string Project ID
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
```
Expand Down
2 changes: 1 addition & 1 deletion docs/stackit_argus_scrape-config_update.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ stackit argus scrape-config update JOB_NAME [flags]
```
-y, --assume-yes If set, skips all confirmation prompts
--async If set, runs the command asynchronously
-o, --output-format string Output format, one of ["json" "pretty" "none"]
-o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"]
-p, --project-id string Project ID
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
```
Expand Down
2 changes: 1 addition & 1 deletion docs/stackit_auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ stackit auth [flags]
```
-y, --assume-yes If set, skips all confirmation prompts
--async If set, runs the command asynchronously
-o, --output-format string Output format, one of ["json" "pretty" "none"]
-o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"]
-p, --project-id string Project ID
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
```
Expand Down
2 changes: 1 addition & 1 deletion docs/stackit_auth_activate-service-account.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ stackit auth activate-service-account [flags]
```
-y, --assume-yes If set, skips all confirmation prompts
--async If set, runs the command asynchronously
-o, --output-format string Output format, one of ["json" "pretty" "none"]
-o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"]
-p, --project-id string Project ID
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
```
Expand Down
2 changes: 1 addition & 1 deletion docs/stackit_auth_login.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ stackit auth login [flags]
```
-y, --assume-yes If set, skips all confirmation prompts
--async If set, runs the command asynchronously
-o, --output-format string Output format, one of ["json" "pretty" "none"]
-o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"]
-p, --project-id string Project ID
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
```
Expand Down
2 changes: 1 addition & 1 deletion docs/stackit_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ stackit config [flags]
```
-y, --assume-yes If set, skips all confirmation prompts
--async If set, runs the command asynchronously
-o, --output-format string Output format, one of ["json" "pretty" "none"]
-o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"]
-p, --project-id string Project ID
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
```
Expand Down
2 changes: 1 addition & 1 deletion docs/stackit_config_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ stackit config list [flags]
```
-y, --assume-yes If set, skips all confirmation prompts
--async If set, runs the command asynchronously
-o, --output-format string Output format, one of ["json" "pretty" "none"]
-o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"]
-p, --project-id string Project ID
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
```
Expand Down
2 changes: 1 addition & 1 deletion docs/stackit_config_set.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ stackit config set [flags]
```
-y, --assume-yes If set, skips all confirmation prompts
--async If set, runs the command asynchronously
-o, --output-format string Output format, one of ["json" "pretty" "none"]
-o, --output-format string Output format, one of ["json" "pretty" "none" "yaml"]
-p, --project-id string Project ID
--verbosity string Verbosity of the CLI, one of ["debug" "info" "warning" "error"] (default "info")
```
Expand Down
Loading