CLI

Configuration

Config files, environment variables, and how the CLI resolves URLs and credentials.

Config files

The CLI stores state under $XDG_CONFIG_HOME/graphon (or ~/.config/graphon). Files use owner-only permissions.

Files

~/.config/graphon/credentials.json   # access + refresh tokens
~/.config/graphon/config.json        # workspace id and service URLs

Choose a workspace

Set the default workspace once. Commands that need a workspace use it unless you pass --workspace.

Workspace

graphon workspaces list
graphon workspaces use <workspaceId>
graphon workspaces current

Environment variables

Every setting has an environment variable and a flag. Use GRAPHON_API_KEY to run with a static key instead of a browser login, which suits CI.

Environment

export GRAPHON_API_KEY="gsk_..."      # a static key instead of a login
export GRAPHON_WORKSPACE="<workspaceId>"
export GRAPHON_API_URL="https://api.beta.graphon.ai"
export GRAPHON_G4_URL="https://g4.beta.graphon.ai"
export GRAPHON_APP_URL="https://app.beta.graphon.ai"

How a value is chosen

The CLI resolves each setting in this order:

  1. A command flag, for example --workspace.
  2. An environment variable, for example GRAPHON_WORKSPACE.
  3. The value saved in config.json.
  4. The built-in default (the beta hosts).

Credential order

For the bearer token, --token wins, then GRAPHON_API_KEY, then your stored login.

Output

  • Add --json to print the raw JSON response.
  • Exit codes: 0 success, 2 bad usage, 1 an API or network error.
Was this page helpful?