MadAppGang/claudish

Claude Code. Any Model. The most powerful AI coding agent now speaks every language.

TypeScript

1,007

1,483 commits

updated Oct 20, 2026

See the code

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 SubscriptionCommand
Anthropic MaxNative support (just use claude)
Gemini Advancedclaudish --model g@gemini-3-pro-preview
ChatGPT Plus/Codexclaudish --model [email protected] or [email protected]
Kimiclaudish --model [email protected]
GLMclaudish --model [email protected]
MiniMaxclaudish --model [email protected]
OllamaCloudclaudish --model oc@qwen3-next
OpenCode Zen Goclaudish --model zgo@glm-5
Alibaba Coding Planclaudish --model [email protected]
Alibaba Token Planclaudish --model [email protected]
Alibaba PAYGclaudish --model [email protected]

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., [email protected])
  • โœ… 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
  • โœ… Classifier passthrough - In hybrid setups, keep Claude Code's auto-mode permission classifier on real Claude (Anthropic) while your main loop runs on another provider (--classifier-provider anthropic)
  • โœ… 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: Log in with a subscription you already pay for (no API key)

If you have ChatGPT Plus/Pro, an Antigravity plan, a Kimi or GLM coding plan, a SuperGrok subscription, or Anthropic Max, claudish login uses it directly. No API key, no per-token billing.

claudish login                 # interactive picker of every provider you can log into
claudish login codex           # ChatGPT Plus/Pro (OpenAI's own PKCE flow)
claudish login antigravity     # Gemini via your Antigravity plan
claudish login grok            # SuperGrok / X Premium+
claudish login kimi            # Kimi

# Then just name the model
claudish --model [email protected] "implement user authentication"
claudish --model [email protected] "add tests"

Run claudish --probe [email protected] afterwards to confirm the credential resolved and see which provider will actually serve the request.

Option 2: Interactive Mode

