Skip to content

Global Flags

These flags are available on all commands:

FlagShortDescription
--confCustom config file path
--format-fOutput format: table, simple, detailed, json
--org-oOrganization name (overrides config default)
--help-hHelp for the command

NDCLI supports four output formats that can be set globally or per-command:

Terminal window
ndcli device list -f table

Human-readable tabular format, ideal for terminal viewing.

Terminal window
ndcli device list -f simple

Compact bullet-point format for quick scanning.

Terminal window
ndcli device describe my-device -f detailed

Unicode box drawing with the full set of fields for the resource. This is the default format.

Terminal window
ndcli device list -f json

Machine-readable JSON output for scripting and automation.

You can set your preferred default format in the configuration:

Terminal window
ndcli config set output detailed

Or override per-command using the -f flag.

A failed command exits non-zero and prints its error on standard error, so standard output stays free of it. When the server gave the failure a code, the code leads the message in square brackets:

Error: [SNIPPET_UUID_IN_USE] 'uuid' is already used by snippet 'web-servers' in this organization; omit it and NetDefense generates one

With -f json (or json as your default format), the error is a JSON document on standard error instead. code is left out when the server sent none:

{
"error": {
"code": "SNIPPET_UUID_IN_USE",
"message": "'uuid' is already used by snippet 'web-servers' in this organization; omit it and NetDefense generates one"
}
}

The per-device lines of sync apply and device approve-all carry the same [CODE] prefix. The MCP server reports the same code and message as error.code and error.message.