Skip to main content

Environment Variables

Config Directory

The CLI stores configuration in a platform-specific directory:

Files

The credentials file has 0600 permissions (readable by owner only) and contains:

Update Checks

In interactive terminals, the CLI periodically checks npm for the latest @outlit/cli version and caches the result in update-check.json. Cached notices are printed to stderr and never affect JSON output.
Use outlit upgrade to update with the same package manager that installed the CLI when it can be inferred.

Shell Completions

Generate completion scripts for your shell:

Output Behavior

TTY Mode (Interactive)

When running in an interactive terminal, the CLI outputs:
  • Tables with Unicode box-drawing characters for list commands
  • Spinners on stderr during API calls
  • Colored output with green checkmarks for success
  • Pagination hints showing total count and next cursor
Example:

JSON Mode

When JSON mode is active, all output is pretty-printed JSON on stdout:
Errors are also JSON, written to stderr:

When JSON Mode Activates

JSON mode activates automatically in any of these conditions:
This means AI agents (Claude Code, Cursor, etc.) automatically get JSON output when they run CLI commands as subprocesses — no extra configuration needed.

Error Handling

All errors exit with code 1. The error format depends on the output mode: TTY:
JSON (stderr):

Error Codes

Data Formatting

The CLI formats values for readability in TTY mode:

Relative Date Format

Scripting Examples

Export All Customers

Export to CSV

CI Health Check

Filter Inactive Users