Options
Options, also known as flags, provide additional, optional functionality to use with a CLI command.
To see all valid options for a command, run it with --help or visit the GitHub repository.
Getting help
Add --help to any command to see its usage, arguments, and available flags.
JSON output
Use --json to return the full API response as structured JSON. This is useful for scripting or when you need to inspect the complete response.
box files:get 123456 --json
CSV output
Use --csv to return results as a CSV. This pairs well with --save to produce reports you can open in a spreadsheet.
box folders:items 0 --csv --save
Filtering fields
Use --fields to specify only the fields you need in the response. This reduces output noise and can speed up calls that would otherwise return a large number of fields.
box folders:items 0 --fields id,name,login
Saving output
Save to the default reports folder
Use --save to write output to the default reports directory.
box folders:items 0 --csv --save
Save to a custom path
Use --save-to-file-path to override the default location and write output to a specific location.
box folders:items 0 --json --save-to-file-path ./exports/users.json
Scripting and automation
Skip confirmation prompts
Use --yes to automatically answer yes to any confirmation prompt. This is useful when running the CLI in scripts or automated pipelines.
box folders:delete 123456 --yes
Disable color
Use --no-color to strip ANSI color codes from output. This is recommended when capturing output in log files or CI environments where color codes can corrupt output.
box folders:items 0 --no-color
Debugging
Use --verbose to print detailed output including request and response metadata. Add this flag when troubleshooting unexpected errors.
box folders:items 0 --verbose
Using a specific token
Use --token to authenticate a single command with a specific access token, overriding the configured default environment. This is useful when testing tokens or running one-off calls without switching environments.
box folders:items 0 --token YOUR_ACCESS_TOKEN
Use the option to perform an action on behalf of another user.
For example, the following command creates a folder called Example_Folder
at the root level in user ID 123456’s account.
box folders:create 0 Example_Folder --as-user=123456
Only Service Accounts and Admins are able to use the as-user header.
If your application was not authorized with the necessary scopes or you
configured your CLI to obtain a default token for another user, this call may
fail. Add -v or --verbose to your command for verbose error logging.