# 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 3: 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:

    # List all models or search
    claudish --models
    claudish --models gemini
    
    # Get top recommended models (JSON)
    claudish --models-top --json
    
  2. Run Claudish through sub-agent (recommended pattern):

    // 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.
      `
    });
    
  3. File-based instruction pattern (avoids context pollution):

    // 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.

FlagShortDescriptionDefault
--model <model>-mModel 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)
--classifier-provider <name>Route the auto-mode permission classifier to native Anthropic (anthropic)Off
--classifier-model <model>Native Claude model for the classifier passthrough (also enables it)claude-sonnet-5
--profile <name>-pNamed profile for model mappingDefault profile
--config <file>Use this file as the run's ONLY config (replaces global + project)
--op-env <id>Load env vars from a 1Password Environment (highest priority)
--interactive-iInteractive mode (persistent session)Auto when no prompt
--auto-approve-ySkip permission promptsfalse
--no-auto-approveExplicitly enable permission prompts
--dangerousPass --dangerouslyDisableSandboxfalse
--port <port>Proxy server portRandom (3000-9000)
--debug-claudish-dEnable debug logging to logs/false
--log-level <level>Log verbosity: debug, info, minimalinfo
--quiet-qSuppress [claudish] messagesDefault in single-shot
--verbose-vShow [claudish] messagesDefault in interactive
--jsonJSON output for tool integration (implies --quiet)false
--stdinRead prompt from stdinfalse
--freeShow only free models in selectorfalse
--monitorProxy to real Anthropic API and log trafficfalse
--summarize-toolsSummarize tool descriptions (for local models)false
--cost-trackEnable cost tracking (enables monitor mode)false
--cost-auditShow cost analysis report
--cost-resetReset accumulated cost statistics
--models [query]-s (--models-search)List all models or fuzzy search
--models-topShow curated recommended models
--models-refreshForce refresh model cache
--initInstall Claudish skill in current project
--mcpRun as MCP server
login [provider]Log in to a subscription provider via OAuth (no argument = interactive picker)
logout [provider]Clear a provider's OAuth credentials
--kimi-logoutDeprecated alias for claudish logout kimi
--help-aiShow AI agent usage guide
--versionShow version
--help-hShow 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)

VariableProviderAliases
OPENROUTER_API_KEYOpenRouter (default backend, 580+ models)
GEMINI_API_KEYGoogle Gemini (g@, google@)
OPENAI_API_KEYOpenAI (oai@)
MINIMAX_API_KEYMiniMax (mm@, mmax@)
MINIMAX_CODING_API_KEYMiniMax Coding Plan (mmc@)
MOONSHOT_API_KEYKimi/Moonshot (kimi@)KIMI_API_KEY
KIMI_CODING_API_KEYKimi Coding Plan (kc@)Or OAuth via claudish login kimi
ZHIPU_API_KEYGLM/Zhipu (glm@)GLM_API_KEY
GLM_CODING_API_KEYGLM Coding Plan (gc@)ZAI_CODING_API_KEY
ZAI_API_KEYZ.AI (zai@)
SAKANA_API_KEYSakana Fugu (sakana@, fugu@)
SAKANA_CODING_API_KEYSakana Fugu Subscription (sc@)SAKANA_API_KEY
QWEN_CODING_PLAN_API_KEYAlibaba Coding Plan (qcode@)(separate key and host)
QWEN_TOKEN_PLAN_API_KEYAlibaba Token Plan (qtoken@)(separate key and host)
DASHSCOPE_API_KEYAlibaba PAYG (qpay@)(separate key and host)
OLLAMA_API_KEYOllamaCloud (oc@)
OPENCODE_API_KEYOpenCode Zen (zen@)
OPENCODE_GO_API_KEYOpenCode Zen Go plan (zgo@)(separate from the metered Zen credential)
LITELLM_API_KEYLiteLLM (ll@) โ€” requires LITELLM_BASE_URL
POE_API_KEYPoe (poe@)
VERTEX_PROJECTVertex AI (v@) โ€” optional; the ADC quota project or gcloud config get project is used otherwiseGOOGLE_CLOUD_PROJECT
ANTHROPIC_API_KEYPlaceholder (suppresses Claude Code dialog)

Bundled Endpoint Catalog

25 extra vendors ship inside the package as predefined endpoints. Each appears only when its key is already present locally (env var, alias, or config.apiKeys) โ€” set the variable and vendor@model starts working with no config file. A key that lives only in 1Password does not activate a row (activation is synchronous); use predefinedEndpoints.enable for that case. See Predefined Endpoints.

All 25 rows ship probe-verified โ€” the configured path was confirmed to reach the vendor's own auth layer, and a bogus sibling path to answer differently. None is live-verified: that is strong evidence about routing and weak evidence about a vendor's streaming dialect on a successful turn. The endpoint layer itself was verified end to end against a real API.

VariableProviderNotes
GROQ_API_KEYGroq (groq@)
CEREBRAS_API_KEYCerebras (cerebras@)
TOGETHER_API_KEYTogether AI (together@)
FIREWORKS_API_KEYFireworks AI (fireworks@)
DEEPINFRA_API_KEYDeepInfra (deepinfra@)
NEBIUS_API_KEYNebius AI Studio (nebius@)
HYPERBOLIC_API_KEYHyperbolic (hyperbolic@)
SAMBANOVA_API_KEYSambaNova Cloud (sambanova@)
NOVITA_API_KEYNovita AI (novita@)
BASETEN_API_KEYBaseten (baseten@)
PERPLEXITY_API_KEYPerplexity Sonar (perplexity@)
VENICE_API_KEYVenice AI (venice@)
CHUTES_API_KEYChutes (chutes@)
FEATHERLESS_API_KEYFeatherless AI (featherless@)
PARASAIL_API_KEYParasail (parasail@)
INFERENCE_NET_API_KEYInference.net (inference-net@)
AIMLAPI_API_KEYAI/ML API (aimlapi@)
REQUESTY_API_KEYRequesty (requesty@)
NANOGPT_API_KEYNanoGPT (nanogpt@)
COHERE_API_KEYCohere (cohere@)OpenAI-compatibility layer
SCALEWAY_API_KEYScaleway Generative APIs (scaleway@)
UPSTAGE_API_KEYUpstage Solar (upstage@)
WRITER_API_KEYWriter Palmyra (writer@)
MOONSHOT_CN_API_KEYMoonshot AI China region (moonshot-cn@)Different service from MOONSHOT_API_KEY / moonshot@ above
TUNING_ENGINES_API_KEYTuning Engines (tuningengines@)Self-hosted: also set TUNING_ENGINES_BASE_URL

Every one of these also accepts CUSTOM_<NAME>_KEY as an alias, and any of them can be replaced outright by a customEndpoints entry of the same name.

Claudish Settings

VariableDescriptionDefault
CLAUDISH_MODELDefault model (overrides ANTHROPIC_MODEL)Interactive selector
CLAUDISH_PORTDefault proxy portRandom (3000-9000)
CLAUDISH_CONTEXT_WINDOWOverride context window size (local models)Auto-detected
CLAUDISH_MODEL_OPUSModel for Opus role
CLAUDISH_MODEL_SONNETModel for Sonnet role
CLAUDISH_MODEL_HAIKUModel for Haiku role
CLAUDISH_MODEL_SUBAGENTModel for sub-agents
CLAUDISH_SUMMARIZE_TOOLSSummarize tool descriptions (true/1)false
CLAUDISH_TELEMETRYOverride telemetry (0/false/off to disable)From config
CLAUDISH_LOCAL_MAX_PARALLELMax concurrent local model requests (1-8)1
CLAUDISH_LOCAL_QUEUE_ENABLEDEnable/disable local model queuetrue
CLAUDISH_DEFAULT_PROVIDERDefault provider for bare model routing (v7.0.0+)Auto-detected
CLAUDISH_QWEN_NO_THINKDisable thinking for Qwen models (1)
CLAUDISH_NO_PREDEFINED_ENDPOINTSTurn the bundled endpoint catalog off entirely (1)Catalog on
CLAUDISH_CLASSIFIER_PROVIDERRoute auto-mode permission classifier to native Anthropic (anthropic) โ€” see Classifier PassthroughOff
CLAUDISH_CLASSIFIER_MODELNative Claude model for the classifier passthrough (also enables it)claude-sonnet-5
CLAUDISH_CLASSIFIER_DEBUGDump raw requests to logs/classifier-capture.jsonl for classifier-detection debugging (1)Off

Claude Code Compatibility

VariableDescription
ANTHROPIC_MODELFallback for CLAUDISH_MODEL
ANTHROPIC_DEFAULT_OPUS_MODELFallback for CLAUDISH_MODEL_OPUS
ANTHROPIC_DEFAULT_SONNET_MODELFallback for CLAUDISH_MODEL_SONNET
ANTHROPIC_DEFAULT_HAIKU_MODELFallback for CLAUDISH_MODEL_HAIKU
CLAUDE_CODE_SUBAGENT_MODELFallback for CLAUDISH_MODEL_SUBAGENT
CLAUDE_PATHCustom path to Claude Code binary

Custom Endpoints

VariableProviderDefault
GEMINI_BASE_URLGemini APIhttps://generativelanguage.googleapis.com
OPENAI_BASE_URLOpenAI/Azurehttps://api.openai.com
MINIMAX_BASE_URLMiniMaxhttps://api.minimax.io (China-platform keys: https://api.minimaxi.com)
MOONSHOT_BASE_URLKimi/Moonshothttps://api.moonshot.ai
ZHIPU_BASE_URLGLM/Zhipuhttps://open.bigmodel.cn
ZAI_BASE_URLZ.AIhttps://api.z.ai
QWEN_CODING_PLAN_BASE_URLAlibaba Coding Planhttps://coding-intl.dashscope.aliyuncs.com
QWEN_TOKEN_PLAN_BASE_URLAlibaba Token Planhttps://token-plan.ap-southeast-1.maas.aliyuncs.com
DASHSCOPE_BASE_URLAlibaba PAYGhttps://dashscope-intl.aliyuncs.com
OLLAMACLOUD_BASE_URLOllamaCloudhttps://ollama.com
OPENCODE_BASE_URLOpenCode Zenhttps://opencode.ai/zen
LITELLM_BASE_URLLiteLLM proxy server(required with LITELLM_API_KEY)
OLLAMA_BASE_URLOllama (local)http://localhost:11434
OLLAMA_HOSTAlias for OLLAMA_BASE_URL
LMSTUDIO_BASE_URLLM Studio (local)http://localhost:1234
VLLM_BASE_URLvLLM (local)http://localhost:8000
MLX_BASE_URLMLX (local)http://127.0.0.1:8080
TUNING_ENGINES_BASE_URLTuning Engines (tuningengines@), self-hosted gatewayhttps://api.tuningengines.com

A malformed base-URL override SKIPS the provider โ€” it never falls back to the public host. You set the variable to keep traffic inside your own network; quietly redirecting a typo to a vendor's public endpoint would send exactly the data you were isolating to exactly the place you were isolating it from.

Priority order: CLI flags > CLAUDISH_* env vars > ANTHROPIC_* env vars > profile config > interactive selector.

Important Notes:

  • Set ANTHROPIC_API_KEY=sk-ant-api03-placeholder (or any value) to suppress the Claude Code login dialog
  • In interactive mode, if no API key is set, you'll be prompted to enter one

Configuration Files

Claudish uses a two-scope configuration system:

FileScopePurpose
~/.claudish/config.jsonGlobalProfiles, telemetry, routing rules (shared across projects)
.claudish.jsonLocalProject-specific profiles and routing rules (overrides global)
.envLocalEnvironment variables (auto-loaded at startup)

Profile configuration (~/.claudish/config.json):

{
  "version": "1.0.0",
  "defaultProfile": "default",
  "profiles": {
    "default": {
      "name": "default",
      "models": {
        "opus": "[email protected]",
        "sonnet": "google@gemini-3-pro",
        "haiku": "[email protected]",
        "subagent": "[email protected]"
      }
    }
  },
  "routing": {
    "kimi-*": ["kc", "kimi", "openrouter"],
    "glm-*": ["gc", "glm"],
    "*": ["litellm", "openrouter"]
  }
}

Custom routing rules map model name patterns to ordered provider fallback chains. Patterns support exact names, globs (kimi-*), and * catch-all. Local .claudish.json routing rules replace global rules entirely.

Manage profiles with:

claudish init [--local|--global]            # Setup wizard
claudish profile list [--local|--global]    # List profiles
claudish profile add [--local|--global]     # Add profile
claudish profile use <name>                 # Set default
claudish profile edit <name>                # Edit profile

For the complete configuration reference, see Settings Reference.

1Password Integration

Resolve provider API keys from 1Password instead of storing them in plaintext. Claudish reads secret references (op://vault/item/field) and resolves them at startup โ€” the secret never lives in your config or shell history.

Authentication is automatic, in this order:

  1. OP_SERVICE_ACCOUNT_TOKEN โ€” a service-account token for headless/CI use (resolved via the official 1Password SDK, in-process, no op CLI needed). Service accounts can only read shared vaults, not your Private vault.
  2. op CLI session โ€” if you're signed into the 1Password desktop app (op signin), claudish uses that session (interactive, Touch ID). This is the zero-setup path on a laptop.

If a config value or env var starts with op:// and neither auth method works, claudish fails with a clear message rather than running with a missing key. If no op:// reference is present, claudish never touches 1Password (zero overhead for non-users).

About the authorization prompt: When claudish reads a secret via the op CLI session, the 1Password desktop app shows an authorization prompt. By design, 1Password labels that prompt with the requesting process โ€” i.e. your terminal (tmux, iTerm, etc.) โ€” not "claudish". This is a 1Password behavior that no app can override; the prompt always names the process, never the integration. claudish is identified as claudish in 1Password's activity/audit log, just not in the live prompt. To avoid the prompt entirely (e.g. CI, or if the terminal name bothers you), use a OP_SERVICE_ACCOUNT_TOKEN โ€” the service-account path authenticates directly against the 1Password API with no desktop prompt at all.

Single references

Point any API key at a 1Password field:

{
  "apiKeys": {
    "OPENROUTER_API_KEY": "op://Shared/OpenRouter/credential",
    "OPENAI_API_KEY": "op://Shared/OpenAI/api-key"
  }
}

A ${VAR} in a custom-endpoint apiKey and an op://... value are both resolved the same way. Multiple references are resolved in a single batch (one auth prompt).

Glob import โ€” many keys from one item

If you keep all your provider keys in one 1Password item (each field named after its env var, e.g. OPENROUTER_API_KEY, ANTHROPIC_API_KEY), import them all with one entry. Add a top-level onepassword array of glob paths:

{
  "onepassword": [
    "op://Jack/AI LLM keys/*/*_API_KEY"
  ]
}

The glob position mirrors the op:// path structure:

PatternImports
op://Vault/Item/*all top-level (sectionless) fields
op://Vault/Item/*_API_KEYtop-level fields ending in _API_KEY
op://Vault/Item/Section/*all fields in Section
op://Vault/Item/*/*_API_KEY*_API_KEY fields across all sections
op://Vault/Item/M*/*all fields in sections starting with M

Each matched field label becomes the env var name (trimmed of whitespace). Labels that aren't valid env var names (e.g. Customer Key) are skipped with a warning. Only matched fields are decrypted โ€” claudish lists field names first, then fetches values only for the ones you import.

Preview what a glob would import without revealing any secret values:

claudish op --list "op://Jack/AI LLM keys/*/*_API_KEY"
#   OPENROUTER_API_KEY   โœ“  (section: Open router)
#   ANTHROPIC_API_KEY    โœ“  (section: Claude)
#   Customer Key         โœ—  skipped (not a valid env var name)
#   9 importable, 1 skipped

Or run a one-off session with keys loaded inline, no config needed:

claudish op "op://Jack/AI LLM keys/*/*_API_KEY" --model openrouter@deepseek/deepseek-r1 "task"

Finding the path

In the 1Password app, hover a field โ†’ its menu โ†’ Copy Secret Reference gives op://Vault/Item/[Section/]Field. For a glob, you only need the vault and item names (visible in the sidebar and title) plus /* โ€” claudish discovers the fields. The claudish op --list preview confirms a glob before you commit it to config.

1Password Environments

1Password Environments (named sets of env vars) load via --op-env <id>, where <id> is the Environment ID copied from the desktop app (Developer โ†’ View Environments โ†’ Manage environment โ†’ Copy environment ID):

claudish --op-env <environment-id> --model openrouter@... "task"

Environment values are the highest-priority source (they override config and shell env). Requires the op CLI โ‰ฅ 2.35 (beta) โ€” the latest stable op (2.34.0) does not yet include the op environment command.

Zero-code alternative

You can also wrap claudish with op run (no config changes needed), using an env file of op:// references:

op run --env-file=.env -- claudish --model openrouter@... "task"

Model Routing (v4.0.0+)

Claudish uses provider@model[:concurrency] syntax for explicit routing, plus smart auto-detection for native providers:

New Syntax: provider@model[:concurrency]

# Explicit provider routing
claudish --model [email protected] "quick task"
claudish --model openrouter@deepseek/deepseek-r1 "analysis"
claudish --model oai@gpt-4o "implement feature"
claudish --model [email protected]:3 "code review"  # 3 concurrent requests

Provider Shortcuts

ShortcutProviderAPI KeyExample
g@, google@Google GeminiGEMINI_API_KEY[email protected]
oai@OpenAI DirectOPENAI_API_KEYoai@gpt-4o
or@, openrouter@OpenRouterOPENROUTER_API_KEYor@deepseek/deepseek-r1
mm@, mmax@MiniMax DirectMINIMAX_API_KEY[email protected]
kimi@, moon@Kimi DirectMOONSHOT_API_KEYkimi@kimi-k2
glm@, zhipu@GLM DirectZHIPU_API_KEYglm@glm-4
zai@Z.AI DirectZAI_API_KEYzai@glm-4
mistral@MistralMISTRAL_API_KEYmistral@mistral-large-2512
sakana@, fugu@Sakana FuguSAKANA_API_KEYfugu@fugu-ultra
sc@Sakana Fugu SubscriptionSAKANA_CODING_API_KEYsc@fugu-ultra
qcode@Alibaba Coding PlanQWEN_CODING_PLAN_API_KEY[email protected]
qtoken@Alibaba Token PlanQWEN_TOKEN_PLAN_API_KEY[email protected]
qpay@Alibaba PAYGDASHSCOPE_API_KEY[email protected]
llama@, lc@, meta@OllamaCloudOLLAMA_API_KEY[email protected]
oc@OllamaCloudOLLAMA_API_KEY[email protected]
zen@OpenCode ZenOPENCODE_API_KEYzen@gpt-5-nano
zgo@, zengo@OpenCode Zen Go planOPENCODE_GO_API_KEYzgo@glm-5
v@, vertex@Vertex AI(Application Default Credentials; VERTEX_PROJECT optional)[email protected]
ag@, antigravity@Antigravity (Gemini subscription)(OAuth via claudish login antigravity)[email protected]
go@deprecated alias โ†’ ag@(OAuth)[email protected]
poe@PoePOE_API_KEYpoe@GPT-4o
ollama@Ollama (local)(none)[email protected]
lms@, lmstudio@LM Studio (local)(none)[email protected]
vllm@vLLM (local)(none)vllm@mistral-7b
mlx@MLX (local)(none)[email protected]

Native Model Auto-Detection

When no provider is specified, Claudish auto-detects from model name:

Model PatternRoutes ToExample
gemini-*, google/*Google Geminigemini-2.0-flash
gpt-*, o1-*, o3-*OpenAI Directgpt-4o
llama-*, meta-llama/*OllamaCloudllama-3.1-70b
abab-*, minimax/*MiniMax Directabab-6.5
kimi-*, moonshot-*Kimi Directkimi-k2
glm-*, zhipu/*GLM Directglm-4
fugu-*, sakana/*Sakana Fugufugu-ultra
qwen3.*, qwen3-*Alibaba subscriptions, OpenCode Go, PAYG, then OpenRouterqwen3.7-plus
poe:*Poepoe:GPT-4o
claude-*, anthropic/*Native Anthropicclaude-sonnet-4
Unknown vendor/modelErrorUse openrouter@vendor/model

Alibaba product rosters: Coding Plan, Token Plan, and PAYG use separate credentials and endpoints. The catalog supplies each product's route and model wire ID; account discovery narrows the models actually available to your key. Cross-vendor models on an Alibaba plan can be selected explicitly, for example [email protected].

Examples

# Auto-detected native routing (no prefix needed!)
claudish --model gemini-2.0-flash "quick task"      # โ†’ Google API
claudish --model gpt-4o "implement feature"          # โ†’ OpenAI API
claudish --model llama-3.1-70b "code review"         # โ†’ OllamaCloud

# Explicit provider routing
claudish --model [email protected] "complex analysis"
claudish --model oai@o1 "complex reasoning"
claudish --model openrouter@deepseek/deepseek-r1 "deep analysis"

# OllamaCloud - cloud-hosted Llama models
claudish --model [email protected] "code review"
claudish --model [email protected] "analyze image"

# Vertex AI - Google Cloud (Application Default Credentials)
gcloud auth application-default login                # once
claudish --model [email protected] "task"           # project from ADC / gcloud config
VERTEX_PROJECT=my-project claudish --model [email protected] "explicit project"

# Alibaba Cloud Model Studio products
claudish --model [email protected] "implement feature"
claudish --model [email protected] "implement feature"
claudish --model [email protected] "implement feature"
claudish --model [email protected] "review"

# Local models with concurrency control
claudish --model [email protected]:3 "review"     # 3 concurrent requests
claudish --model [email protected]:0 "fast"       # No limit (bypass queue)

# Unknown vendors require explicit OpenRouter
claudish --model openrouter@qwen/qwen-2.5 "task"
claudish --model or@mistralai/mistral-large "analysis"

Default provider (v7.0.0+)

The routing priority for bare model names (no provider@ prefix) is configurable. By default, Claudish tries LiteLLM (if configured), then OpenRouter. Override this with defaultProvider:

# Set default provider globally
claudish config set defaultProvider openrouter

# Or via env var
export CLAUDISH_DEFAULT_PROVIDER=openrouter

# Or per-invocation
claudish --default-provider litellm --model minimax-m2.5 "task"

Precedence: --default-provider flag > CLAUDISH_DEFAULT_PROVIDER env var > config file defaultProvider > legacy LiteLLM auto-promotion > OPENROUTER_API_KEY detection > hardcoded "openrouter".

Explicit provider@model syntax always bypasses defaultProvider and routes directly.

Custom endpoints (v7.0.0+)

Register your own OpenAI-compatible endpoints in ~/.claudish/config.json. See Settings Reference for the full schema.

{
  "customEndpoints": {
    "my-vllm": {
      "kind": "simple",
      "url": "http://gpu-box:8000/v1",
      "format": "openai",
      "apiKey": "${VLLM_API_KEY}"
    }
  },
  "defaultProvider": "my-vllm"
}

Then route to it with: claudish --model my-vllm@llama3 "task"

If the endpoint needs no credential (a local router, an inference server on a trusted network), say so with authScheme: "none" and omit apiKey โ€” claudish then sends no auth header at all:

{
  "customEndpoints": {
    "localrouter": {
      "kind": "simple",
      "url": "http://127.0.0.1:8402/v1",
      "format": "openai",
      "authScheme": "none"
    }
  }
}

Do not use a placeholder like "apiKey": "none" for this โ€” that is a literal key, and it goes out as Authorization: Bearer none, which some gateways reject.

Legacy Syntax (Deprecated)

The old prefix/model syntax still works but shows deprecation warnings:

# Old (deprecated)          โ†’  New (recommended)
claudish --model g/gemini-pro     โ†’  claudish --model g@gemini-pro
claudish --model oai/gpt-4o       โ†’  claudish --model oai@gpt-4o
claudish --model ollama/llama3.2  โ†’  claudish --model [email protected]

Curated Models

Top recommended models for development (v3.1.1):

ModelProviderBest For
openai/gpt-5.3OpenAIDefault - Most advanced reasoning
minimax/minimax-m2.1MiniMaxBudget-friendly, fast
z-ai/glm-4.7Z.AIBalanced performance
google/gemini-3-pro-previewGoogle1M context window
moonshotai/kimi-k2-thinkingMoonShotExtended reasoning
deepseek/deepseek-v3.2DeepSeekCode specialist
qwen/qwen3-vl-235b-a22b-thinkingAlibabaVision + reasoning

Vertex AI Partner Models (MaaS - Google Cloud billing):

ModelProviderBest For
vertex/minimax/minimax-m2-maasMiniMaxFast, budget-friendly
vertex/mistralai/codestral-2MistralCode specialist
vertex/deepseek/deepseek-v3-2-maasDeepSeekDeep reasoning
vertex/qwen/qwen3-coder-480b-a35b-instruct-maasQwenAgentic coding
vertex/openai/gpt-oss-120b-maasOpenAIOpen-weight reasoning

List all models:

claudish --models              # List all OpenRouter models
claudish --models gemini       # Search for specific models
claudish --models-top          # Show curated recommendations

Claude Code Flag Passthrough (NEW in v5.3.0)

Claudish forwards all unrecognized flags directly to Claude Code. This means any Claude Code flag works with claudish โ€” no wrapper needed:

# Use Claude Code agents
claudish --model grok --agent code-review "review auth system"

# Control effort and permissions
claudish --model grok --effort high --permission-mode plan "design API"

# Set budget caps
claudish --model grok --max-budget-usd 0.50 "quick fix"

# Custom system prompts
claudish --model grok --append-system-prompt "Always respond in JSON" "list files"

# Restrict available tools
claudish --model grok --allowedTools "Read,Grep" "search for auth bugs"

Claudish flags (--model, --stdin, --quiet, -y, etc.) can appear in any order โ€” they are always recognized regardless of position.

Use -- when a Claude Code flag value starts with -:

claudish --model grok -- --system-prompt "-verbose logging" "task"

Vision Proxy (NEW in v5.1.0)

Every model can now "see" images โ€” even models without native vision support.

When you send an image to a non-vision model (like local Ollama models), Claudish automatically:

  1. Detects that the model cannot process images
  2. Sends each image to the Anthropic API (Claude Sonnet) for a rich description
  3. Replaces the image block with [Image Description: ...] text
  4. Forwards the enriched message to the target model
Claude Code โ†’ image + "what's in this?" โ†’ Claudish
                                             โ†“
                              โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                              โ”‚ Model supports vision?       โ”‚
                              โ”‚  YES โ†’ pass image through    โ”‚
                              โ”‚  NO  โ†’ describe via Claude โ†’ โ”‚
                              โ”‚        replace with text     โ”‚
                              โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                             โ†“
                                      Target Model

How it works:

  • Uses your existing x-api-key from Claude Code (no extra configuration)
  • Each image is described in parallel (fast even with multiple images)
  • 30-second timeout per image with graceful fallback to stripping
  • Descriptions include text content, layout, colors, code, diagrams, and UI elements

Example:

# Local Ollama model (no vision) โ€” images are automatically described
claudish --model [email protected] "what's in this screenshot?"

# Vision-capable model โ€” images pass through unchanged
claudish --model [email protected] "what's in this screenshot?"

Fallback behavior: If the vision proxy fails (network error, timeout, API issue), Claudish falls back to stripping images โ€” the request still goes through, just without image context.

Status Line Display

Claudish automatically shows critical information in the Claude Code status bar - no setup required!

Ultra-Compact Format: directory โ€ข model-id โ€ข $cost โ€ข ctx%

Visual Design:

  • ๐Ÿ”ต Directory (bright cyan, bold) - Where you are
  • ๐ŸŸก Model ID (bright yellow) - Actual OpenRouter model ID
  • ๐ŸŸข Cost (bright green) - Real-time session cost from OpenRouter
  • ๐ŸŸฃ Context (bright magenta) - % of context window remaining
  • โšช Separators (dim) - Visual dividers

Examples:

  • claudish โ€ข x-ai/grok-code-fast-1 โ€ข $0.003 โ€ข 95% - Using Grok, $0.003 spent, 95% context left
  • my-project โ€ข openai/gpt-5-codex โ€ข $0.12 โ€ข 67% - Using GPT-5, $0.12 spent, 67% context left
  • backend โ€ข minimax/minimax-m2 โ€ข $0.05 โ€ข 82% - Using MiniMax M2, $0.05 spent, 82% left
  • test โ€ข openrouter/auto โ€ข $0.01 โ€ข 90% - Using any custom model, $0.01 spent, 90% left

Critical Tracking (Live Updates):

  • ๐Ÿ’ฐ Cost tracking - Real-time USD from Claude Code session data
  • ๐Ÿ“Š Context monitoring - Percentage of model's context window remaining
  • โšก Performance optimized - Ultra-compact to fit with thinking mode UI

Thinking Mode Optimized:

  • โœ… Ultra-compact - Directory limited to 15 chars (leaves room for everything)
  • โœ… Critical first - Most important info (directory, model) comes first
  • โœ… Smart truncation - Long directories shortened with "..."
  • โœ… Space reservation - Reserves ~40 chars for Claude's thinking mode UI
  • โœ… Color-coded - Instant visual scanning
  • โœ… No overflow - Fits perfectly even with thinking mode enabled

Custom Model Support:

  • โœ… ANY OpenRouter model - Not limited to shortlist (e.g., openrouter/auto, custom models)
  • โœ… Actual model IDs - Shows exact OpenRouter model ID (no translation)
  • โœ… Context fallback - Unknown models use 100k context window (safe default)
  • โœ… Shortlist optimized - Our recommended models have accurate context sizes
  • โœ… Future-proof - Works with new models added to OpenRouter

How it works:

  • Each Claudish instance creates a temporary settings file with custom status line
  • Settings use --settings flag (doesn't modify global Claude Code config)
  • Status line uses simple bash script with ANSI colors (no external dependencies!)
  • Displays actual OpenRouter model ID from CLAUDISH_ACTIVE_MODEL_NAME env var
  • Context tracking uses model-specific sizes for our shortlist, 100k fallback for others
  • Temp files are automatically cleaned up when Claudish exits
  • Each instance is completely isolated - run multiple in parallel!

Per-instance isolation:

  • โœ… Doesn't modify ~/.claude/settings.json
  • โœ… Each instance has its own config
  • โœ… Safe to run multiple Claudish instances in parallel
  • โœ… Standard Claude Code unaffected
  • โœ… Temp files auto-cleanup on exit
  • โœ… No external dependencies (bash only, no jq!)

Examples

Basic Usage

# Simple prompt
claudish "fix the bug in user.ts"

# Multi-word prompt
claudish "implement user authentication with JWT tokens"

With Specific Model

# Auto-detected native routing (model name determines provider)
claudish --model gpt-4o "refactor entire API layer"           # โ†’ OpenAI
claudish --model gemini-2.0-flash "quick fix"                 # โ†’ Google
claudish --model llama-3.1-70b "code review"                  # โ†’ OllamaCloud

# Explicit provider routing (new @ syntax)
claudish --model [email protected] "complex analysis"
claudish --model oai@o1 "deep reasoning task"
claudish --model openrouter@deepseek/deepseek-r1 "analysis"   # Unknown vendors need explicit OR

# Local models with concurrency control
claudish --model [email protected] "code review"
claudish --model [email protected]:3 "parallel processing"      # 3 concurrent
claudish --model [email protected] "implement dashboard UI"

Autonomous Mode

Auto-approve is enabled by default. For fully autonomous mode, add --dangerous:

# Basic usage (auto-approve already enabled)
claudish "delete unused files"

# Fully autonomous (auto-approve + dangerous sandbox disabled)
claudish --dangerous "install dependencies"

# Disable auto-approve if you want prompts
claudish --no-auto-approve "make important changes"

Custom Port

# Use specific port
claudish --port 3000 "analyze codebase"

# Or set default
export CLAUDISH_PORT=3000
claudish "your task"

Passing Claude Flags

# Verbose mode
claudish "debug issue" --verbose

# Custom working directory
claudish "analyze code" --cwd /path/to/project

# Multiple flags
claudish --model openai/gpt-5.3-codex "task" --verbose --debug-claudish

Monitor Mode

NEW! Claudish now includes a monitor mode to help you understand how Claude Code works internally.

# Enable monitor mode (requires real Anthropic API key)
claudish --monitor --debug-claudish "implement a feature"

What Monitor Mode Does:

  • โœ… Proxies to REAL Anthropic API (not OpenRouter) - Uses your actual Anthropic API key
  • โœ… Logs ALL traffic - Captures complete requests and responses
  • โœ… Both streaming and JSON - Logs SSE streams and JSON responses
  • โœ… Debug logs to file - Saves to logs/claudish_*.log when --debug-claudish is used
  • โœ… Pass-through proxy - No translation, forwards as-is to Anthropic

When to use Monitor Mode:

  • ๐Ÿ” Understanding Claude Code's API protocol
  • ๐Ÿ› Debugging integration issues
  • ๐Ÿ“Š Analyzing Claude Code's behavior
  • ๐Ÿ”ฌ Research and development

Requirements:

# Monitor mode requires a REAL Anthropic API key (not placeholder)
export ANTHROPIC_API_KEY='sk-ant-api03-...'

# Use with --debug-claudish to save logs to file
claudish --monitor --debug-claudish "your task"

# Logs are saved to: logs/claudish_TIMESTAMP.log

Example Output:

[Monitor] Server started on http://127.0.0.1:8765
[Monitor] Mode: Passthrough to real Anthropic API
[Monitor] All traffic will be logged for analysis

=== [MONITOR] Claude Code โ†’ Anthropic API Request ===
{
  "model": "claude-sonnet-4.5",
  "messages": [...],
  "max_tokens": 4096,
  ...
}
=== End Request ===

=== [MONITOR] Anthropic API โ†’ Claude Code Response (Streaming) ===
event: message_start
data: {"type":"message_start",...}

event: content_block_start
data: {"type":"content_block_start",...}
...
=== End Streaming Response ===

Note: Monitor mode charges your Anthropic account (not OpenRouter). Use --debug-claudish flag to save logs for analysis.

Output Modes

Claudish supports three output modes for different use cases:

1. Quiet Mode (Default in Single-Shot)

Clean output with no [claudish] logs - perfect for piping to other tools:

# Quiet by default in single-shot
claudish "what is 2+2?"
# Output: 2 + 2 equals 4.

# Use in pipelines
claudish "list 3 colors" | grep -i blue

# Redirect to file
claudish "analyze code" > analysis.txt

2. Verbose Mode

Show all [claudish] log messages for debugging:

# Verbose mode
claudish --verbose "what is 2+2?"
# Output:
# [claudish] Starting Claude Code with openai/gpt-4o
# [claudish] Proxy URL: http://127.0.0.1:8797
# [claudish] Status line: dir โ€ข openai/gpt-4o โ€ข $cost โ€ข ctx%
# ...
# 2 + 2 equals 4.
# [claudish] Shutting down proxy server...
# [claudish] Done

# Interactive mode is verbose by default
claudish --interactive

3. JSON Output Mode

Structured output perfect for automation and tool integration:

# JSON output (always quiet)
claudish --json "what is 2+2?"
# Output: {"type":"result","result":"2 + 2 equals 4.","total_cost_usd":0.068,"usage":{...}}

# Extract just the result with jq
claudish --json "list 3 colors" | jq -r '.result'

# Get cost and token usage
claudish --json "analyze code" | jq '{result, cost: .total_cost_usd, tokens: .usage.input_tokens}'

# Use in scripts
RESULT=$(claudish --json "check if tests pass" | jq -r '.result')
echo "AI says: $RESULT"

# Track costs across multiple runs
for task in task1 task2 task3; do
  claudish --json "$task" | jq -r '"\(.total_cost_usd)"'
done | awk '{sum+=$1} END {print "Total: $"sum}'

JSON Output Fields:

  • result - The AI's response text
  • total_cost_usd - Total cost in USD
  • usage.input_tokens - Input tokens used
  • usage.output_tokens - Output tokens used
  • duration_ms - Total duration in milliseconds
  • num_turns - Number of conversation turns
  • modelUsage - Per-model usage breakdown

How It Works

Architecture

claudish "your prompt"
    โ†“
1. Parse arguments (--model, --no-auto-approve, --dangerous, etc.)
2. Find available port (random or specified)
3. Start local proxy on http://127.0.0.1:PORT
4. Spawn: claude --auto-approve --env ANTHROPIC_BASE_URL=http://127.0.0.1:PORT
5. Proxy translates: Anthropic API โ†’ OpenRouter API
6. Stream output in real-time
7. Cleanup proxy on exit

Request Flow

Normal Mode (OpenRouter):

Claude Code โ†’ Anthropic API format โ†’ Local Proxy โ†’ OpenRouter API format โ†’ OpenRouter
                                         โ†“
Claude Code โ† Anthropic API format โ† Local Proxy โ† OpenRouter API format โ† OpenRouter

Monitor Mode (Anthropic Passthrough):

Claude Code โ†’ Anthropic API format โ†’ Local Proxy (logs) โ†’ Anthropic API
                                         โ†“
Claude Code โ† Anthropic API format โ† Local Proxy (logs) โ† Anthropic API

Parallel Runs

Each claudish invocation:

  • Gets a unique random port
  • Starts isolated proxy server
  • Runs independent Claude Code instance
  • Cleans up on exit

This allows multiple parallel runs:

# Terminal 1
claudish --model x-ai/grok-code-fast-1 "task A"

# Terminal 2
claudish --model openai/gpt-5.3-codex "task B"

# Terminal 3
claudish --model minimax/minimax-m2 "task C"

Extended Thinking Support

NEW in v1.1.0: Claudish now fully supports models with extended thinking/reasoning capabilities (Grok, o1, etc.) with complete Anthropic Messages API protocol compliance.

Thinking Translation Model (v1.5.0)

Claudish includes a sophisticated Thinking Translation Model that aligns Claude Code's native thinking budget with the unique requirements of every major AI provider.

When you set a thinking budget in Claude (e.g., budget: 16000), Claudish automatically translates it:

ProviderModelTranslation Logic
OpenAIo1, o3Maps budget to reasoning_effort (minimal/low/medium/high)
GoogleGemini 3Maps to thinking_level (low/high)
GoogleGemini 2.xPasses exact thinking_budget (capped at 24k)
xAIGrok 3 MiniMaps to reasoning_effort (low/high)
QwenQwen 2.5Enables enable_thinking + exact budget
MiniMaxM2Enables reasoning_split (interleaved thinking)
DeepSeekR1Automatically manages reasoning (params stripped for safety)

This ensures you can use standard Claude Code thinking controls with ANY supported model, without worrying about API specificities.

What is Extended Thinking?

Some AI models (like Grok and OpenAI's o1) can show their internal reasoning process before providing the final answer. This "thinking" content helps you understand how the model arrived at its conclusion.

How Claudish Handles Thinking

Claudish implements the Anthropic Messages API's interleaved-thinking protocol:

Thinking Blocks (Hidden):

  • Contains model's reasoning process
  • Automatically collapsed in Claude Code UI
  • Shows "Claude is thinking..." indicator
  • User can expand to view reasoning

Text Blocks (Visible):

  • Contains final response
  • Displayed normally
  • Streams incrementally

Supported Models with Thinking

  • โœ… x-ai/grok-code-fast-1 - Grok's reasoning mode
  • โœ… openai/gpt-5-codex - o1 reasoning (when enabled)
  • โœ… openai/o1-preview - Full reasoning support
  • โœ… openai/o1-mini - Compact reasoning
  • โš ๏ธ Other models may support reasoning in future

Technical Details

Streaming Protocol (V2 - Protocol Compliant):

1. message_start
2. content_block_start (text, index=0)      โ† IMMEDIATE! (required)
3. ping
4. [If reasoning arrives]
   - content_block_stop (index=0)           โ† Close initial empty block
   - content_block_start (thinking, index=1) โ† Reasoning
   - thinking_delta events ร— N
   - content_block_stop (index=1)
5. content_block_start (text, index=2)      โ† Response
6. text_delta events ร— M
7. content_block_stop (index=2)
8. message_delta + message_stop

Critical: content_block_start must be sent immediately after message_start, before ping. This is required by the Anthropic Messages API protocol for proper UI initialization.

Key Features:

  • โœ… Separate thinking and text blocks (proper indices)
  • โœ… thinking_delta vs text_delta event types
  • โœ… Thinking content hidden by default
  • โœ… Smooth transitions between blocks
  • โœ… Full Claude Code UI compatibility

UX Benefits

Before (v1.0.0 - No Thinking Support):

  • Reasoning visible as regular text
  • Confusing output with internal thoughts
  • No progress indicators
  • "All at once" message updates

After (v1.1.0 - Full Protocol Support):

  • โœ… Reasoning hidden/collapsed
  • โœ… Clean, professional output
  • โœ… "Claude is thinking..." indicator shown
  • โœ… Smooth incremental streaming
  • โœ… Message headers/structure visible
  • โœ… Protocol compliant with Anthropic Messages API

Documentation

For complete protocol documentation, see:

Dynamic Reasoning Support (NEW in v1.4.0)

Claudish now intelligently adapts to ANY reasoning model!

No more hardcoded lists or manual flags. Claudish dynamically queries OpenRouter metadata to enable thinking capabilities for any model that supports them.

๐Ÿง  Dynamic Thinking Features

  1. Auto-Detection:

    • Automatically checks model capabilities at startup
    • Enables Extended Thinking UI only when supported
    • Future-proof: Works instantly with new models (e.g., deepseek-r1 or minimax-m2)
  2. Smart Parameter Mapping:

    • Claude: Passes token budget directly (e.g., 16k tokens)
    • OpenAI (o1/o3): Translates budget to reasoning_effort
      • "ultrathink" (โ‰ฅ32k) โ†’ high
      • "think hard" (16k-32k) โ†’ medium
      • "think" (<16k) โ†’ low
    • Gemini & Grok: Preserves thought signatures and XML traces automatically
  3. Universal Compatibility:

    • Use "ultrathink" or "think hard" prompts with ANY supported model
    • Claudish handles the translation layer for you

Context Scaling & Auto-Compaction

NEW in v1.2.0: Claudish now intelligently manages token counting to support ANY context window size (from 128k to 2M+) while preserving Claude Code's native auto-compaction behavior.

The Challenge

Claude Code naturally assumes a fixed context window (typically 200k tokens for Sonnet).

  • Small Models (e.g., Grok 128k): Claude might overuse context and crash.
  • Massive Models (e.g., Gemini 2M): Claude would compact way too early (at 10% usage), wasting the model's potential.

The Solution: Token Scaling

Claudish implements a "Dual-Accounting" system:

  1. Internal Scaling (For Claude):

    • We fetch the real context limit from OpenRouter (e.g., 1M tokens).
    • We scale reported token usage so Claude thinks 1M tokens is 200k.
    • Result: Auto-compaction triggers at the correct percentage of usage (e.g., 90% full), regardless of the actual limit.
  2. Accurate Reporting (For You):

    • The status line displays the Real Unscaled Usage and Real Context %.
    • You see specific costs and limits, while Claude remains blissfully unaware and stable.

Benefits:

  • โœ… Works with ANY model size (128k, 1M, 2M, etc.)
  • โœ… Unlocks massive context windows (Claude Code becomes 10x more powerful with Gemini!)
  • โœ… Prevents crashes on smaller models (Grok)
  • โœ… Native behavior (compaction just works)

Development

Project Structure

mcp/claudish/
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ index.ts              # Main entry point
โ”‚   โ”œโ”€โ”€ cli.ts                # CLI argument parser
โ”‚   โ”œโ”€โ”€ proxy-server.ts       # Hono-based proxy server
โ”‚   โ”œโ”€โ”€ transform.ts          # API format translation (from claude-code-proxy)
โ”‚   โ”œโ”€โ”€ claude-runner.ts      # Claude CLI runner (creates temp settings)
โ”‚   โ”œโ”€โ”€ port-manager.ts       # Port utilities
โ”‚   โ”œโ”€โ”€ config.ts             # Constants and defaults
โ”‚   โ”œโ”€โ”€ types.ts              # TypeScript types
โ”‚   โ””โ”€โ”€ services/
โ”‚       โ””โ”€โ”€ vision-proxy.ts   # Image description for non-vision models
โ”œโ”€โ”€ tests/                    # Test files
โ”œโ”€โ”€ package.json
โ”œโ”€โ”€ tsconfig.json
โ””โ”€โ”€ biome.json

Proxy Implementation

Claudish uses a Hono-based proxy server inspired by claude-code-proxy:

  • Framework: Hono - Fast, lightweight web framework
  • API Translation: Converts Anthropic API format โ†” OpenAI format
  • Streaming: Full support for Server-Sent Events (SSE)
  • Tool Calling: Handles Claude's tool_use โ†” OpenAI's tool_calls
  • Battle-tested: Based on production-ready claude-code-proxy implementation

Why Hono?

  • Native Bun support (no adapters needed)
  • Extremely fast and lightweight
  • Middleware support (CORS, logging, etc.)
  • Works across Node.js, Bun, and Cloudflare Workers

Build & Test

# Install dependencies
bun install

# Development mode
bun run dev "test prompt"

# Build
bun run build

# Lint
bun run lint

# Format
bun run format

# Type check
bun run typecheck

# Run tests
bun test

Protocol Compliance Testing

Claudish includes a comprehensive snapshot testing system to ensure 1:1 compatibility with the official Claude Code protocol:

# Run snapshot tests (13/13 passing โœ…)
bun test tests/snapshot.test.ts

# Full workflow: capture fixtures + run tests
./tests/snapshot-workflow.sh --full

# Capture new test fixtures from monitor mode
./tests/snapshot-workflow.sh --capture

# Debug SSE events
bun tests/debug-snapshot.ts

What Gets Tested:

  • โœ… Event sequence (message_start โ†’ content_block_start โ†’ deltas โ†’ stop โ†’ message_delta โ†’ message_stop)
  • โœ… Content block indices (sequential: 0, 1, 2, ...)
  • โœ… Tool input streaming (fine-grained JSON chunks)
  • โœ… Usage metrics (present in message_start and message_delta)
  • โœ… Stop reasons (always present and valid)
  • โœ… Cache metrics (creation and read tokens)

Documentation:

Install Globally

# Link for global use
bun run install:global

# Now use anywhere
claudish "your task"

Troubleshooting

"Claude Code CLI is not installed"

Install Claude Code:

npm install -g claude-code
# or visit: https://claude.com/claude-code

"OPENROUTER_API_KEY environment variable is required"

Set your API key:

export OPENROUTER_API_KEY=sk-or-v1-...

Or add to your shell profile (~/.zshrc, ~/.bashrc):

echo 'export OPENROUTER_API_KEY=sk-or-v1-...' >> ~/.zshrc
source ~/.zshrc

"No available ports found"

Specify a custom port:

claudish --port 3000 "your task"

Or increase port range in src/config.ts.

Proxy errors

Check OpenRouter API status:

Verify your API key works:

Status line not showing model

If the status line doesn't show the model name:

  1. Check if --settings flag is being passed:

    # Look for this in Claudish output:
    # [claudish] Instance settings: /tmp/claudish-settings-{timestamp}.json
    
  2. Verify environment variable is set:

    # Should be set automatically by Claudish
    echo $CLAUDISH_ACTIVE_MODEL_NAME
    # Should output something like: xAI/Grok-1
    
  3. Test status line command manually:

    export CLAUDISH_ACTIVE_MODEL_NAME="xAI/Grok-1"
    cat > /dev/null && echo "[$CLAUDISH_ACTIVE_MODEL_NAME] ๐Ÿ“ $(basename "$(pwd)")"
    # Should output: [xAI/Grok-1] ๐Ÿ“ your-directory-name
    
  4. Check temp settings file:

    # File is created in /tmp/claudish-settings-*.json
    ls -la /tmp/claudish-settings-*.json 2>/dev/null | tail -1
    cat /tmp/claudish-settings-*.json | head -1
    
  5. Verify bash is available:

    which bash
    # Should show path to bash (usually /bin/bash or /usr/bin/bash)
    

Note: Temp settings files are automatically cleaned up when Claudish exits. If you see multiple files, you may have crashed instances - they're safe to delete manually.

Comparison with Claude Code

FeatureClaude CodeClaudish
ModelAnthropic models onlyAny OpenRouter model
APIAnthropic APIOpenRouter API
CostAnthropic pricingOpenRouter pricing
SetupAPI key โ†’ directAPI key โ†’ proxy โ†’ OpenRouter
SpeedDirect connection~Same (local proxy)
FeaturesAll Claude Code featuresAll Claude Code features
VisionNative (Anthropic models)Any model (auto-described via Claude)

When to use Claudish:

  • โœ… Want to try different models (Grok, GPT-5, etc.)
  • โœ… Need OpenRouter-specific features
  • โœ… Prefer OpenRouter pricing
  • โœ… Testing model performance

When to use Claude Code:

  • โœ… Want latest Anthropic models only
  • โœ… Need official Anthropic support
  • โœ… Simpler setup (no proxy)

Contributing

Contributions welcome! Please:

  1. Fork the repo
  2. Create feature branch: git checkout -b feature/amazing
  3. Commit changes: git commit -m 'Add amazing feature'
  4. Push to branch: git push origin feature/amazing
  5. Open Pull Request

License

MIT ยฉ MadAppGang

Acknowledgments

Claudish's proxy implementation is based on claude-code-proxy by @kiyo-e. We've adapted their excellent Hono-based API translation layer for OpenRouter integration.

Key contributions from claude-code-proxy:

  • Anthropic โ†” OpenAI API format translation (transform.ts)
  • Streaming response handling with Server-Sent Events
  • Tool calling compatibility layer
  • Clean Hono framework architecture

Thank you to the claude-code-proxy team for building a robust, production-ready foundation! ๐Ÿ™


Made with โค๏ธ by MadAppGang

ai
claude
claudecode

MadAppGang/claudish

Claude Code. Any Model. The most powerful AI coding agent now speaks every language.

TypeScript

1,007

1,483 commits

updated Oct 20, 2026

See the code

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 SubscriptionCommand
Anthropic MaxNative support (just use claude)
Gemini Advancedclaudish --model g@gemini-3-pro-preview
ChatGPT Plus/Codexclaudish --model [email protected] or [email protected]
Kimiclaudish --model [email protected]
GLMclaudish --model [email protected]
MiniMaxclaudish --model [email protected]
OllamaCloudclaudish --model oc@qwen3-next
OpenCode Zen Goclaudish --model zgo@glm-5
Alibaba Coding Planclaudish --model [email protected]
Alibaba Token Planclaudish --model [email protected]
Alibaba PAYGclaudish --model [email protected]

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., [email protected])
  • โœ… 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
  • โœ… Classifier passthrough - In hybrid setups, keep Claude Code's auto-mode permission classifier on real Claude (Anthropic) while your main loop runs on another provider (--classifier-provider anthropic)
  • โœ… 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: Log in with a subscription you already pay for (no API key)

If you have ChatGPT Plus/Pro, an Antigravity plan, a Kimi or GLM coding plan, a SuperGrok subscription, or Anthropic Max, claudish login uses it directly. No API key, no per-token billing.

claudish login                 # interactive picker of every provider you can log into
claudish login codex           # ChatGPT Plus/Pro (OpenAI's own PKCE flow)
claudish login antigravity     # Gemini via your Antigravity plan
claudish login grok            # SuperGrok / X Premium+
claudish login kimi            # Kimi

# Then just name the model
claudish --model [email protected] "implement user authentication"
claudish --model [email protected] "add tests"

Run claudish --probe [email protected] afterwards to confirm the credential resolved and see which provider will actually serve the request.

Option 2: Interactive Mode

# 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 3: 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:

    # List all models or search
    claudish --models
    claudish --models gemini
    
    # Get top recommended models (JSON)
    claudish --models-top --json
    
  2. Run Claudish through sub-agent (recommended pattern):

    // 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.
      `
    });
    
  3. File-based instruction pattern (avoids context pollution):

    // 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.

