mirror of
https://github.com/balena-io/balena-cli.git
synced 2025-02-06 11:10:10 +00:00
Add hint about the 'jq' utility in the documentation of the --json option
Change-type: patch Signed-off-by: Paulo Castro <paulo@balena.io>
This commit is contained in:
parent
290c06074a
commit
edd755d41c
@ -579,16 +579,15 @@ confirm non interactively
|
|||||||
List the supported device types (like 'raspberrypi3' or 'intel-nuc').
|
List the supported device types (like 'raspberrypi3' or 'intel-nuc').
|
||||||
|
|
||||||
The --verbose option adds extra columns/fields to the output, including the
|
The --verbose option adds extra columns/fields to the output, including the
|
||||||
"STATE" column whose values are one of 'beta', 'release' or 'discontinued'.
|
"STATE" column whose values are one of 'beta', 'released' or 'discontinued'.
|
||||||
However, 'discontinued' device types are only listed if the '--discontinued'
|
However, 'discontinued' device types are only listed if the '--discontinued'
|
||||||
option is used.
|
option is used.
|
||||||
|
|
||||||
The --json option is recommended when scripting the output of this command
|
The --json option is recommended when scripting the output of this command,
|
||||||
(perhaps in combination with the [jq
|
because the JSON format is less likely to change and it better represents data
|
||||||
utility](https://stedolan.github.io/jq/manual/)), as it is more parser
|
types like lists and empty strings (for example, the ALIASES column contains a
|
||||||
friendly (e.g. the ALIASES column contains a list of zero or more values)
|
list of zero or more values). The 'jq' utility may be helpful in shell scripts
|
||||||
and also more "stable" in relation to added or reordered columns in tabular
|
(https://stedolan.github.io/jq/manual/).
|
||||||
output (which is intended for "human eyes").
|
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
@ -636,14 +635,16 @@ SERVICE columns to distinguish between application-wide, device-specific and
|
|||||||
service-specific variables. As asterisk in these columns indicates that the
|
service-specific variables. As asterisk in these columns indicates that the
|
||||||
variable applies to "all devices" or "all services".
|
variable applies to "all devices" or "all services".
|
||||||
|
|
||||||
If you are parsing the output in a script, please select the JSON format with
|
The --json option is recommended when scripting the output of this command,
|
||||||
the '-j' option. This avoids future compatibility issues if columns are added,
|
because the JSON format is less likely to change and it better represents data
|
||||||
renamed or reordered. Also, when the JSON format is selected, an empty JSON
|
types like lists and empty strings. The 'jq' utility may be helpful in shell
|
||||||
array ([]) is printed instead of an error message when no variables exist for
|
scripts (https://stedolan.github.io/jq/manual/). When --json is used, an empty
|
||||||
the given query. When querying variables for a device, note that the application
|
JSON array ([]) is printed instead of an error message when no variables exist
|
||||||
name may be null in JSON output (or 'N/A' in tabular output) if the application
|
for the given query. When querying variables for a device, note that the
|
||||||
linked to the device is no longer accessible by the current user (for example,
|
application name may be null in JSON output (or 'N/A' in tabular output) if the
|
||||||
in case the current user has been removed from the application by its owner).
|
application linked to the device is no longer accessible by the current user
|
||||||
|
(for example, in case the current user has been removed from the application
|
||||||
|
by its owner).
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
@ -986,8 +987,11 @@ show additional commands
|
|||||||
## version
|
## version
|
||||||
|
|
||||||
Display version information for the balena CLI and/or Node.js.
|
Display version information for the balena CLI and/or Node.js.
|
||||||
If you intend to parse the output, please use the -j option for
|
|
||||||
JSON output, as its format is more stable.
|
The --json option is recommended when scripting the output of this command,
|
||||||
|
because the JSON format is less likely to change and it better represents
|
||||||
|
data types like lists and empty strings. The 'jq' utility may be helpful
|
||||||
|
in shell scripts (https://stedolan.github.io/jq/manual/).
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
|
@ -40,16 +40,15 @@ export default class DevicesSupportedCmd extends Command {
|
|||||||
List the supported device types (like 'raspberrypi3' or 'intel-nuc').
|
List the supported device types (like 'raspberrypi3' or 'intel-nuc').
|
||||||
|
|
||||||
The --verbose option adds extra columns/fields to the output, including the
|
The --verbose option adds extra columns/fields to the output, including the
|
||||||
"STATE" column whose values are one of 'beta', 'release' or 'discontinued'.
|
"STATE" column whose values are one of 'beta', 'released' or 'discontinued'.
|
||||||
However, 'discontinued' device types are only listed if the '--discontinued'
|
However, 'discontinued' device types are only listed if the '--discontinued'
|
||||||
option is used.
|
option is used.
|
||||||
|
|
||||||
The --json option is recommended when scripting the output of this command
|
The --json option is recommended when scripting the output of this command,
|
||||||
(perhaps in combination with the [jq
|
because the JSON format is less likely to change and it better represents data
|
||||||
utility](https://stedolan.github.io/jq/manual/)), as it is more parser
|
types like lists and empty strings (for example, the ALIASES column contains a
|
||||||
friendly (e.g. the ALIASES column contains a list of zero or more values)
|
list of zero or more values). The 'jq' utility may be helpful in shell scripts
|
||||||
and also more "stable" in relation to added or reordered columns in tabular
|
(https://stedolan.github.io/jq/manual/).
|
||||||
output (which is intended for "human eyes").
|
|
||||||
`;
|
`;
|
||||||
public static examples = [
|
public static examples = [
|
||||||
'$ balena devices supported',
|
'$ balena devices supported',
|
||||||
|
@ -80,14 +80,16 @@ export default class EnvsCmd extends Command {
|
|||||||
service-specific variables. As asterisk in these columns indicates that the
|
service-specific variables. As asterisk in these columns indicates that the
|
||||||
variable applies to "all devices" or "all services".
|
variable applies to "all devices" or "all services".
|
||||||
|
|
||||||
If you are parsing the output in a script, please select the JSON format with
|
The --json option is recommended when scripting the output of this command,
|
||||||
the '-j' option. This avoids future compatibility issues if columns are added,
|
because the JSON format is less likely to change and it better represents data
|
||||||
renamed or reordered. Also, when the JSON format is selected, an empty JSON
|
types like lists and empty strings. The 'jq' utility may be helpful in shell
|
||||||
array ([]) is printed instead of an error message when no variables exist for
|
scripts (https://stedolan.github.io/jq/manual/). When --json is used, an empty
|
||||||
the given query. When querying variables for a device, note that the application
|
JSON array ([]) is printed instead of an error message when no variables exist
|
||||||
name may be null in JSON output (or 'N/A' in tabular output) if the application
|
for the given query. When querying variables for a device, note that the
|
||||||
linked to the device is no longer accessible by the current user (for example,
|
application name may be null in JSON output (or 'N/A' in tabular output) if the
|
||||||
in case the current user has been removed from the application by its owner).
|
application linked to the device is no longer accessible by the current user
|
||||||
|
(for example, in case the current user has been removed from the application
|
||||||
|
by its owner).
|
||||||
`;
|
`;
|
||||||
public static examples = [
|
public static examples = [
|
||||||
'$ balena envs --application MyApp',
|
'$ balena envs --application MyApp',
|
||||||
|
@ -34,8 +34,11 @@ export default class VersionCmd extends Command {
|
|||||||
Display version information for the balena CLI and/or Node.js.
|
Display version information for the balena CLI and/or Node.js.
|
||||||
|
|
||||||
Display version information for the balena CLI and/or Node.js.
|
Display version information for the balena CLI and/or Node.js.
|
||||||
If you intend to parse the output, please use the -j option for
|
|
||||||
JSON output, as its format is more stable.
|
The --json option is recommended when scripting the output of this command,
|
||||||
|
because the JSON format is less likely to change and it better represents
|
||||||
|
data types like lists and empty strings. The 'jq' utility may be helpful
|
||||||
|
in shell scripts (https://stedolan.github.io/jq/manual/).
|
||||||
`;
|
`;
|
||||||
public static examples = [
|
public static examples = [
|
||||||
'$ balena version',
|
'$ balena version',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user