Configuration
Config files, install files, environment variables, and how the CLI resolves the workspace and credentials.
Config files
The CLI stores your login and settings under $XDG_CONFIG_HOME/graphon (or ~/.config/graphon). Files use owner-only permissions.
~/.config/graphon/production/credentials.json # access + refresh tokens
~/.config/graphon/production/config.json # the selected workspaceThe installer keeps the program under ~/.local. XDG_DATA_HOME replaces ~/.local/share when it is set.
~/.local/bin/graphon # the command (a copy on Windows)
~/.local/share/graphon/install.json # the installed version
~/.local/share/graphon/runtimes/ # the runtime: Node.js and a small launcher
~/.local/share/graphon/app/ # the CLI code, one folder per versionChoose a workspace
Set the default workspace once. Commands that need a workspace use it unless you pass --workspace.
graphon workspaces list
graphon workspaces use <workspaceId>
graphon workspaces currentEnvironment variables
Use GRAPHON_API_KEY to run with an API key instead of a browser login, which suits CI. The CLI also reads the standard proxy variables.
export GRAPHON_API_KEY="gak_..." # an API key instead of a login
export HTTPS_PROXY="http://proxy.example:8080" # send requests through a proxy
export NO_PROXY="localhost,127.0.0.1"How a value is chosen
The CLI resolves each setting in this order:
- A command flag, for example
--workspace. - The value saved in
config.json.
Credential order
--token wins, then GRAPHON_API_KEY, then your stored login. --token and GRAPHON_API_KEY take only an API key, which starts with gak_.Output
- Add
--jsonto print the raw JSON response. - Exit codes:
0success,2bad usage,1an API or network error.
Was this page helpful?