Claude Code (subscription)
Claude Code (subscription)
Run Lettuce’s LLM-powered features through the Claude Code app on your Mac, billed to the Claude Pro/Max subscription you’re signed into there — no API key. Lettuce never sees a credential: it talks to your local claude command, which holds its own login.
Good fit if you already pay for a Claude subscription and want note enhancement, drafts, mention filtering, and lint suggestions without separate API billing. As with the API provider, semantic search / embeddings are separate — they need an OpenAI-compatible embeddings endpoint (a local Ollama works; see AI providers/04 OpenAI-compatible and local models).
Setup
Install Claude Code — from https://claude.com/claude-code (installer script, Homebrew, or npm).
Sign in once — run
claudein a terminal and choose Log in with Claude account, authenticating with the claude.ai account that has your Pro or Max plan.Pick the provider — Settings → AI enhancement → Provider → Claude Code (subscription). The Status row turns green (“Using /Users/you/.local/bin/claude”) when Lettuce can see the binary. There is no key field — there’s no key.
Or via environment variables for the CLI:
export LETTUCE_LLM_PROVIDER=claudeCode
export LETTUCE_CLAUDE_BIN=$HOME/.local/bin/claude # optional — only if auto-detection misses it
Choosing a model
Models are tier aliases, not API model IDs — Claude Code resolves each to the current model of that tier on your plan:
| Alias | Good for |
|---|---|
sonnet |
Balanced default |
opus |
Highest-quality reasoning |
haiku |
Simple / fast tasks |
Set it in Settings or with LETTUCE_ENHANCE_MODEL=opus.
How a call works (and privacy)
Each AI action is a single headless invocation of your claude binary. Lettuce disables Claude Code’s agent tools and MCP servers for the call, so it’s a plain completion: no file access, no permission prompts, nothing runs but the model. Only the note content you’re enhancing travels — the same content the API provider would send.
Limits and troubleshooting
Your plan’s rate limits apply (Pro: roughly 10–45 prompts per 5-hour window; Max tiers much higher, with weekly caps). Hitting the cap surfaces Claude Code’s rate-limit message in the action’s error; it recovers when the window resets. Bulk enhancement of a large vault fits a Max plan better than Pro.
“Claude Code not found” — Lettuce checks the usual install locations and your login shell’s PATH (re-checking every 30 seconds, so a fresh install is picked up without relaunching). If it still can’t find the binary, point
LETTUCE_CLAUDE_BINat it.Headless / LaunchAgent use (
lettuce serve, the directive worker): LaunchAgents don’t get a login-shell PATH — setLETTUCE_CLAUDE_BINin their environment.Errors mention “not logged in” — run
claudein a terminal and sign in again; the credential lives in Claude Code, not Lettuce.Latency is a touch higher than the direct API (each call starts the CLI), but calls are single-turn and typically finish in seconds.
Related
AI providers/01 Anthropic Claude — the same models, API-key billed
AI providers/04 OpenAI-compatible and local models — fully local option
Agent reference/01 Overview — connecting Claude Code as an agent on your vault is separate from using it as a provider
Recipes/13 Save Claude’s work into your vault — standing instructions so Claude files notes and HTML artifacts into Lettuce