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 URLsChoose 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 currentEnvironment 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:
- A command flag, for example
--workspace. - An environment variable, for example
GRAPHON_WORKSPACE. - The value saved in
config.json. - 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
--jsonto print the raw JSON response. - Exit codes:
0success,2bad usage,1an API or network error.
Was this page helpful?