Aller au contenu principal

Configuration

orbiads-cli stores its configuration in ~/.orbiads/config.json. All settings can be defined via the orbiads config command or by editing the file directly.

Configuration file

Stored in your home directory (created by orbiads auth login)
~/.orbiads/config.json

On Linux and macOS the directory is created with mode 700 and the file with mode 600, because it holds your access tokens. Never commit or share it.

config.json
{
  "apiUrl": "https://<your-orbiads-backend>",
  "networkCode": "66235823",
  "defaultOutput": "table",
  "token": "<access token, written by orbiads auth login>",
  "refreshToken": "<refresh token, written by orbiads auth login>"
}

Configuration fields

FieldTypeDescriptionDefault
apiUrlstringBase URL of the OrbiAds backend the CLI talks to.built-in backend URL
networkCodestringDefault Google Ad Manager network code. Set by orbiads auth login and orbiads network switch.not set
defaultOutputstringStored output format preference: table, json or csv. Choose the format of a single command with --output or --json."table"
tokenstringAccess token written by orbiads auth login. Masked by orbiads config show.set by login
refreshTokenstringRefresh token used to renew the access token automatically. Masked by orbiads config show.set by login

Read and update settings

Use the config command instead of editing the file by hand. It requires a prior orbiads auth login.

$ orbiads config show
$ orbiads config set --network-code 66235823
$ orbiads config set --default-output json

Environment variables

The CLI reads these environment variables. There is no environment variable for the token or the network code: use orbiads auth login and orbiads network switch.

VariableEffect
ORBIADS_API_URLOverrides the built-in default backend URL (used when login creates the configuration file).
ORBIADS_FIREBASE_KEYOverrides the built-in Firebase Web API key used to refresh tokens. Intended for staging or self-hosted builds.

Shell completion

Install tab completion for your shell with the built-in command, then restart your terminal.

$ orbiads --install-completion

Supported shells: Bash, Zsh, Fish and PowerShell. Run orbiads --show-completion to print the script instead of installing it.

Output formats

Data goes to stdout and messages to stderr, so output can be piped safely. Pick a format per command with the global --output flag, or use --json.

--output table

Human-readable table (default in an interactive terminal).

NAME              STATUS       IMPRESSIONS
My Campaign       DELIVERING   1,234,567
Summer Promo      DRAFT        0
--output json

Machine-readable JSON, ideal for scripts and AI agents. Also used automatically when stdout is piped.

[
  {
    "name": "My Campaign",
    "status": "DELIVERING",
    "impressions": 1234567
  }
]
--output csv

Comma-separated values for spreadsheets and data pipelines.

name,status,impressions
My Campaign,DELIVERING,1234567
Summer Promo,DRAFT,0