Alternative · Claude Code

Claude Code, without the amnesia.

Same agentic terminal workflow. Plus local-first execution and a memory that compounds, so session 50 costs less context than session 1.

The short answer

Anvaya is the local-first Claude Code alternative with persistent memory. Where Claude Code runs Anthropic models and leans on a hand-maintained CLAUDE.md between sessions, Anvaya can run on local models with no account or key (Anthropic, OpenAI, and custom gateways optional), works fully offline, and stores each session’s decisions, patterns, and bugfixes in a local knowledge graph, typed nodes with half-lives, git drift detection, and outcome-calibrated utility.

Read the full answer

Per-node compression is a 12–25x design estimate; the measured end-to-end lever is −11.0% median uncached tokens (micro-fold, n=5, verification 19/19). Prefer Claude’s reasoning? Point Anvaya at Anthropic, or serve Anvaya’s memory to Claude Code itself over MCP. Memory is model-agnostic; providers are interchangeable.

The amnesia, fixed

Monday's fix, already there on Thursday.

Anvaya serves the experience that helped in earlier sessions, inside a fixed token budget.

anv · session replayillustrative
  1. add a --json flag to `ledger export`
  2. grep "export" src/: ok, 14 matches
  3. read_file src/main.rs: ok, 212 lines
  4. read_file src/cli/mod.rs: ok, 148 lines
  5. read_file src/export/csv.rs: ok, 96 lines
  6. Formats implement Render. Adding a Json renderer beside csv.
  7. rewrite_file src/export/json.rs: ok, +38
  8. edit_file src/cli/mod.rs: ok, +6
  9. run_command cargo test -p ledger: failed, E0432 unresolved import serde_json
  10. serde_json is optional in Cargo.toml, behind the json feature.
  11. run_command cargo test -p ledger --features json: ok, 42 passed
  12. done · 8 tool calls · 1 failed run
Illustrative transcript; each recalled weight uses its kind's shipped decay rate at the age shown.

Head to head

Where each one wins.

Honest table. Claude Code's reasoning depth is real; so is its per-session tax.

DimensionClaude CodeCursorAnvaya
ModelsAnthropic onlyMulti (curated)Ollama-first + Anthropic, OpenAI, custom
MemoryCLAUDE.md, hand-keptRules + index, retrievesGraph: typed, decaying, calibrated
Session 50 costSame ~50K as day 1Same as day 1~2–4K packed (design est.)
OfflineNoNoYes, fully
PrivacyCloud processingCloud processingLocal by default
Starting price$20/mo$20/mo$0 local loop (pre-1.0)

Switching

Three steps over.

Keep your CLAUDE.md. Add memory under it.

Keep your instruction filesCLAUDE.md and AGENTS.md stay, short rules load every turn. Anvaya reads the same repo; nothing to migrate.
Attach memoryanv init scaffolds .anvaya/mind/ in under 50ms. Sessions start recording decisions, fixes, and patterns immediately.
Optionally bridgeServe the graph to Claude Code over MCP (Anvaya's memory server, 14 tools) and get memory inside the harness you already use.

Questions

Asked before switching.

What is the best local alternative to Claude Code?

If your priority is privacy plus compounding memory, Anvaya: Ollama-first with no key needed locally, BYOK for any OpenAI-compatible or Anthropic provider, and a memory graph so sessions improve instead of restarting. If you want Claude models with a different harness, OpenCode (75+ providers) and Aider (git-native) are strong picks, neither ships a calibrated memory engine.

Can I use my Claude subscription with Anvaya?

Anvaya reaches Anthropic as one of three transports: Ollama (local), generic OpenAI-compatible endpoints (OpenAI, Siemens preset, custom gateways), and Anthropic Messages. Configure an API key and the same memory graph serves Claude-powered turns, memory is model-agnostic, so switching providers never invalidates it.

Does Anvaya work with my existing CLAUDE.md?

Yes. Keep short, non-inferable rules in CLAUDE.md, it loads every turn and survives compaction. Anvaya handles everything CLAUDE.md can't: accumulated decisions, bug history, and patterns, weighted by whether they actually helped, decayed by type, and drift-checked against git.

Is Anvaya cheaper than Claude Code?

Claude Code starts at $20/mo with usage windows; heavy use pushes toward $100–200/mo tiers. Anvaya's local loop costs $0 marginal per turn on your hardware. When you escalate to a cloud model, measured savings today are −11.0% median uncached tokens (micro-fold, n=5); the 12–25x per-node ratio is a design estimate, not a measured session average. Pre-1.0 pricing isn't set; the core stays local-first.

What does Claude Code still do better?

Honestly: frontier reasoning depth. Opus-class models lead public coding benchmarks, and Claude Code's git integration and hooks are mature. Anvaya's bet is different (memory that compounds plus local-first execution) and you can combine both via MCP: Claude Code turns served from Anvaya's memory.

Run agents that fit on your laptop.

23.4 MB median own-process memory, measured across 1030 runs (994 verified) and fourteen harnesses. One command installs the harness and the Mind together. Nothing leaves your machine on the Ollama path.

Developer beta. macOS on Apple Silicon and Linux on x86_64 or arm64. Memory figure: --no-mind, macOS/ARM, n=3 per cell. Pre-1.0, pricing not set.