FlagShortDescriptionDefault
--model <model>-mModel 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)
--classifier-provider <name>Route the auto-mode permission classifier to native Anthropic (anthropic)Off
--classifier-model <model>Native Claude model for the classifier passthrough (also enables it)claude-sonnet-5
--profile <name>-pNamed profile for model mappingDefault profile
--config <file>Use this file as the run's ONLY config (replaces global + project)
--op-env <id>Load env vars from a 1Password Environment (highest priority)
--interactive-iInteractive mode (persistent session)Auto when no prompt
--auto-approve-ySkip permission promptsfalse
--no-auto-approveExplicitly enable permission prompts
--dangerousPass --dangerouslyDisableSandboxfalse
--port <port>Proxy server portRandom (3000-9000)
--debug-claudish-dEnable debug logging to logs/false
--log-level <level>Log verbosity: debug, info, minimalinfo
--quiet-qSuppress [claudish] messagesDefault in single-shot
--verbose-vShow [claudish] messagesDefault in interactive
--jsonJSON output for tool integration (implies --quiet)false
--stdinRead prompt from stdinfalse
--freeShow only free models in selectorfalse
--monitorProxy to real Anthropic API and log trafficfalse
--summarize-toolsSummarize tool descriptions (for local models)false
--cost-trackEnable cost tracking (enables monitor mode)false
--cost-auditShow cost analysis report
--cost-resetReset accumulated cost statistics
--models [query]-s (--models-search)List all models or fuzzy search
--models-topShow curated recommended models
--models-refreshForce refresh model cache
--initInstall Claudish skill in current project
--mcpRun as MCP server
login [provider]Log in to a subscription provider via OAuth (no argument = interactive picker)
logout [provider]Clear a provider's OAuth credentials
--kimi-logoutDeprecated alias for claudish logout kimi
--help-aiShow AI agent usage guide
--versionShow version
--help-hShow 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)

