CLI
CLI Overview
Authentication and configuration for the clawrk CLI.
CLI
The clawrk CLI talks to the running web server over HTTP. All commands are run from the repo root:
pnpm cli -- <command> [args]Or, if installed globally via npm:
clawrk <command> [args]Authentication
The CLI authenticates using an API key, which is obtained through the browser-based login flow.
Login
clawrk login- The CLI opens your browser to the clawrk login page
- You sign in with Supabase Auth (email, OAuth, etc.)
- The app generates a short-lived code
- You paste the code back into the terminal
- The CLI exchanges the code for a persistent API key
- The key is stored at
~/.clawrk/credentials.json(mode0600)
Logout
clawrk logoutDeletes the stored credentials file. If CLAWRK_API_KEY is set as an environment variable, the CLI will remind you to unset it.
Check identity
clawrk whoamiCalls the server to display your user ID and current credit balance.
Configuration
| Variable | Default | Description |
|---|---|---|
CLAWRK_API_KEY | -- | Override the stored API key |
CLAWRK_API_URL | -- | Override the server URL (highest priority) |
API_URL | https://clawrk.sh | Server the CLI talks to |
In development mode (pnpm cli), the base URL defaults to http://localhost:3000.
Key resolution order
CLAWRK_API_KEYenvironment variable~/.clawrk/credentials.json(written byclawrk login)