Docs /Prism AI /CLI integration
Prism AIDesktop

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.

Settings → AI Features → AI Providers
Use Your Existing SubscriptionsRun locally via CLI. Your data never leaves your machine.
⌃
Claude CodeUses your Claude Pro / Max subscription · Authenticated
OpenAI CodexUses your ChatGPT Plus / Pro subscription · Not authenticated
Gemini CLIUses your Google One AI Premium subscription · Install
GitHub CopilotUses your GitHub Copilot subscription · Install
Cursor CLIUses your Cursor Pro subscription · Install
Enabled CLIs appear in the model dropdown under Your Subscriptions.
  • 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

ProviderBinaryInstall
Claude Codeclaudenpm install -g @anthropic-ai/claude-code
OpenAI Codexcodexnpm install -g @openai/codex
Gemini CLIgemininpm install -g @google/gemini-cli
GitHub Copilotcopilotnpm install -g @github/copilot
Cursor CLIcursor-agentcurl 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

  1. 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
  1. In Querylab.io open Settings → AI Features → AI Providers. The app looks for each binary on your PATH when 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.

  2. 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 modes and approval cards work the same as with the cloud provider. Stop cancels the run.

What leaves your machine is what the CLI sends to its vendor: your prompt, the attached context, tool results. Conversations are 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 checks the key and stores it in your OS keychain, and Remove deletes it. Requests go from 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.

Cloud or CLI

Querylab.io CloudCLI or your own key
SetupSign inInstall a CLI and sign in to it, or paste a key
BillingCredits from your monthly allowanceYour vendor subscription or API usage
Data pathThrough Querylab.io’s relayMachine → vendor
Model choiceThe cloud list, or AutoWhatever the CLI offers
Conversation resumeAny deviceThis machine

Troubleshooting

Not detected. which claude (or codex, gemini, copilot, cursor-agent) must print a path in a fresh terminal. If it works in a terminal but not here, put the PATH export in .zprofile or .profile.

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.