VariableProviderAliases
OPENROUTER_API_KEYOpenRouter (default backend, 580+ models)
GEMINI_API_KEYGoogle Gemini (g@, google@)
OPENAI_API_KEYOpenAI (oai@)
MINIMAX_API_KEYMiniMax (mm@, mmax@)
MINIMAX_CODING_API_KEYMiniMax Coding Plan (mmc@)
MOONSHOT_API_KEYKimi/Moonshot (kimi@)KIMI_API_KEY
KIMI_CODING_API_KEYKimi Coding Plan (kc@)Or OAuth via claudish login kimi
ZHIPU_API_KEYGLM/Zhipu (glm@)GLM_API_KEY
GLM_CODING_API_KEYGLM Coding Plan (gc@)ZAI_CODING_API_KEY
ZAI_API_KEYZ.AI (zai@)
SAKANA_API_KEYSakana Fugu (sakana@, fugu@)
SAKANA_CODING_API_KEYSakana Fugu Subscription (sc@)SAKANA_API_KEY
QWEN_CODING_PLAN_API_KEYAlibaba Coding Plan (qcode@)(separate key and host)
QWEN_TOKEN_PLAN_API_KEYAlibaba Token Plan (qtoken@)(separate key and host)
DASHSCOPE_API_KEYAlibaba PAYG (qpay@)(separate key and host)
OLLAMA_API_KEYOllamaCloud (oc@)
OPENCODE_API_KEYOpenCode Zen (zen@)
OPENCODE_GO_API_KEYOpenCode Zen Go plan (zgo@)(separate from the metered Zen credential)
LITELLM_API_KEYLiteLLM (ll@) โ€” requires LITELLM_BASE_URL
POE_API_KEYPoe (poe@)
VERTEX_PROJECTVertex AI (v@) โ€” optional; the ADC quota project or gcloud config get project is used otherwiseGOOGLE_CLOUD_PROJECT
ANTHROPIC_API_KEYPlaceholder (suppresses Claude Code dialog)

