MCPcopy Index your code
hub / github.com/MadAppGang/claudish

github.com/MadAppGang/claudish @v7.12.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v7.12.1 ↗ · + Follow
2,302 symbols 5,776 edges 283 files 711 documented · 31% updated 2d agov7.12.1 · 2026-07-06★ 93224 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

🔮 Claudish

Claude Code. Any Model.

npm version license Claude Code

Use your existing AI subscriptions with Claude Code. Works with Anthropic Max, Gemini Advanced, ChatGPT Plus/Codex, Kimi, GLM, OllamaCloud — plus 580+ models via OpenRouter and local models for complete privacy.

Website · Documentation · Report Bug


Claudish (Claude-ish) is a CLI tool that allows you to run Claude Code with any AI model by proxying requests through a local Anthropic API-compatible server.

Supported Providers: - Cloud: OpenRouter (580+ models), Google Gemini, OpenAI, MiniMax, Kimi, GLM, Z.AI, Sakana Fugu, OllamaCloud, OpenCode Zen - Local: Ollama, LM Studio, vLLM, MLX - Enterprise: Vertex AI (Google Cloud)

Use Your Existing AI Subscriptions

Stop paying for multiple AI subscriptions. Claudish lets you use subscriptions you already have with Claude Code's powerful interface:

Your Subscription Command
Anthropic Max Native support (just use claude)
Gemini Advanced claudish --model g@gemini-3-pro-preview
ChatGPT Plus/Codex claudish --model oai@gpt-5.3 or oai@gpt-5.3-codex
Kimi claudish --model kimi@kimi-k2.5
GLM claudish --model glm@GLM-4.7
MiniMax claudish --model mm@minimax-m2.1
OllamaCloud claudish --model oc@qwen3-next
OpenCode Zen Go claudish --model zgo@glm-5

100% Offline Option — Your code never leaves your machine:

claudish --model ollama@qwen3-coder:latest "your task"

Bring Your Own Key (BYOK)

Claudish is a BYOK AI coding assistant: - ✅ Use API keys you already have - ✅ No additional subscription fees - ✅ Full cost control — pay only for what you use - ✅ Works with any provider - ✅ Switch models mid-session

Features

  • Multi-provider support - OpenRouter, Gemini, Vertex AI, OpenAI, OllamaCloud, and local models
  • New routing syntax - Use provider@model[:concurrency] for explicit routing (e.g., google@gemini-2.0-flash)
  • Native auto-detection - Models like gpt-4o, gemini-2.0-flash, llama-3.1-70b route to their native APIs automatically
  • Direct API access - Google, OpenAI, MiniMax, Kimi, GLM, Z.AI, OllamaCloud, Poe with direct billing
  • Vertex AI Model Garden - Access Google + partner models (MiniMax, Mistral, DeepSeek, Qwen, OpenAI OSS)
  • Local model support - Ollama, LM Studio, vLLM, MLX with ollama@, lmstudio@ syntax and concurrency control
  • Cross-platform - Works with both Node.js and Bun (v1.3.0+)
  • Universal compatibility - Use with npx or bunx - no installation required
  • Interactive setup - Prompts for API key and model if not provided (zero config!)
  • Monitor mode - Proxy to real Anthropic API and log all traffic (for debugging)
  • Protocol compliance - 1:1 compatibility with Claude Code communication protocol
  • Headless mode - Automatic print mode for non-interactive execution
  • Quiet mode - Clean output by default (no log pollution)
  • JSON output - Structured data for tool integration
  • Real-time streaming - See Claude Code output as it happens
  • Parallel runs - Each instance gets isolated proxy
  • Autonomous mode - Bypass all prompts with flags
  • Context inheritance - Runs in current directory with same .claude settings
  • Claude Code flag passthrough - Forward any Claude Code flag (--agent, --effort, --permission-mode, etc.) in any order
  • Vision proxy - Non-vision models automatically get image descriptions via Claude, so every model can "see"

Installation

Quick Install

# Shell script (Linux/macOS)
curl -fsSL https://raw.githubusercontent.com/MadAppGang/claudish/main/install.sh | bash

# Homebrew (macOS)
brew tap MadAppGang/tap && brew install claudish

# npm
npm install -g claudish

# Bun
bun install -g claudish

Prerequisites

Other Install Options

Use without installing:

npx claudish@latest --model x-ai/grok-code-fast-1 "your prompt"
bunx claudish@latest --model x-ai/grok-code-fast-1 "your prompt"

Install from source:

git clone https://github.com/MadAppGang/claudish.git
cd claudish
bun install && bun run build && bun link

Quick Start

Step 0: Initialize Claudish Skill (First Time Only)

# Navigate to your project directory
cd /path/to/your/project

# Install Claudish skill for automatic best practices
claudish --init

# Reload Claude Code to discover the skill

What this does: - ✅ Installs Claudish usage skill in .claude/skills/claudish-usage/ - ✅ Enables automatic sub-agent delegation - ✅ Enforces file-based instruction patterns - ✅ Prevents context window pollution

