CLI integration
On the desktop app, Prism AI can run through an AI CLI you already have (Claude Code, Codex, Gemini CLI, Copilot, or Cursor) on the subscription you already pay for, or on your own API key. Prompts and schema go from your machine to the vendor; Querylab.io's backend is not in the path.
- The desktop app; in the browser this section says CLI providers are only available in the desktop app
- The CLI installed and on your login shell’s
PATH - Signed in to the CLI once, in a terminal
Supported CLIs
| Provider | Binary | Install |
|---|---|---|
| Claude Code | claude | npm install -g @anthropic-ai/claude-code |
| OpenAI Codex | codex | npm install -g @openai/codex |
| Gemini CLI | gemini | npm install -g @google/gemini-cli |
| GitHub Copilot | copilot | npm install -g @github/copilot |
| Cursor CLI | cursor-agent | curl https://cursor.com/install -fsS | bash |
Each row’s Install link opens the vendor’s own instructions. Copilot is the standalone copilot binary, not the gh copilot extension.
Setting up a CLI provider
- Install one of the CLIs and run it once in a terminal to sign in. The app never asks for a vendor API key.
npm install -g @anthropic-ai/claude-code
claude # follow the login prompt, then exit
which claude # must print a path
-
In Querylab.io open Settings → AI Features → AI Providers. The app looks for each binary on your
PATHwhen the section opens; the refresh icon (Refresh CLI detection) runs the check again after you install something. Each detected CLI shows Authenticated or Not authenticated. -
Switch the provider on. It joins the model dropdown in the chat input under Your Subscriptions, with the models that CLI reports. Pick one and start a new conversation — the model can’t change mid-conversation.
The panel then shows a provider badge instead of the credit counter: CLI conversations don’t consume Querylab.io credits.
How it runs
The desktop app spawns the CLI as a child process for each request, streams its output into the panel, and executes the agent’s tools locally (schema lookups, dry runs, tab edits) the same way it does with the cloud provider. The modes and approval cards work unchanged. Only allow-listed binaries are launched, and the process is cancelled when you press Stop or close the conversation.
What leaves your machine is what the CLI sends to its vendor: your prompt, the attached context, tool results. Querylab.io’s servers don’t see it. Conversations are still stored locally in the app.
Your own API key
The same settings section has Bring Your Own Key. Paste an Anthropic API key; Validate & Save makes one minimal request to check it, then stores it in the OS keychain. The app never shows it again, only its last four characters and a Remove button. Requests are proxied by the desktop app straight to the vendor, so the data path is the same as with a CLI, and the panel shows a BYOK badge in place of the credit counter. OpenAI and Google AI key fields exist but those providers aren’t wired up yet.
Cloud or CLI
| Querylab.io Cloud | CLI or your own key | |
|---|---|---|
| Setup | Sign in | Install a CLI and sign in to it, or paste a key |
| Billing | Credits from your plan | Your vendor subscription or API usage |
| Data path | Through Querylab.io’s relay | Machine → vendor |
| Model choice | The cloud list, or Auto | Whatever the CLI offers |
| Conversation resume | Any device | This machine |
Troubleshooting
Not detected. which claude (or codex, gemini, copilot, cursor-agent) must print a path in a fresh terminal. The app sources your login shell’s rc files to build PATH, so a tool installed via a version manager you only initialise in some shells may be invisible — put the export in .zprofile or .profile. On Windows the app also checks the npm global directory (%APPDATA%\npm).
Not authenticated. The panel error offers Open Terminal to Login. Sign in through the CLI itself, then refresh detection.
No models listed. The app asks each CLI for its model list; an old CLI may not answer. Update it and refresh:
npm update -g @anthropic-ai/claude-code
Permission prompts inside the CLI. Some CLIs ask before allowing tool use. Approve in the terminal, or configure the CLI’s own auto-approval; Querylab.io’s mode selector governs the Querylab.io side only.