CLI Integration
Use AI coding assistants directly with Querylab.io Desktop for privacy, cost control, and model flexibility.
Why Use CLI Integration?
| Benefit | Description |
|---|---|
| Privacy | API calls go directly to providers, not through Querylab.io |
| Cost Control | Pay your provider directly, no markup |
| Model Choice | Switch between Claude, GPT, Gemini freely |
| Existing Subscriptions | Use your current AI subscriptions |
| Offline Reliability | Works without Querylab.io backend |
Supported CLI Tools
| Tool | Installation | Authentication |
|---|---|---|
| Claude Code | npm install -g @anthropic-ai/claude-code | claude auth login |
| Gemini CLI | npm i -g @google/generative-ai-cli | gemini 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
- Settings > AI Assistant
- Click "Detect Installed CLIs"
- Select your CLI from dropdown
- Click "Test Connection"
- Save
CLI vs Backend Provider
| Scenario | Recommendation |
|---|---|
| Maximum privacy | CLI - data stays local |
| Cost optimization | CLI - no markup |
| Simple setup | Backend - just sign in |
| Model experimentation | CLI - easy switching |
| Team sharing | Backend - 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.