Skip to main content

CLI Integration

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


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

ToolInstallationAuthentication
Claude Codenpm install -g @anthropic-ai/claude-codeclaude auth login
Gemini CLInpm i -g @google/generative-ai-cligemini auth login

Setup

1. Install Your CLI Tool

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

# Gemini CLI
npm install -g @google/generative-ai-cli

2. Authenticate

# Claude Code
claude auth login

# Gemini CLI
gemini auth login

3. Configure in Querylab.io

  1. Settings > AI Assistant
  2. Click "Detect Installed CLIs"
  3. Select your CLI from dropdown
  4. Click "Test Connection"
  5. Save

CLI vs Backend Provider

ScenarioRecommendation
Maximum privacyCLI - data stays local
Cost optimizationCLI - no markup
Simple setupBackend - just sign in
Model experimentationCLI - easy switching
Team sharingBackend - conversation sync

Troubleshooting

CLI Not Found

Error: 'claude' command not found

Fix: Ensure CLI is installed and in PATH. Run which claude to verify.

Not Authenticated

Error: CLI not authenticated

Fix: Run the appropriate auth command:

  • Claude Code: claude auth login
  • Gemini: gemini auth login

Wrong Provider

Fix: Settings > AI Assistant > select correct CLI from dropdown.

Tool Permissions

Some CLIs require explicit tool permissions. Use --allow-all-tools flag or approve when prompted.