Bundled Endpoint Catalog

25 extra vendors ship inside the package as predefined endpoints. Each appears only when its key is already present locally (env var, alias, or config.apiKeys) โ€” set the variable and vendor@model starts working with no config file. A key that lives only in 1Password does not activate a row (activation is synchronous); use predefinedEndpoints.enable for that case. See Predefined Endpoints.

All 25 rows ship probe-verified โ€” the configured path was confirmed to reach the vendor's own auth layer, and a bogus sibling path to answer differently. None is live-verified: that is strong evidence about routing and weak evidence about a vendor's streaming dialect on a successful turn. The endpoint layer itself was verified end to end against a real API.

VariableProviderNotes
GROQ_API_KEYGroq (groq@)
CEREBRAS_API_KEYCerebras (cerebras@)
TOGETHER_API_KEYTogether AI (together@)
FIREWORKS_API_KEYFireworks AI (fireworks@)
DEEPINFRA_API_KEYDeepInfra (deepinfra@)
NEBIUS_API_KEYNebius AI Studio (nebius@)
HYPERBOLIC_API_KEYHyperbolic (hyperbolic@)
SAMBANOVA_API_KEYSambaNova Cloud (sambanova@)
NOVITA_API_KEYNovita AI (novita@)
BASETEN_API_KEYBaseten (baseten@)
PERPLEXITY_API_KEYPerplexity Sonar (perplexity@)
VENICE_API_KEYVenice AI (venice@)
CHUTES_API_KEYChutes (chutes@)
FEATHERLESS_API_KEYFeatherless AI (featherless@)
PARASAIL_API_KEYParasail (parasail@)
INFERENCE_NET_API_KEYInference.net (inference-net@)
AIMLAPI_API_KEYAI/ML API (aimlapi@)
REQUESTY_API_KEYRequesty (requesty@)
NANOGPT_API_KEYNanoGPT (nanogpt@)
COHERE_API_KEYCohere (cohere@)OpenAI-compatibility layer
SCALEWAY_API_KEYScaleway Generative APIs (scaleway@)
UPSTAGE_API_KEYUpstage Solar (upstage@)
WRITER_API_KEYWriter Palmyra (writer@)
MOONSHOT_CN_API_KEYMoonshot AI China region (moonshot-cn@)Different service from MOONSHOT_API_KEY / moonshot@ above
TUNING_ENGINES_API_KEYTuning Engines (tuningengines@)Self-hosted: also set TUNING_ENGINES_BASE_URL

Every one of these also accepts CUSTOM_<NAME>_KEY as an alias, and any of them can be replaced outright by a customEndpoints entry of the same name.

Claudish Settings

VariableDescriptionDefault
CLAUDISH_MODELDefault model (overrides ANTHROPIC_MODEL)Interactive selector
CLAUDISH_PORTDefault proxy portRandom (3000-9000)
CLAUDISH_CONTEXT_WINDOWOverride context window size (local models)Auto-detected
CLAUDISH_MODEL_OPUSModel for Opus role
CLAUDISH_MODEL_SONNETModel for Sonnet role
CLAUDISH_MODEL_HAIKUModel for Haiku role
CLAUDISH_MODEL_SUBAGENTModel for sub-agents
CLAUDISH_SUMMARIZE_TOOLSSummarize tool descriptions (true/1)false
CLAUDISH_TELEMETRYOverride telemetry (0/false/off to disable)From config
CLAUDISH_LOCAL_MAX_PARALLELMax concurrent local model requests (1-8)1
CLAUDISH_LOCAL_QUEUE_ENABLEDEnable/disable local model queuetrue
CLAUDISH_DEFAULT_PROVIDERDefault provider for bare model routing (v7.0.0+)Auto-detected
CLAUDISH_QWEN_NO_THINKDisable thinking for Qwen models (1)
CLAUDISH_NO_PREDEFINED_ENDPOINTSTurn the bundled endpoint catalog off entirely (1)Catalog on
CLAUDISH_CLASSIFIER_PROVIDERRoute auto-mode permission classifier to native Anthropic (anthropic) โ€” see Classifier PassthroughOff
CLAUDISH_CLASSIFIER_MODELNative Claude model for the classifier passthrough (also enables it)claude-sonnet-5
CLAUDISH_CLASSIFIER_DEBUGDump raw requests to logs/classifier-capture.jsonl for classifier-detection debugging (1)Off

Claude Code Compatibility

VariableDescription
ANTHROPIC_MODELFallback for CLAUDISH_MODEL
ANTHROPIC_DEFAULT_OPUS_MODELFallback for CLAUDISH_MODEL_OPUS
ANTHROPIC_DEFAULT_SONNET_MODELFallback for CLAUDISH_MODEL_SONNET
ANTHROPIC_DEFAULT_HAIKU_MODELFallback for CLAUDISH_MODEL_HAIKU
CLAUDE_CODE_SUBAGENT_MODELFallback for CLAUDISH_MODEL_SUBAGENT
CLAUDE_PATHCustom path to Claude Code binary

Custom Endpoints

VariableProviderDefault
GEMINI_BASE_URLGemini APIhttps://generativelanguage.googleapis.com
OPENAI_BASE_URLOpenAI/Azurehttps://api.openai.com
MINIMAX_BASE_URLMiniMaxhttps://api.minimax.io (China-platform keys: https://api.minimaxi.com)
MOONSHOT_BASE_URLKimi/Moonshothttps://api.moonshot.ai
ZHIPU_BASE_URLGLM/Zhipuhttps://open.bigmodel.cn
ZAI_BASE_URLZ.AIhttps://api.z.ai
QWEN_CODING_PLAN_BASE_URLAlibaba Coding Planhttps://coding-intl.dashscope.aliyuncs.com
QWEN_TOKEN_PLAN_BASE_URLAlibaba Token Planhttps://token-plan.ap-southeast-1.maas.aliyuncs.com
DASHSCOPE_BASE_URLAlibaba PAYGhttps://dashscope-intl.aliyuncs.com
OLLAMACLOUD_BASE_URLOllamaCloudhttps://ollama.com
OPENCODE_BASE_URLOpenCode Zenhttps://opencode.ai/zen
LITELLM_BASE_URLLiteLLM proxy server(required with LITELLM_API_KEY)
OLLAMA_BASE_URLOllama (local)http://localhost:11434
OLLAMA_HOSTAlias for OLLAMA_BASE_URL
LMSTUDIO_BASE_URLLM Studio (local)http://localhost:1234
VLLM_BASE_URLvLLM (local)http://localhost:8000
MLX_BASE_URLMLX (local)http://127.0.0.1:8080
TUNING_ENGINES_BASE_URLTuning Engines (tuningengines@), self-hosted gatewayhttps://api.tuningengines.com

A malformed base-URL override SKIPS the provider โ€” it never falls back to the public host. You set the variable to keep traffic inside your own network; quietly redirecting a typo to a vendor's public endpoint would send exactly the data you were isolating to exactly the place you were isolating it from.

Priority order: CLI flags > CLAUDISH_* env vars > ANTHROPIC_* env vars > profile config > interactive selector.

Important Notes:

  • Set ANTHROPIC_API_KEY=sk-ant-api03-placeholder (or any value) to suppress the Claude Code login dialog
  • In interactive mode, if no API key is set, you'll be prompted to enter one

Configuration Files

Claudish uses a two-scope configuration system:

