Configuration
CLI configuration files, environment variables, and credential storage.
Configuration
Grape stores configuration and credentials in the user's config directory.
File Locations
| File | Purpose |
|---|---|
~/.config/grape/auth.json | CLI authentication tokens (access + refresh JWT) |
~/.config/grape/worker.json | Self-hosted Tendril credentials (worker ID + token) |
auth.json
Created by grape login. Contains JWT tokens for API authentication:
{
"access_token": "eyJ...",
"refresh_token": "eyJ...",
"expires_at": "2026-06-02T15:30:00Z"
}The access token is refreshed automatically before each API call if expired. See Authentication.
worker.json
Created by grape worker register. Contains self-hosted Tendril credentials:
{
"worker_id": "uuid",
"worker_token": "plaintext-token",
"api_url": "https://trellis.example.com"
}Used by grape worker start to authenticate with the Trellis API.
Environment Variables
| Variable | Default | Purpose |
|---|---|---|
GRAPE_WEB_ORIGIN | Production URL (baked at build time) | Override the Trellis API base URL |
This is the only environment variable Grape uses. All other configuration comes from the JSON files above or command-line flags.
Build-Time Configuration
The GoReleaser build injects GRAPE_WEB_ORIGIN as an ldflags variable. The production build points to the production Trellis URL. For development, override with the environment variable:
export GRAPE_WEB_ORIGIN=http://localhost:3000
grape login # authenticates against local server