After running --init, Claude will automatically: - Use sub-agents when you mention external models (Grok, GPT-5, etc.) - Follow best practices for Claudish usage - Suggest specialized agents for different tasks

Option 1: Interactive Mode (Easiest)

# Just run it - will prompt for API key and model
claudish

# Enter your OpenRouter API key when prompted
# Select a model from the list
# Start coding!

Option 2: With Environment Variables

# Set up environment
export OPENROUTER_API_KEY=sk-or-v1-...     # For OpenRouter models
export GEMINI_API_KEY=...                   # For direct Google API
export OPENAI_API_KEY=sk-...                # For direct OpenAI API
export ANTHROPIC_API_KEY=sk-ant-api03-placeholder  # Required placeholder

# Run with auto-detected model
claudish --model gpt-4o "implement user authentication"     # → OpenAI
claudish --model gemini-2.0-flash "add tests"               # → Google

# Or with explicit provider
claudish --model openrouter@anthropic/claude-3.5-sonnet "review code"

Note: In interactive mode, if OPENROUTER_API_KEY is not set, you'll be prompted to enter it. This makes first-time usage super simple!

AI Agent Usage

For AI agents running within Claude Code: Use the dedicated AI agent guide for comprehensive instructions on file-based patterns and sub-agent delegation.

# Print complete AI agent usage guide
claudish --help-ai

# Save guide to file for reference
claudish --help-ai > claudish-agent-guide.md

Quick Reference for AI Agents:

Main Workflow for AI Agents

  1. Get available models: ```bash # List all models or search claudish --models claudish --models gemini

# Get top recommended models (JSON) claudish --models-top --json ```

  1. Run Claudish through sub-agent (recommended pattern): ``typescript // Don't run Claudish directly in main conversation // Use Task tool to delegate to sub-agent const result = await Task({ subagent_type: "general-purpose", description: "Implement feature with Grok", prompt: Use Claudish to implement feature with Grok model.

STEPS: 1. Create instruction file: /tmp/claudish-task-${Date.now()}.md 2. Write feature requirements to file 3. Run: claudish --model x-ai/grok-code-fast-1 --stdin < /tmp/claudish-task-*.md 4. Read result and return ONLY summary (2-3 sentences)

DO NOT return full implementation. Keep response under 300 tokens. ` }); ```

  1. File-based instruction pattern (avoids context pollution): ``typescript // Write instructions to file const instructionFile =/tmp/claudish-task-${Date.now()}.md; const resultFile =/tmp/claudish-result-${Date.now()}.md`;

await Write({ file_path: instructionFile, content: ` # Task Your task description here

# Output Write results to: ${resultFile} ` });

// Run Claudish with stdin await Bash(claudish --model x-ai/grok-code-fast-1 --stdin < ${instructionFile});

// Read result const result = await Read({ file_path: resultFile });

// Return summary only return extractSummary(result); ```

Key Principles: - ✅ Use file-based patterns to avoid context window pollution - ✅ Delegate to sub-agents instead of running directly - ✅ Return summaries only (not full conversation transcripts) - ✅ Choose appropriate model for task (see --models or --models-top)

Resources: - Full AI agent guide: claudish --help-ai - Skill document: skills/claudish-usage/SKILL.md (in repository root) - Model integration: skills/claudish-integration/SKILL.md (in repository root)

Usage

Basic Syntax

claudish [OPTIONS] <claude-args...>

Options

For the exhaustive reference with all details, see Settings Reference.

Flag Short Description Default
--model <model> -m Model to use (provider@model syntax) Interactive selector
--default-provider <name> Default provider for bare model routing (v7.0.0+) Auto-detected
--model-opus <model> Model for Opus role (planning, complex tasks)
--model-sonnet <model> Model for Sonnet role (default coding)
--model-haiku <model> Model for Haiku role (fast tasks)
--model-subagent <model> Model for sub-agents (Task tool)
--profile <name> -p Named profile for model mapping Default profile
--op-env <id> Load env vars from a 1Password Environment (highest priority)
--interactive -i Interactive mode (persistent session) Auto when no prompt
--auto-approve -y Skip permission prompts false
--no-auto-approve Explicitly enable permission prompts
--dangerous Pass --dangerouslyDisableSandbox false
--port <port> Proxy server port Random (3000-9000)
--log-debug -d Enable debug logging to logs/ false
--log-level <level> Log verbosity: debug, info, minimal info
--quiet -q Suppress [claudish] messages Default in single-shot
--verbose -v Show [claudish] messages Default in interactive
--json JSON output for tool integration (implies --quiet) false
--stdin Read prompt from stdin false
--free Show only free models in selector false
--monitor Proxy to real Anthropic API and log traffic false
--summarize-tools Summarize tool descriptions (for local models) false
--cost-track Enable cost tracking (enables monitor mode) false
--cost-audit Show cost analysis report
--cost-reset Reset accumulated cost statistics
--models [query] -s (--models-search) List all models or fuzzy search
--models-top Show curated recommended models
--models-refresh Force refresh model cache
--init Install Claudish skill in current project
--mcp Run as MCP server
--gemini-login Login to Gemini Code Assist via OAuth
--gemini-logout Clear Gemini OAuth credentials
--kimi-login Login to Kimi via OAuth
--kimi-logout Clear Kimi OAuth credentials
--help-ai Show AI agent usage guide
--version Show version
--help -h Show help message
-- Everything after passes to Claude Code