FileScopePurpose
~/.claudish/config.jsonGlobalProfiles, telemetry, routing rules (shared across projects)
.claudish.jsonLocalProject-specific profiles and routing rules (overrides global)
.envLocalEnvironment variables (auto-loaded at startup)

Profile configuration (~/.claudish/config.json):

{
  "version": "1.0.0",
  "defaultProfile": "default",
  "profiles": {
    "default": {
      "name": "default",
      "models": {
        "opus": "[email protected]",
        "sonnet": "google@gemini-3-pro",
        "haiku": "[email protected]",
        "subagent": "[email protected]"
      }
    }
  },
  "routing": {
    "kimi-*": ["kc", "kimi", "openrouter"],
    "glm-*": ["gc", "glm"],
    "*": ["litellm", "openrouter"]
  }
}

Custom routing rules map model name patterns to ordered provider fallback chains. Patterns support exact names, globs (kimi-*), and * catch-all. Local .claudish.json routing rules replace global rules entirely.

Manage profiles with:

claudish init [--local|--global]            # Setup wizard
claudish profile list [--local|--global]    # List profiles
claudish profile add [--local|--global]     # Add profile
claudish profile use <name>                 # Set default
claudish profile edit <name>                # Edit profile

For the complete configuration reference, see Settings Reference.

1Password Integration

