CLI Configuration
Configure the AskVerdict CLI: config file location, all options, environment variables, multiple profiles, and BYOK key setup.
The AskVerdict CLI stores its configuration in a JSON file in your home directory. You can also set environment variables to override file config on a per-session or per-command basis.
Config file location
~/.askverdict/config.jsonThe directory and file are created automatically on first use. The exact path depends on your OS:
| OS | Path |
|---|---|
| macOS | /Users/<you>/.askverdict/config.json |
| Linux | /home/<you>/.askverdict/config.json |
| Windows (WSL) | /home/<you>/.askverdict/config.json |
Check where your config file lives:
askverdict config show --json | jq -r '.configFile'
# /Users/alice/.askverdict/config.jsonConfig file format
The config file is a plain JSON object. All fields are optional — missing fields fall back to defaults.
{
"apiUrl": "https://api.askverdict.ai",
"authToken": "vrd_your_api_key_here"
}Fields:
| Field | Type | Default | Description |
|---|---|---|---|
apiUrl | string | https://api.askverdict.ai | The API base URL all commands connect to |
authToken | string | — | Your API key or auth token. Used for all authenticated commands. |
Keep your token secret
The config file is stored in plaintext. Do not commit it to version control. The file permissions are set to your user only (600) on creation.
Managing config with the CLI
Use askverdict config subcommands to read and update config without editing the file directly.
Show current config
askverdict config showOutput:
Configuration
Config file: /Users/alice/.askverdict/config.json
API URL: https://api.askverdict.ai
Auth token: [set]The token value is always masked in display output. Use --json to get the structure (token still masked as "[set]"):
askverdict config show --json
# {
# "apiUrl": "https://api.askverdict.ai",
# "authToken": "[set]",
# "configFile": "/Users/alice/.askverdict/config.json"
# }Set your API token
askverdict config set-token vrd_your_api_key_hereThis writes the token to ~/.askverdict/config.json. All subsequent commands use it automatically.
Get your API key from the Developer Portal.
Set the API URL
askverdict config set-url https://api.askverdict.aiThe URL is validated before saving — an error is shown if it is not a valid URL. The trailing slash is stripped automatically.
Useful when pointing at a staging or self-hosted deployment:
# Staging
askverdict config set-url https://api-staging.askverdict.ai
# Local development server
askverdict config set-url http://localhost:3035Clear the saved token
askverdict config clear-tokenRemoves the authToken field from the config file. The CLI will require a token via environment variable or --token flag on the next command.
Reset all config to defaults
askverdict config resetWrites {} to the config file, clearing all saved values and reverting to defaults.
Environment variables
Environment variables always take precedence over values in the config file. Use them for CI/CD, Docker containers, or any context where you do not want to write to disk.
| Variable | Description |
|---|---|
ASKVERDICT_TOKEN | API key or auth token. Overrides authToken in config file. |
ASKVERDICT_API_URL | API base URL. Overrides apiUrl in config file. Defaults to https://api.askverdict.ai. |
NO_COLOR | Set to any non-empty value to disable colored terminal output. |
Precedence order (highest to lowest)
--tokenflag on the command lineASKVERDICT_TOKENenvironment variableauthTokenin~/.askverdict/config.json
For the API URL:
ASKVERDICT_API_URLenvironment variableapiUrlin~/.askverdict/config.json- Built-in default (
https://api.askverdict.ai)
Setting env vars in your shell profile
# ~/.zshrc or ~/.bashrc
export ASKVERDICT_TOKEN="vrd_your_api_key_here"
export ASKVERDICT_API_URL="https://api.askverdict.ai"Reload your shell after editing:
source ~/.zshrc # zsh
source ~/.bashrc # bashPer-command token override
Pass --token on any command to use a different token for that invocation only. This does not modify the config file.
# Use a team token for one command
askverdict list --token vrd_team_key_abc
# Use a personal token even if env var is set
askverdict whoami --token vrd_personal_key_xyzMultiple profiles
The CLI does not have built-in profile support, but you can manage multiple configurations using environment variables or by swapping config files with a shell function.
Method 1 — environment variable per session
Keep each workspace/project in a separate terminal session with its own token:
# Terminal A — personal account
export ASKVERDICT_TOKEN="vrd_personal_key"
# Terminal B — work account
export ASKVERDICT_TOKEN="vrd_work_key"Method 2 — config file profiles with a shell function
Store multiple config files and switch between them with a shell alias:
# Create a directory for profiles
mkdir -p ~/.askverdict/profiles
# Save your personal config
cat > ~/.askverdict/profiles/personal.json <<'EOF'
{
"apiUrl": "https://api.askverdict.ai",
"authToken": "vrd_personal_key_here"
}
EOF
# Save your work config
cat > ~/.askverdict/profiles/work.json <<'EOF'
{
"apiUrl": "https://api.askverdict.ai",
"authToken": "vrd_work_key_here"
}
EOF
# Add a shell function to switch profiles
# Add to ~/.zshrc or ~/.bashrc:
avprofile() {
local profile="${1:-}"
if [[ -z "$profile" ]]; then
echo "Usage: avprofile <profile-name>"
echo "Available: $(ls ~/.askverdict/profiles/*.json | xargs -I{} basename {} .json | tr '\n' ' ')"
return 1
fi
local src="$HOME/.askverdict/profiles/${profile}.json"
if [[ ! -f "$src" ]]; then
echo "Profile not found: $src" >&2
return 1
fi
cp "$src" "$HOME/.askverdict/config.json"
echo "Switched to profile: $profile"
askverdict config show
}# Reload shell, then switch profiles
source ~/.zshrc
avprofile personal # switches to personal config
avprofile work # switches to work configMethod 3 — direnv per project
Use direnv to set ASKVERDICT_TOKEN automatically when you enter a project directory:
# In your project root
cat > .envrc <<'EOF'
export ASKVERDICT_TOKEN="vrd_project_key_here"
export ASKVERDICT_API_URL="https://api.askverdict.ai"
EOF
direnv allow .The token is loaded automatically when you cd into the project and unloaded when you leave.
BYOK key configuration
If you have a BYOK (Bring Your Own Key) or BYOK Pro plan, you can supply your own AI provider keys for debate requests. Provider keys are never stored server-side — they are passed per-request via the X-Provider-Keys header.
For shell automation that needs BYOK keys, use the SDK in a Node.js script:
import { AskVerdictClient } from "@askverdict/sdk";
const client = new AskVerdictClient({
baseUrl: process.env.ASKVERDICT_API_URL ?? "https://api.askverdict.ai",
authToken: process.env.ASKVERDICT_TOKEN!,
providerKeys: {
anthropic: process.env.ANTHROPIC_API_KEY,
openai: process.env.OPENAI_API_KEY,
},
});
const { debateId } = await client.createDebate({
question: "Should we migrate to Edge Functions?",
mode: "thorough",
});
console.log("Created:", debateId);Config in CI/CD environments
In CI/CD pipelines, use environment variables exclusively — do not create or commit config files.
GitHub Actions
jobs:
analyze:
runs-on: ubuntu-latest
steps:
- name: Install CLI
run: npm install -g @askverdict/cli
- name: Check API health
env:
ASKVERDICT_TOKEN: ${{ secrets.ASKVERDICT_API_KEY }}
run: askverdict health
- name: Run debate
env:
ASKVERDICT_TOKEN: ${{ secrets.ASKVERDICT_API_KEY }}
ASKVERDICT_API_URL: https://api.askverdict.ai
run: |
askverdict debate "Should we ship this feature?" \
--mode fast \
--no-stream \
--json | jq '.debateId'Docker
FROM node:22-alpine
RUN npm install -g @askverdict/cli
# Pass token at runtime — never bake keys into images
ENV ASKVERDICT_TOKEN=""
ENV ASKVERDICT_API_URL="https://api.askverdict.ai"
ENTRYPOINT ["askverdict"]docker run --rm \
-e ASKVERDICT_TOKEN="vrd_your_key" \
my-askverdict-image \
list --status completed --jsonTroubleshooting
"No auth token found"
The CLI cannot find a token. Fix with any of:
# Option 1 — save to config file
askverdict config set-token vrd_your_key
# Option 2 — environment variable
export ASKVERDICT_TOKEN=vrd_your_key
# Option 3 — per-command flag
askverdict list --token vrd_your_key"Not a valid URL" on set-url
The URL must include a scheme (https:// or http://):
# Wrong
askverdict config set-url api.askverdict.ai
# Correct
askverdict config set-url https://api.askverdict.aiInspect the raw config file
cat ~/.askverdict/config.jsonIf the file is malformed JSON, the CLI silently falls back to defaults. Reset it:
askverdict config resetDisable color output
Set NO_COLOR to suppress ANSI codes — useful when piping to log files:
NO_COLOR=1 askverdict listWas this page helpful?