Flag passthrough: Any unrecognized flag is automatically forwarded to Claude Code (e.g., --agent, --effort, --permission-mode).

Environment Variables

Claudish automatically loads .env from the current directory at startup. For the full list, see Settings Reference.

API Keys (at least one required for cloud models)

Variable Provider Aliases
OPENROUTER_API_KEY OpenRouter (default backend, 580+ models)
GEMINI_API_KEY Google Gemini (g@, google@)
OPENAI_API_KEY OpenAI (oai@)
MINIMAX_API_KEY MiniMax (mm@, mmax@)
MINIMAX_CODING_API_KEY MiniMax Coding Plan (mmc@)
MOONSHOT_API_KEY Kimi/Moonshot (kimi@) KIMI_API_KEY
KIMI_CODING_API_KEY Kimi Coding Plan (kc@) Or OAuth via --kimi-login
ZHIPU_API_KEY GLM/Zhipu (glm@) GLM_API_KEY
GLM_CODING_API_KEY GLM Coding Plan (gc@) ZAI_CODING_API_KEY
ZAI_API_KEY Z.AI (zai@)
SAKANA_API_KEY Sakana Fugu (sakana@, fugu@)
SAKANA_CODING_API_KEY Sakana Fugu Subscription (sc@) SAKANA_API_KEY
OLLAMA_API_KEY OllamaCloud (oc@)
OPENCODE_API_KEY OpenCode Zen (zen@) — optional for free models
LITELLM_API_KEY LiteLLM (ll@) — requires LITELLM_BASE_URL
POE_API_KEY Poe (poe@)
VERTEX_API_KEY Vertex AI Express (v@)
VERTEX_PROJECT Vertex AI OAuth mode (v@) GOOGLE_CLOUD_PROJECT
ANTHROPIC_API_KEY Placeholder (suppresses Claude Code dialog)

Claudish Settings

| Variable | Description | Default | |----------|----------

Extension points exported contracts — how you extend this code

ProviderTransport (Interface)
(no doc) [10 implementers]
packages/cli/src/providers/transport/types.ts
Handler (Interface)
* Handler interface for type safety [4 implementers]
packages/macos-bridge/src/routing-middleware.ts
AdvisorSwapConfig (Interface)
(no doc)
experiments/tool-replacement-proxy-2026-04/claudish-patch/native-handler-advisor.ts
PlatformInfo (Interface)
(no doc)
scripts/generate-manifest.ts
OAuthInstance (Interface)
(no doc) [9 implementers]
packages/cli/src/auth/auth-commands.ts
AppPattern (Interface)
* Known application patterns with detection logic
packages/macos-bridge/src/detection.ts
AdvisorInfo (Interface)
(no doc)
experiments/tool-replacement-proxy-2026-04/claudish-patch/native-handler-advisor.ts
Manifest (Interface)
(no doc)
scripts/generate-manifest.ts

Core symbols most depended-on inside this repo

log
called by 350
packages/cli/src/channel/test-helpers/progress-regression-mock.ts
get
called by 145
packages/cli/src/auth/credentials/authority.ts
parse
called by 137
packages/macos-bridge/src/http-parser.ts
write
called by 124
packages/cli/src/diag-output.ts
loadConfig
called by 69
packages/cli/src/profile-config.ts
parseModelSpec
called by 53
packages/cli/src/providers/model-parser.ts
matchRoutingRule
called by 47
packages/cli/src/providers/routing-rules.ts
setupSession
called by 46
packages/cli/src/team-orchestrator.ts

Shape

Function 1,171
Method 684
Interface 301
Class 146

Languages

TypeScript100%

Modules by API surface

packages/macos-bridge/src/connect-handler.ts50 symbols
packages/cli/src/providers/onepassword.ts49 symbols
packages/cli/src/probe/probe-tui-app.tsx44 symbols
packages/cli/src/model-selector.ts44 symbols
packages/cli/src/probe/probe-results-printer.ts40 symbols
packages/cli/src/auth/gemini-oauth.ts40 symbols
packages/cli/src/profile-config.ts39 symbols
packages/cli/src/cli.ts32 symbols
packages/cli/src/startup-trace.ts30 symbols
packages/cli/src/model-loader.ts29 symbols
packages/cli/src/auth/kimi-oauth.ts28 symbols
packages/cli/src/adapters/base-api-format.ts28 symbols

For agents

$ claude mcp add claudish \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page