Resolve provider API keys from 1Password instead of storing them in plaintext. Claudish reads secret references (op://vault/item/field) and resolves them at startup โ€” the secret never lives in your config or shell history.

Authentication is automatic, in this order:

  1. OP_SERVICE_ACCOUNT_TOKEN โ€” a service-account token for headless/CI use (resolved via the official 1Password SDK, in-process, no op CLI needed). Service accounts can only read shared vaults, not your Private vault.
  2. op CLI session โ€” if you're signed into the 1Password desktop app (op signin), claudish uses that session (interactive, Touch ID). This is the zero-setup path on a laptop.

If a config value or env var starts with op:// and neither auth method works, claudish fails with a clear message rather than running with a missing key. If no op:// reference is present, claudish never touches 1Password (zero overhead for non-users).

About the authorization prompt: When claudish reads a secret via the op CLI session, the 1Password desktop app shows an authorization prompt. By design, 1Password labels that prompt with the requesting process โ€” i.e. your terminal (tmux, iTerm, etc.) โ€” not "claudish". This is a 1Password behavior that no app can override; the prompt always names the process, never the integration. claudish is identified as claudish in 1Password's activity/audit log, just not in the live prompt. To avoid the prompt entirely (e.g. CI, or if the terminal name bothers you), use a OP_SERVICE_ACCOUNT_TOKEN โ€” the service-account path authenticates directly against the 1Password API with no desktop prompt at all.

Single references

Point any API key at a 1Password field:

{
  "apiKeys": {
    "OPENROUTER_API_KEY": "op://Shared/OpenRouter/credential",
    "OPENAI_API_KEY": "op://Shared/OpenAI/api-key"
  }
}

A ${VAR} in a custom-endpoint apiKey and an op://... value are both resolved the same way. Multiple references are resolved in a single batch (one auth prompt).

Glob import โ€” many keys from one item

If you keep all your provider keys in one 1Password item (each field named after its env var, e.g. OPENROUTER_API_KEY, ANTHROPIC_API_KEY), import them all with one entry. Add a top-level onepassword array of glob paths:

{
  "onepassword": [
    "op://Jack/AI LLM keys/*/*_API_KEY"
  ]
}

The glob position mirrors the op:// path structure:

PatternImports
op://Vault/Item/*all top-level (sectionless) fields
op://Vault/Item/*_API_KEYtop-level fields ending in _API_KEY
op://Vault/Item/Section/*all fields in Section
op://Vault/Item/*/*_API_KEY*_API_KEY fields across all sections
op://Vault/Item/M*/*all fields in sections starting with M

Each matched field label becomes the env var name (trimmed of whitespace). Labels that aren't valid env var names (e.g. Customer Key) are skipped with a warning. Only matched fields are decrypted โ€” claudish lists field names first, then fetches values only for the ones you import.

Preview what a glob would import without revealing any secret values:

claudish op --list "op://Jack/AI LLM keys/*/*_API_KEY"
#   OPENROUTER_API_KEY   โœ“  (section: Open router)
#   ANTHROPIC_API_KEY    โœ“  (section: Claude)
#   Customer Key         โœ—  skipped (not a valid env var name)
#   9 importable, 1 skipped

Or run a one-off session with keys loaded inline, no config needed:

claudish op "op://Jack/AI LLM keys/*/*_API_KEY" --model openrouter@deepseek/deepseek-r1 "task"

Finding the path

In the 1Password app, hover a field โ†’ its menu โ†’ Copy Secret Reference gives op://Vault/Item/[Section/]Field. For a glob, you only need the vault and item names (visible in the sidebar and title) plus /* โ€” claudish discovers the fields. The claudish op --list preview confirms a glob before you commit it to config.

1Password Environments

1Password Environments (named sets of env vars) load via --op-env <id>, where <id> is the Environment ID copied from the desktop app (Developer โ†’ View Environments โ†’ Manage environment โ†’ Copy environment ID):

claudish --op-env <environment-id> --model openrouter@... "task"

Environment values are the highest-priority source (they override config and shell env). Requires the op CLI โ‰ฅ 2.35 (beta) โ€” the latest stable op (2.34.0) does not yet include the op environment command.

Zero-code alternative

You can also wrap claudish with op run (no config changes needed), using an env file of op:// references:

op run --env-file=.env -- claudish --model openrouter@... "task"

Model Routing (v4.0.0+)

Claudish uses provider@model[:concurrency] syntax for explicit routing, plus smart auto-detection for native providers:

New Syntax: provider@model[:concurrency]

# Explicit provider routing
claudish --model [email protected] "quick task"
claudish --model openrouter@deepseek/deepseek-r1 "analysis"
claudish --model oai@gpt-4o "implement feature"
claudish --model [email protected]:3 "code review"  # 3 concurrent requests

Provider Shortcuts

ShortcutProviderAPI KeyExample
g@, google@Google GeminiGEMINI_API_KEY[email protected]
oai@OpenAI DirectOPENAI_API_KEYoai@gpt-4o
or@, openrouter@OpenRouterOPENROUTER_API_KEYor@deepseek/deepseek-r1
mm@, mmax@MiniMax DirectMINIMAX_API_KEY[email protected]
kimi@, moon@Kimi DirectMOONSHOT_API_KEYkimi@kimi-k2
glm@, zhipu@GLM DirectZHIPU_API_KEYglm@glm-4
zai@Z.AI DirectZAI_API_KEYzai@glm-4
mistral@MistralMISTRAL_API_KEYmistral@mistral-large-2512
sakana@, fugu@Sakana FuguSAKANA_API_KEYfugu@fugu-ultra
sc@Sakana Fugu SubscriptionSAKANA_CODING_API_KEYsc@fugu-ultra
qcode@Alibaba Coding PlanQWEN_CODING_PLAN_API_KEY[email protected]
qtoken@Alibaba Token PlanQWEN_TOKEN_PLAN_API_KEY[email protected]
qpay@Alibaba PAYGDASHSCOPE_API_KEY[email protected]
llama@, lc@, meta@OllamaCloudOLLAMA_API_KEY[email protected]
oc@OllamaCloudOLLAMA_API_KEY[email protected]
zen@OpenCode ZenOPENCODE_API_KEYzen@gpt-5-nano
zgo@, zengo@OpenCode Zen Go planOPENCODE_GO_API_KEYzgo@glm-5
v@, vertex@Vertex AI(Application Default Credentials; VERTEX_PROJECT optional)[email protected]
ag@, antigravity@Antigravity (Gemini subscription)(OAuth via claudish login antigravity)[email protected]
go@deprecated alias โ†’ ag@(OAuth)[email protected]
poe@PoePOE_API_KEYpoe@GPT-4o
ollama@Ollama (local)(none)[email protected]
lms@, lmstudio@LM Studio (local)(none)[email protected]
vllm@vLLM (local)(none)vllm@mistral-7b
mlx@MLX (local)(none)[email protected]

Native Model Auto-Detection

When no provider is specified, Claudish auto-detects from model name:

Model PatternRoutes ToExample
gemini-*, google/*Google Geminigemini-2.0-flash
gpt-*, o1-*, o3-*OpenAI Directgpt-4o
llama-*, meta-llama/*OllamaCloudllama-3.1-70b
abab-*, minimax/*MiniMax Directabab-6.5
kimi-*, moonshot-*Kimi Directkimi-k2
glm-*, zhipu/*GLM Directglm-4
fugu-*, sakana/*Sakana Fugufugu-ultra
qwen3.*, qwen3-*Alibaba subscriptions, OpenCode Go, PAYG, then OpenRouterqwen3.7-plus
poe:*Poepoe:GPT-4o
claude-*, anthropic/*Native Anthropicclaude-sonnet-4
Unknown vendor/modelErrorUse openrouter@vendor/model

Alibaba product rosters: Coding Plan, Token Plan, and PAYG use separate credentials and endpoints. The catalog supplies each product's route and model wire ID; account discovery narrows the models actually available to your key. Cross-vendor models on an Alibaba plan can be selected explicitly, for example [email protected].

Examples

# Auto-detected native routing (no prefix needed!)
claudish --model gemini-2.0-flash "quick task"      # โ†’ Google API
claudish --model gpt-4o "implement feature"          # โ†’ OpenAI API
claudish --model llama-3.1-70b "code review"         # โ†’ OllamaCloud

# Explicit provider routing
claudish --model [email protected] "complex analysis"
claudish --model oai@o1 "complex reasoning"
claudish --model openrouter@deepseek/deepseek-r1 "deep analysis"

# OllamaCloud - cloud-hosted Llama models
claudish --model [email protected] "code review"
claudish --model [email protected] "analyze image"

# Vertex AI - Google Cloud (Application Default Credentials)
gcloud auth application-default login                # once
claudish --model [email protected] "task"           # project from ADC / gcloud config
VERTEX_PROJECT=my-project claudish --model [email protected] "explicit project"

# Alibaba Cloud Model Studio products
claudish --model [email protected] "implement feature"
claudish --model [email protected] "implement feature"
claudish --model [email protected] "implement feature"
claudish --model [email protected] "review"

# Local models with concurrency control
claudish --model [email protected]:3 "review"     # 3 concurrent requests
claudish --model [email protected]:0 "fast"       # No limit (bypass queue)

# Unknown vendors require explicit OpenRouter
claudish --model openrouter@qwen/qwen-2.5 "task"
claudish --model or@mistralai/mistral-large "analysis"

Default provider (v7.0.0+)

The routing priority for bare model names (no provider@ prefix) is configurable. By default, Claudish tries LiteLLM (if configured), then OpenRouter. Override this with defaultProvider:

# Set default provider globally
claudish config set defaultProvider openrouter

# Or via env var
export CLAUDISH_DEFAULT_PROVIDER=openrouter

# Or per-invocation
claudish --default-provider litellm --model minimax-m2.5 "task"

Precedence: --default-provider flag > CLAUDISH_DEFAULT_PROVIDER env var > config file defaultProvider > legacy LiteLLM auto-promotion > OPENROUTER_API_KEY detection > hardcoded "openrouter".

Explicit provider@model syntax always bypasses defaultProvider and routes directly.

Custom endpoints (v7.0.0+)

Register your own OpenAI-compatible endpoints in ~/.claudish/config.json. See Settings Reference for the full schema.

{
  "customEndpoints": {
    "my-vllm": {
      "kind": "simple",
      "url": "http://gpu-box:8000/v1",
      "format": "openai",
      "apiKey": "${VLLM_API_KEY}"
    }
  },
  "defaultProvider": "my-vllm"
}

Then route to it with: claudish --model my-vllm@llama3 "task"

If the endpoint needs no credential (a local router, an inference server on a trusted network), say so with authScheme: "none" and omit apiKey โ€” claudish then sends no auth header at all:

{
  "customEndpoints": {
    "localrouter": {
      "kind": "simple",
      "url": "http://127.0.0.1:8402/v1",
      "format": "openai",
      "authScheme": "none"
    }
  }
}

Do not use a placeholder like "apiKey": "none" for this โ€” that is a literal key, and it goes out as Authorization: Bearer none, which some gateways reject.

Legacy Syntax (Deprecated)

The old prefix/model syntax still works but shows deprecation warnings:

# Old (deprecated)          โ†’  New (recommended)
claudish --model g/gemini-pro     โ†’  claudish --model g@gemini-pro
claudish --model oai/gpt-4o       โ†’  claudish --model oai@gpt-4o
claudish --model ollama/llama3.2  โ†’  claudish --model [email protected]

Curated Models

Top recommended models for development (v3.1.1):

ModelProviderBest For
openai/gpt-5.3OpenAIDefault - Most advanced reasoning
minimax/minimax-m2.1MiniMaxBudget-friendly, fast
z-ai/glm-4.7Z.AIBalanced performance
google/gemini-3-pro-previewGoogle1M context window
moonshotai/kimi-k2-thinkingMoonShotExtended reasoning
deepseek/deepseek-v3.2DeepSeekCode specialist
qwen/qwen3-vl-235b-a22b-thinkingAlibabaVision + reasoning

Vertex AI Partner Models (MaaS - Google Cloud billing):

ModelProviderBest For
vertex/minimax/minimax-m2-maasMiniMaxFast, budget-friendly
vertex/mistralai/codestral-2MistralCode specialist
vertex/deepseek/deepseek-v3-2-maasDeepSeekDeep reasoning
vertex/qwen/qwen3-coder-480b-a35b-instruct-maasQwenAgentic coding
vertex/openai/gpt-oss-120b-maasOpenAIOpen-weight reasoning

List all models:

claudish --models              # List all OpenRouter models
claudish --models gemini       # Search for specific models
claudish --models-top          # Show curated recommendations

Claude Code Flag Passthrough (NEW in v5.3.0)

Claudish forwards all unrecognized flags directly to Claude Code. This means any Claude Code flag works with claudish โ€” no wrapper needed:

# Use Claude Code agents
claudish --model grok --agent code-review "review auth system"

# Control effort and permissions
claudish --model grok --effort high --permission-mode plan "design API"

# Set budget caps
claudish --model grok --max-budget-usd 0.50 "quick fix"

# Custom system prompts
claudish --model grok --append-system-prompt "Always respond in JSON" "list files"

# Restrict available tools
claudish --model grok --allowedTools "Read,Grep" "search for auth bugs"

Claudish flags (--model, --stdin, --quiet, -y, etc.) can appear in any order โ€” they are always recognized regardless of position.

Use -- when a Claude Code flag value starts with -:

claudish --model grok -- --system-prompt "-verbose logging" "task"

Vision Proxy (NEW in v5.1.0)

Every model can now "see" images โ€” even models without native vision support.

When you send an image to a non-vision model (like local Ollama models), Claudish automatically:

  1. Detects that the model cannot process images
  2. Sends each image to the Anthropic API (Claude Sonnet) for a rich description
  3. Replaces the image block with [Image Description: ...] text
  4. Forwards the enriched message to the target model
Claude Code โ†’ image + "what's in this?" โ†’ Claudish
                                             โ†“
                              โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                              โ”‚ Model supports vision?       โ”‚
                              โ”‚  YES โ†’ pass image through    โ”‚
                              โ”‚  NO  โ†’ describe via Claude โ†’ โ”‚
                              โ”‚        replace with text     โ”‚
                              โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                             โ†“
                                      Target Model

How it works:

  • Uses your existing x-api-key from Claude Code (no extra configuration)
  • Each image is described in parallel (fast even with multiple images)
  • 30-second timeout per image with graceful fallback to stripping
  • Descriptions include text content, layout, colors, code, diagrams, and UI elements

Example:

# Local Ollama model (no vision) โ€” images are automatically described
claudish --model [email protected] "what's in this screenshot?"

# Vision-capable model โ€” images pass through unchanged
claudish --model [email protected] "what's in this screenshot?"

Fallback behavior: If the vision proxy fails (network error, timeout, API issue), Claudish falls back to stripping images โ€” the request still goes through, just without image context.

Status Line Display

Claudish automatically shows critical information in the Claude Code status bar - no setup required!

Ultra-Compact Format: directory โ€ข model-id โ€ข $cost โ€ข ctx%

Visual Design:

  • ๐Ÿ”ต Directory (bright cyan, bold) - Where you are
  • ๐ŸŸก Model ID (bright yellow) - Actual OpenRouter model ID
  • ๐ŸŸข Cost (bright green) - Real-time session cost from OpenRouter
  • ๐ŸŸฃ Context (bright magenta) - % of context window remaining
  • โšช Separators (dim) - Visual dividers

Examples:

  • claudish โ€ข x-ai/grok-code-fast-1 โ€ข $0.003 โ€ข 95% - Using Grok, $0.003 spent, 95% context left
  • my-project โ€ข openai/gpt-5-codex โ€ข $0.12 โ€ข 67% - Using GPT-5, $0.12 spent, 67% context left
  • backend โ€ข minimax/minimax-m2 โ€ข $0.05 โ€ข 82% - Using MiniMax M2, $0.05 spent, 82% left
  • test โ€ข openrouter/auto โ€ข $0.01 โ€ข 90% - Using any custom model, $0.01 spent, 90% left

Critical Tracking (Live Updates):

  • ๐Ÿ’ฐ Cost tracking - Real-time USD from Claude Code session data
  • ๐Ÿ“Š Context monitoring - Percentage of model's context window remaining
  • โšก Performance optimized - Ultra-compact to fit with thinking mode UI

Thinking Mode Optimized:

  • โœ… Ultra-compact - Directory limited to 15 chars (leaves room for everything)
  • โœ… Critical first - Most important info (directory, model) comes first
  • โœ… Smart truncation - Long directories shortened with "..."
  • โœ… Space reservation - Reserves ~40 chars for Claude's thinking mode UI
  • โœ… Color-coded - Instant visual scanning
  • โœ… No overflow - Fits perfectly even with thinking mode enabled

Custom Model Support:

  • โœ… ANY OpenRouter model - Not limited to shortlist (e.g., openrouter/auto, custom models)
  • โœ… Actual model IDs - Shows exact OpenRouter model ID (no translation)
  • โœ… Context fallback - Unknown models use 100k context window (safe default)
  • โœ… Shortlist optimized - Our recommended models have accurate context sizes
  • โœ… Future-proof - Works with new models added to OpenRouter

How it works:

  • Each Claudish instance creates a temporary settings file with custom status line
  • Settings use --settings flag (doesn't modify global Claude Code config)
  • Status line uses simple bash script with ANSI colors (no external dependencies!)
  • Displays actual OpenRouter model ID from CLAUDISH_ACTIVE_MODEL_NAME env var
  • Context tracking uses model-specific sizes for our shortlist, 100k fallback for others
  • Temp files are automatically cleaned up when Claudish exits
  • Each instance is completely isolated - run multiple in parallel!

Per-instance isolation:

  • โœ… Doesn't modify ~/.claude/settings.json
  • โœ… Each instance has its own config
  • โœ… Safe to run multiple Claudish instances in parallel
  • โœ… Standard Claude Code unaffected
  • โœ… Temp files auto-cleanup on exit
  • โœ… No external dependencies (bash only, no jq!)

Examples

Basic Usage

# Simple prompt
claudish "fix the bug in user.ts"

# Multi-word prompt
claudish "implement user authentication with JWT tokens"

With Specific Model

# Auto-detected native routing (model name determines provider)
claudish --model gpt-4o "refactor entire API layer"           # โ†’ OpenAI
claudish --model gemini-2.0-flash "quick fix"                 # โ†’ Google
claudish --model llama-3.1-70b "code review"                  # โ†’ OllamaCloud

# Explicit provider routing (new @ syntax)
claudish --model [email protected] "complex analysis"
claudish --model oai@o1 "deep reasoning task"
claudish --model openrouter@deepseek/deepseek-r1 "analysis"   # Unknown vendors need explicit OR

# Local models with concurrency control
claudish --model [email protected] "code review"
claudish --model [email protected]:3 "parallel processing"      # 3 concurrent
claudish --model [email protected] "implement dashboard UI"

Autonomous Mode

Auto-approve is enabled by default. For fully autonomous mode, add --dangerous:

# Basic usage (auto-approve already enabled)
claudish "delete unused files"

# Fully autonomous (auto-approve + dangerous sandbox disabled)
claudish --dangerous "install dependencies"

# Disable auto-approve if you want prompts
claudish --no-auto-approve "make important changes"

Custom Port

# Use specific port
claudish --port 3000 "analyze codebase"

# Or set default
export CLAUDISH_PORT=3000
claudish "your task"

Passing Claude Flags

# Verbose mode
claudish "debug issue" --verbose

# Custom working directory
claudish "analyze code" --cwd /path/to/project

# Multiple flags
claudish --model openai/gpt-5.3-codex "task" --verbose --debug-claudish

Monitor Mode

NEW! Claudish now includes a monitor mode to help you understand how Claude Code works internally.

# Enable monitor mode (requires real Anthropic API key)
claudish --monitor --debug-claudish "implement a feature"

What Monitor Mode Does:

  • โœ… Proxies to REAL Anthropic API (not OpenRouter) - Uses your actual Anthropic API key
  • โœ… Logs ALL traffic - Captures complete requests and responses
  • โœ… Both streaming and JSON - Logs SSE streams and JSON responses
  • โœ… Debug logs to file - Saves to logs/claudish_*.log when --debug-claudish is used
  • โœ… Pass-through proxy - No translation, forwards as-is to Anthropic

When to use Monitor Mode:

  • ๐Ÿ” Understanding Claude Code's API protocol
  • ๐Ÿ› Debugging integration issues
  • ๐Ÿ“Š Analyzing Claude Code's behavior
  • ๐Ÿ”ฌ Research and development

Requirements:

# Monitor mode requires a REAL Anthropic API key (not placeholder)
export ANTHROPIC_API_KEY='sk-ant-api03-...'

# Use with --debug-claudish to save logs to file
claudish --monitor --debug-claudish "your task"

# Logs are saved to: logs/claudish_TIMESTAMP.log

Example Output:

[Monitor] Server started on http://127.0.0.1:8765
[Monitor] Mode: Passthrough to real Anthropic API
[Monitor] All traffic will be logged for analysis

=== [MONITOR] Claude Code โ†’ Anthropic API Request ===
{
  "model": "claude-sonnet-4.5",
  "messages": [...],
  "max_tokens": 4096,
  ...
}
=== End Request ===

=== [MONITOR] Anthropic API โ†’ Claude Code Response (Streaming) ===
event: message_start
data: {"type":"message_start",...}

event: content_block_start
data: {"type":"content_block_start",...}
...
=== End Streaming Response ===

Note: Monitor mode charges your Anthropic account (not OpenRouter). Use --debug-claudish flag to save logs for analysis.

Output Modes

Claudish supports three output modes for different use cases:

1. Quiet Mode (Default in Single-Shot)

Clean output with no [claudish] logs - perfect for piping to other tools:

# Quiet by default in single-shot
claudish "what is 2+2?"
# Output: 2 + 2 equals 4.

# Use in pipelines
claudish "list 3 colors" | grep -i blue

# Redirect to file
claudish "analyze code" > analysis.txt

2. Verbose Mode

Show all [claudish] log messages for debugging:

# Verbose mode
claudish --verbose "what is 2+2?"
# Output:
# [claudish] Starting Claude Code with openai/gpt-4o
# [claudish] Proxy URL: http://127.0.0.1:8797
# [claudish] Status line: dir โ€ข openai/gpt-4o โ€ข $cost โ€ข ctx%
# ...
# 2 + 2 equals 4.
# [claudish] Shutting down proxy server...
# [claudish] Done

# Interactive mode is verbose by default
claudish --interactive

3. JSON Output Mode

Structured output perfect for automation and tool integration:

# JSON output (always quiet)
claudish --json "what is 2+2?"
# Output: {"type":"result","result":"2 + 2 equals 4.","total_cost_usd":0.068,"usage":{...}}

# Extract just the result with jq
claudish --json "list 3 colors" | jq -r '.result'

# Get cost and token usage
claudish --json "analyze code" | jq '{result, cost: .total_cost_usd, tokens: .usage.input_tokens}'

# Use in scripts
RESULT=$(claudish --json "check if tests pass" | jq -r '.result')
echo "AI says: $RESULT"

# Track costs across multiple runs
for task in task1 task2 task3; do
  claudish --json "$task" | jq -r '"\(.total_cost_usd)"'
done | awk '{sum+=$1} END {print "Total: $"sum}'

JSON Output Fields:

  • result - The AI's response text
  • total_cost_usd - Total cost in USD
  • usage.input_tokens - Input tokens used
  • usage.output_tokens - Output tokens used
  • duration_ms - Total duration in milliseconds
  • num_turns - Number of conversation turns
  • modelUsage - Per-model usage breakdown

How It Works

Architecture

claudish "your prompt"
    โ†“
1. Parse arguments (--model, --no-auto-approve, --dangerous, etc.)
2. Find available port (random or specified)
3. Start local proxy on http://127.0.0.1:PORT
4. Spawn: claude --auto-approve --env ANTHROPIC_BASE_URL=http://127.0.0.1:PORT
5. Proxy translates: Anthropic API โ†’ OpenRouter API
6. Stream output in real-time
7. Cleanup proxy on exit

Request Flow

Normal Mode (OpenRouter):

Claude Code โ†’ Anthropic API format โ†’ Local Proxy โ†’ OpenRouter API format โ†’ OpenRouter
                                         โ†“
Claude Code โ† Anthropic API format โ† Local Proxy โ† OpenRouter API format โ† OpenRouter

Monitor Mode (Anthropic Passthrough):

Claude Code โ†’ Anthropic API format โ†’ Local Proxy (logs) โ†’ Anthropic API
                                         โ†“
Claude Code โ† Anthropic API format โ† Local Proxy (logs) โ† Anthropic API

Parallel Runs

Each claudish invocation:

  • Gets a unique random port
  • Starts isolated proxy server
  • Runs independent Claude Code instance
  • Cleans up on exit

This allows multiple parallel runs:

# Terminal 1
claudish --model x-ai/grok-code-fast-1 "task A"

# Terminal 2
claudish --model openai/gpt-5.3-codex "task B"

# Terminal 3
claudish --model minimax/minimax-m2 "task C"

Extended Thinking Support

NEW in v1.1.0: Claudish now fully supports models with extended thinking/reasoning capabilities (Grok, o1, etc.) with complete Anthropic Messages API protocol compliance.

Thinking Translation Model (v1.5.0)

Claudish includes a sophisticated Thinking Translation Model that aligns Claude Code's native thinking budget with the unique requirements of every major AI provider.

When you set a thinking budget in Claude (e.g., budget: 16000), Claudish automatically translates it:

ProviderModelTranslation Logic
OpenAIo1, o3Maps budget to reasoning_effort (minimal/low/medium/high)
GoogleGemini 3Maps to thinking_level (low/high)
GoogleGemini 2.xPasses exact thinking_budget (capped at 24k)
xAIGrok 3 MiniMaps to reasoning_effort (low/high)
QwenQwen 2.5Enables enable_thinking + exact budget
MiniMaxM2Enables reasoning_split (interleaved thinking)
DeepSeekR1Automatically manages reasoning (params stripped for safety)

This ensures you can use standard Claude Code thinking controls with ANY supported model, without worrying about API specificities.

What is Extended Thinking?

Some AI models (like Grok and OpenAI's o1) can show their internal reasoning process before providing the final answer. This "thinking" content helps you understand how the model arrived at its conclusion.

How Claudish Handles Thinking

Claudish implements the Anthropic Messages API's interleaved-thinking protocol:

Thinking Blocks (Hidden):

  • Contains model's reasoning process
  • Automatically collapsed in Claude Code UI
  • Shows "Claude is thinking..." indicator
  • User can expand to view reasoning

Text Blocks (Visible):

  • Contains final response
  • Displayed normally
  • Streams incrementally

Supported Models with Thinking

  • โœ… x-ai/grok-code-fast-1 - Grok's reasoning mode
  • โœ… openai/gpt-5-codex - o1 reasoning (when enabled)
  • โœ… openai/o1-preview - Full reasoning support
  • โœ… openai/o1-mini - Compact reasoning
  • โš ๏ธ Other models may support reasoning in future

Technical Details

Streaming Protocol (V2 - Protocol Compliant):

1. message_start
2. content_block_start (text, index=0)      โ† IMMEDIATE! (required)
3. ping
4. [If reasoning arrives]
   - content_block_stop (index=0)           โ† Close initial empty block
   - content_block_start (thinking, index=1) โ† Reasoning
   - thinking_delta events ร— N
   - content_block_stop (index=1)
5. content_block_start (text, index=2)      โ† Response
6. text_delta events ร— M
7. content_block_stop (index=2)
8. message_delta + message_stop

Critical: content_block_start must be sent immediately after message_start, before ping. This is required by the Anthropic Messages API protocol for proper UI initialization.

Key Features:

  • โœ… Separate thinking and text blocks (proper indices)
  • โœ… thinking_delta vs text_delta event types
  • โœ… Thinking content hidden by default
  • โœ… Smooth transitions between blocks
  • โœ… Full Claude Code UI compatibility

UX Benefits

Before (v1.0.0 - No Thinking Support):

  • Reasoning visible as regular text
  • Confusing output with internal thoughts
  • No progress indicators
  • "All at once" message updates

After (v1.1.0 - Full Protocol Support):

  • โœ… Reasoning hidden/collapsed
  • โœ… Clean, professional output
  • โœ… "Claude is thinking..." indicator shown
  • โœ… Smooth incremental streaming
  • โœ… Message headers/structure visible
  • โœ… Protocol compliant with Anthropic Messages API

Documentation

For complete protocol documentation, see:

Dynamic Reasoning Support (NEW in v1.4.0)

Claudish now intelligently adapts to ANY reasoning model!

No more hardcoded lists or manual flags. Claudish dynamically queries OpenRouter metadata to enable thinking capabilities for any model that supports them.

๐Ÿง  Dynamic Thinking Features

  1. Auto-Detection:

    • Automatically checks model capabilities at startup
    • Enables Extended Thinking UI only when supported
    • Future-proof: Works instantly with new models (e.g., deepseek-r1 or minimax-m2)
  2. Smart Parameter Mapping:

    • Claude: Passes token budget directly (e.g., 16k tokens)
    • OpenAI (o1/o3): Translates budget to reasoning_effort
      • "ultrathink" (โ‰ฅ32k) โ†’ high
      • "think hard" (16k-32k) โ†’ medium
      • "think" (<16k) โ†’ low
    • Gemini & Grok: Preserves thought signatures and XML traces automatically
  3. Universal Compatibility:

    • Use "ultrathink" or "think hard" prompts with ANY supported model
    • Claudish handles the translation layer for you

Context Scaling & Auto-Compaction

NEW in v1.2.0: Claudish now intelligently manages token counting to support ANY context window size (from 128k to 2M+) while preserving Claude Code's native auto-compaction behavior.

The Challenge

Claude Code naturally assumes a fixed context window (typically 200k tokens for Sonnet).

  • Small Models (e.g., Grok 128k): Claude might overuse context and crash.
  • Massive Models (e.g., Gemini 2M): Claude would compact way too early (at 10% usage), wasting the model's potential.

The Solution: Token Scaling

Claudish implements a "Dual-Accounting" system:

  1. Internal Scaling (For Claude):

    • We fetch the real context limit from OpenRouter (e.g., 1M tokens).
    • We scale reported token usage so Claude thinks 1M tokens is 200k.
    • Result: Auto-compaction triggers at the correct percentage of usage (e.g., 90% full), regardless of the actual limit.
  2. Accurate Reporting (For You):

    • The status line displays the Real Unscaled Usage and Real Context %.
    • You see specific costs and limits, while Claude remains blissfully unaware and stable.

Benefits:

  • โœ… Works with ANY model size (128k, 1M, 2M, etc.)
  • โœ… Unlocks massive context windows (Claude Code becomes 10x more powerful with Gemini!)
  • โœ… Prevents crashes on smaller models (Grok)
  • โœ… Native behavior (compaction just works)

Development

Project Structure

mcp/claudish/
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ index.ts              # Main entry point
โ”‚   โ”œโ”€โ”€ cli.ts                # CLI argument parser
โ”‚   โ”œโ”€โ”€ proxy-server.ts       # Hono-based proxy server
โ”‚   โ”œโ”€โ”€ transform.ts          # API format translation (from claude-code-proxy)
โ”‚   โ”œโ”€โ”€ claude-runner.ts      # Claude CLI runner (creates temp settings)
โ”‚   โ”œโ”€โ”€ port-manager.ts       # Port utilities
โ”‚   โ”œโ”€โ”€ config.ts             # Constants and defaults
โ”‚   โ”œโ”€โ”€ types.ts              # TypeScript types
โ”‚   โ””โ”€โ”€ services/
โ”‚       โ””โ”€โ”€ vision-proxy.ts   # Image description for non-vision models
โ”œโ”€โ”€ tests/                    # Test files
โ”œโ”€โ”€ package.json
โ”œโ”€โ”€ tsconfig.json
โ””โ”€โ”€ biome.json

Proxy Implementation

Claudish uses a Hono-based proxy server inspired by claude-code-proxy:

  • Framework: Hono - Fast, lightweight web framework
  • API Translation: Converts Anthropic API format โ†” OpenAI format
  • Streaming: Full support for Server-Sent Events (SSE)
  • Tool Calling: Handles Claude's tool_use โ†” OpenAI's tool_calls
  • Battle-tested: Based on production-ready claude-code-proxy implementation

Why Hono?

  • Native Bun support (no adapters needed)
  • Extremely fast and lightweight
  • Middleware support (CORS, logging, etc.)
  • Works across Node.js, Bun, and Cloudflare Workers

Build & Test

# Install dependencies
bun install

# Development mode
bun run dev "test prompt"

# Build
bun run build

# Lint
bun run lint

# Format
bun run format

# Type check
bun run typecheck

# Run tests
bun test

Protocol Compliance Testing

Claudish includes a comprehensive snapshot testing system to ensure 1:1 compatibility with the official Claude Code protocol:

# Run snapshot tests (13/13 passing โœ…)
bun test tests/snapshot.test.ts

# Full workflow: capture fixtures + run tests
./tests/snapshot-workflow.sh --full

# Capture new test fixtures from monitor mode
./tests/snapshot-workflow.sh --capture

# Debug SSE events
bun tests/debug-snapshot.ts

What Gets Tested:

  • โœ… Event sequence (message_start โ†’ content_block_start โ†’ deltas โ†’ stop โ†’ message_delta โ†’ message_stop)
  • โœ… Content block indices (sequential: 0, 1, 2, ...)
  • โœ… Tool input streaming (fine-grained JSON chunks)
  • โœ… Usage metrics (present in message_start and message_delta)
  • โœ… Stop reasons (always present and valid)
  • โœ… Cache metrics (creation and read tokens)

Documentation:

Install Globally

# Link for global use
bun run install:global

# Now use anywhere
claudish "your task"

Troubleshooting

"Claude Code CLI is not installed"

Install Claude Code:

npm install -g claude-code
# or visit: https://claude.com/claude-code

"OPENROUTER_API_KEY environment variable is required"

Set your API key:

export OPENROUTER_API_KEY=sk-or-v1-...

Or add to your shell profile (~/.zshrc, ~/.bashrc):

echo 'export OPENROUTER_API_KEY=sk-or-v1-...' >> ~/.zshrc
source ~/.zshrc

"No available ports found"

Specify a custom port:

claudish --port 3000 "your task"

Or increase port range in src/config.ts.

Proxy errors

Check OpenRouter API status:

Verify your API key works:

Status line not showing model

If the status line doesn't show the model name:

  1. Check if --settings flag is being passed:

    # Look for this in Claudish output:
    # [claudish] Instance settings: /tmp/claudish-settings-{timestamp}.json
    
  2. Verify environment variable is set:

    # Should be set automatically by Claudish
    echo $CLAUDISH_ACTIVE_MODEL_NAME
    # Should output something like: xAI/Grok-1
    
  3. Test status line command manually:

    export CLAUDISH_ACTIVE_MODEL_NAME="xAI/Grok-1"
    cat > /dev/null && echo "[$CLAUDISH_ACTIVE_MODEL_NAME] ๐Ÿ“ $(basename "$(pwd)")"
    # Should output: [xAI/Grok-1] ๐Ÿ“ your-directory-name
    
  4. Check temp settings file:

    # File is created in /tmp/claudish-settings-*.json
    ls -la /tmp/claudish-settings-*.json 2>/dev/null | tail -1
    cat /tmp/claudish-settings-*.json | head -1
    
  5. Verify bash is available:

    which bash
    # Should show path to bash (usually /bin/bash or /usr/bin/bash)
    

Note: Temp settings files are automatically cleaned up when Claudish exits. If you see multiple files, you may have crashed instances - they're safe to delete manually.

Comparison with Claude Code

FeatureClaude CodeClaudish
ModelAnthropic models onlyAny OpenRouter model
APIAnthropic APIOpenRouter API
CostAnthropic pricingOpenRouter pricing
SetupAPI key โ†’ directAPI key โ†’ proxy โ†’ OpenRouter
SpeedDirect connection~Same (local proxy)
FeaturesAll Claude Code featuresAll Claude Code features
VisionNative (Anthropic models)Any model (auto-described via Claude)

When to use Claudish:

  • โœ… Want to try different models (Grok, GPT-5, etc.)
  • โœ… Need OpenRouter-specific features
  • โœ… Prefer OpenRouter pricing
  • โœ… Testing model performance

When to use Claude Code:

  • โœ… Want latest Anthropic models only
  • โœ… Need official Anthropic support
  • โœ… Simpler setup (no proxy)

Contributing

Contributions welcome! Please:

  1. Fork the repo
  2. Create feature branch: git checkout -b feature/amazing
  3. Commit changes: git commit -m 'Add amazing feature'
  4. Push to branch: git push origin feature/amazing
  5. Open Pull Request

License

MIT ยฉ MadAppGang

Acknowledgments

Claudish's proxy implementation is based on claude-code-proxy by @kiyo-e. We've adapted their excellent Hono-based API translation layer for OpenRouter integration.

Key contributions from claude-code-proxy:

  • Anthropic โ†” OpenAI API format translation (transform.ts)
  • Streaming response handling with Server-Sent Events
  • Tool calling compatibility layer
  • Clean Hono framework architecture

Thank you to the claude-code-proxy team for building a robust, production-ready foundation! ๐Ÿ™


Made with โค๏ธ by MadAppGang

ai
claude
claudecode

Project health

Latest release

10.4.1 ยท Oct 7, 2026

Releases this year

297

Significant stargazers

Graham Campbell

7,097 followers ยท starred Jan 2026

Kohaku-Blueleaf

1,008 followers ยท starred Dec 2025

Rudrank Riyam

1,072 followers ยท starred Feb 2026

Ashish Patel

12,478 followers ยท starred Jan 2026