Documentation for `scw help`
The CLI documentation pages are currently under construction
The content is up to date. We're making improvements to the site over the next few weeks for a better experience.
Get help about how specific topics inside the CLI work
Get help about how date parsing works in the CLI
Date parsing
You have two ways for managing date in the CLI: Absolute and Relative
-
Absolute time
Absolute time refers to a specific and absolute point in time. CLI uses RFC3339 to parse those time and pass a time.Time go structure to the underlying functions.
Example: "2006-01-02T15:04:05Z07:00"
-
Relative time
Relative time refers to a time calculated from adding a given duration to the time when a command is launched.
Example:
- +1d4m => current time plus 1 day and 4 minutes
- -1d4m => current time minus 1 day and 4 minutes
-
Units of time
Nanosecond: ns Microsecond: us, µs (U+00B5 = micro symbol), μs (U+03BC = Greek letter mu) Millisecond: ms Second: s, sec, second, seconds Minute: m, min, minute, minutes Hour: h, hr, hour, hours Day: d, day, days Week: w, wk, week, weeks Month: mo, mon, month, months Year: y, yr, year, years
Date parsing
You have two ways for managing date in the CLI: Absolute and Relative
-
Absolute time
Absolute time refers to a specific and absolute point in time. CLI uses RFC3339 to parse those time and pass a time.Time go structure to the underlying functions.
Example: "2006-01-02T15:04:05Z07:00"
-
Relative time
Relative time refers to a time calculated from adding a given duration to the time when a command is launched.
Example:
- +1d4m => current time plus 1 day and 4 minutes
- -1d4m => current time minus 1 day and 4 minutes
-
Units of time
Nanosecond: ns Microsecond: us, µs (U+00B5 = micro symbol), μs (U+03BC = Greek letter mu) Millisecond: ms Second: s, sec, second, seconds Minute: m, min, minute, minutes Hour: h, hr, hour, hours Day: d, day, days Week: w, wk, week, weeks Month: mo, mon, month, months Year: y, yr, year, years
Usage:
Code
Get help about how the CLI output works
Output formatting in the CLI
Human output (default one)
Code
Human with column selection
You can select the columns that you want to print with commands that return a list
Code
Wide output (Human without column shrinking)
Code
Wide with column selection
You can select the columns that you want to print with commands that return a list
Code
Standard JSON output
Code
Pretty JSON output
Code
Standard YAML output
Code
Template output
You can use Go template to manipulate the output of a command and create a custom rendering of your resources. Visit https://golang.org/pkg/text/template/Open in new context to learn more about Go template format.
Code
In case the command returns data that is not correctly converted, for instance a []byte, you can use the json function to marshal the data as json and print it as is.
Code
Output formatting in the CLI
Human output (default one)
Code
Human with column selection
You can select the columns that you want to print with commands that return a list
Code
Wide output (Human without column shrinking)
Code
Wide with column selection
You can select the columns that you want to print with commands that return a list
Code
Standard JSON output
Code
Pretty JSON output
Code
Standard YAML output
Code
Template output
You can use Go template to manipulate the output of a command and create a custom rendering of your resources. Visit https://golang.org/pkg/text/template/Open in new context to learn more about Go template format.
Code
In case the command returns data that is not correctly converted, for instance a []byte, you can use the json function to marshal the data as json and print it as is.
Code
Usage:
Code