Skip to main content

CLI Integration

Use AI coding assistants directly with Querylab.io Desktop for privacy, cost control, and model flexibility.

Desktop app only — CLI integration requires the native macOS app. The web version uses Querylab.io Cloud instead.


Why Use CLI Integration?

BenefitDescription
PrivacyAPI calls go directly to providers, not through Querylab.io
Cost ControlPay your provider directly, no markup
Model ChoiceSwitch between Claude, GPT, Gemini freely
Existing SubscriptionsUse your current AI subscriptions
Offline ReliabilityWorks without Querylab.io backend

Supported CLI Tools

ToolBinaryInstallationAuthentication
Claude Codeclaudenpm install -g @anthropic-ai/claude-codeclaude auth login
OpenAI Codexcodexnpm install -g @openai/codexcodex login
Google Gemini CLIgemininpm install -g @google/gemini-cligemini auth login
GitHub Copilot CLIcopilotIncluded with GitHub CLI (gh extension install github/gh-copilot)gh auth login
Cursor CLIcursor-agentIncluded with Cursor editorConfigured via Cursor app

Querylab.io auto-detects which CLIs are installed on your system.


Setup

1. Install a CLI Tool

Pick any supported tool and install it:

# Claude Code (Anthropic)
npm install -g @anthropic-ai/claude-code

# OpenAI Codex
npm install -g @openai/codex

# Google Gemini CLI
npm install -g @google/gemini-cli

# GitHub Copilot (via GitHub CLI)
gh extension install github/gh-copilot

2. Authenticate

# Claude Code
claude auth login

# OpenAI Codex
codex login

# Gemini CLI
gemini auth login

# GitHub Copilot
gh auth login

Cursor CLI uses the credentials configured in the Cursor editor — no separate auth step needed.

3. Configure in Querylab.io

  1. Open Settings > AI Assistant
  2. Click Detect Installed CLIs — Querylab.io scans your PATH for all supported tools
  3. Select your preferred CLI from the dropdown
  4. Choose a model (Querylab.io queries each CLI for available models)
  5. Save

Auto-Detection

When you click "Detect Installed CLIs", Querylab.io:

  1. Searches your system PATH for each known binary (claude, codex, gemini, copilot, cursor-agent)
  2. Checks the version of each found tool
  3. Verifies authentication status
  4. Lists available models for each detected CLI

You can install multiple CLIs and switch between them at any time.


CLI vs Backend Provider

ScenarioRecommendation
Maximum privacyCLI — data stays local
Cost optimizationCLI — no markup, use your own keys
Simple setupBackend — just sign in
Model experimentationCLI — easy switching between providers
Team sharingBackend — conversation sync across team
Use specific modelCLI — pick exact model per provider

Troubleshooting

CLI Not Found

Error: 'claude' command not found

Fix: Ensure the CLI is installed and in your PATH:

which claude    # Should print the path
which codex # Should print the path
which gemini # Should print the path

If installed but not found, add the install directory to your PATH.

Not Authenticated

Error: CLI not authenticated

Fix: Run the auth command for your CLI:

ToolAuth command
Claude Codeclaude auth login
OpenAI Codexcodex login
Gemini CLIgemini auth login
GitHub Copilotgh auth login
CursorOpen Cursor app and sign in

No Models Listed

If "Detect Installed CLIs" finds the tool but shows no models, try updating the CLI to the latest version:

npm update -g @anthropic-ai/claude-code

Tool Permissions

Some CLIs require explicit tool permissions for Prism AI to execute actions. Approve when prompted or configure auto-approval in the CLI's settings.