memcode

command module
v0.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 10, 2026 License: MIT Imports: 1 Imported by: 0

README

memcode

The coding agent that remembers your repo.

memcode.ai Latest release

Most coding agents start every session from zero. memcode keeps a persistent model of your repo in .memcode: the subsystems, what you worked on last week, which approaches failed and why, and the preferences you have corrected it on. The longer you use it, the less you have to explain.

One Go binary, a full terminal UI, and it runs against whatever models you already have: the hosted memcode gateway, your own API keys, or a local endpoint like Ollama.

Remembers your repoVersion-control-friendly state in .memcode that survives sessions and machines. Searchable session history. Repeated failures distill into lessons that resurface when they matter. Honors MEMCODE.md, AGENTS.md, and CLAUDE.md instructions, and compresses oversized ones once instead of re-reading them forever.
Model policy in the clientAutomatic mode routes each call by what the turn needs: cheap models for routine work, strong models for planning, review, high-risk changes, and recovery after its own mistakes. Pin any model with /model. Failures walk catalog-defined fallback chains. See ROUTING.md.
Bring your own modelsWorks with no account: point it at any OpenAI-compatible endpoint. Provider-native APIs get full fidelity, the Responses API on api.openai.com, Messages on api.anthropic.com, Gemini and xAI likewise. Standard key env vars are picked up automatically.
Reads the roomTracks the working mood of the session. When you are correcting it, it stops cutting corners, spends more on the model, and asks before acting. When things are calm it stays out of the way.
A real terminal UIMultiline editing, slash commands with autocomplete, streaming tool output, interrupt and redirect mid-turn, themes, and a live context meter.
Plans before it builds/plan researches with parallel scouts, drafts, gets a cross-model review, and turns the approved plan into a binding contract for execution.
Delegates and parallelizesSpawn read-only explorers or full sub-agents, run detached background jobs, and manage them with /jobs, /tail, /kill.
Table stakes, done properlyMCP client, Agent Skills, hooks (HOOKS.md), resident LSP for diagnostics and navigation, a sandboxed shell with a real command classifier, vision and PDF input, prompt caching, and context compaction that respects the model's actual window (COMPACTION.md).
Self-updatingStages updates in the background and applies them on the next launch. MEMCODE_AUTO_UPDATE=off keeps it manual.

Quick install

curl -fsSL https://memcode.ai/install.sh | sh

Or with Go:

go install github.com/memcode-ai/memcode@latest

Or build from source:

git clone https://github.com/memcode-ai/memcode
cd memcode && go build -o memcode .

Then run memcode in a repo.

Use any model

MEMCODE_ENDPOINT_URL=http://localhost:11434/v1 memcode      # Ollama, local
MEMCODE_ENDPOINT_URL=https://api.openai.com/v1 memcode      # your OpenAI key (OPENAI_API_KEY)
MEMCODE_ENDPOINT_URL=https://api.anthropic.com memcode      # your Anthropic key (ANTHROPIC_API_KEY)

OPENAI_API_KEY, ANTHROPIC_API_KEY, GEMINI_API_KEY, XAI_API_KEY, FIREWORKS_API_KEY, and friends are picked up automatically for their hosts. Named endpoints live in config, and /model switches models mid-session.

With a memcode account you get one balance across every vendor, a key vault for BYOK, and hosted web search:

memcode login

Self-hosting

The whole product is in this repo, gateway included, and the gateway is a single stateless binary:

cd deploy/docker && cp ../../.example.env .env   # set a token + a provider key
docker compose up --build

See docs/self-hosting.md. The hosted service at memcode.ai runs this same code with a private control plane on top (accounts, one balance across vendors, the BYOK vault, team features).

Architecture

The CLI is the agent: all model selection, escalation, and recovery run client-side; every backend is a plain serving surface speaking one OpenAI-compatible wire (protocol/PROTOCOL.md). The gateway under gateway/ is that serving surface, metered and typed, sharing one provider implementation with the CLI. Cloud-only behavior sits behind one control-plane seam; self-host mode constructs none of it.

License

MIT. See LICENSE.

Documentation

Overview

Command memcode is an agentic coding CLI that builds and maintains a persistent model of your codebase for better context and memory.

Directories

Path Synopsis
Package gateway is the embeddable serving core: the OpenAI-compat /v1 surface (chat completions, the models control plane, advisor and web tools) over the shared provider adapters, with a handful of small, generic extension points.
Package gateway is the embeddable serving core: the OpenAI-compat /v1 surface (chat completions, the models control plane, advisor and web tools) over the shared provider adapters, with a handful of small, generic extension points.
cmd/memcode-gateway command
memcode-api is the hosted inference gateway: the DELIBERATELY SEPARATE service that owns what must never ship in the public CLI binary — backend routing, provider API keys, and metering.
memcode-api is the hosted inference gateway: the DELIBERATELY SEPARATE service that owns what must never ship in the public CLI binary — backend routing, provider API keys, and metering.
internal/advisor
Package advisor is memcode's "second opinion" side-channel: it asks a frontier model from a DIFFERENT vendor (Claude Opus, adaptive thinking on) to advise the best path forward on a situation or a plan.
Package advisor is memcode's "second opinion" side-channel: it asks a frontier model from a DIFFERENT vendor (Claude Opus, adaptive thinking on) to advise the best path forward on a situation or a plan.
internal/compat/conformance
Package conformance is the Phase A0 compat-subset contract, executable: a test suite that exercises ANY OpenAI-compatible base URL and reports where it sits against the two-tier contract (plans/flickering-soaring-falcon).
Package conformance is the Phase A0 compat-subset contract, executable: a test suite that exercises ANY OpenAI-compatible base URL and reports where it sits against the two-tier contract (plans/flickering-soaring-falcon).
internal/identity
Package identity carries the authenticated caller identity on the request context.
Package identity carries the authenticated caller identity on the request context.
internal/llm
Package llm is the metered model-execution gateway: the ONE path every model call goes through.
Package llm is the metered model-execution gateway: the ONE path every model call goes through.
internal/provider
Package provider defines the model boundaries the gateway talks to, plus the model-selection doctrine (ResolveModel, ResolveAlias, EffectiveModel).
Package provider defines the model boundaries the gateway talks to, plus the model-selection doctrine (ResolveModel, ResolveAlias, EffectiveModel).
internal/server
Package server is the HTTP face of the memcode gateway: bearer-token auth in front of the metered LLM engine (router → Fireworks + the frontier vendor APIs).
Package server is the HTTP face of the memcode gateway: bearer-token auth in front of the metered LLM engine (router → Fireworks + the frontier vendor APIs).
serve
Package serve composes the gateway core into an http.Handler.
Package serve composes the gateway core into an http.Handler.
internal
agent
Package agent holds the agent runtime and its supporting subsystems.
Package agent holds the agent runtime and its supporting subsystems.
agent/acceptance
Package acceptance closes memcode's interaction loop by reading the room AFTER the work: did the agent's changes survive contact with the human? Git is the objective evidence most agents never look at — a commit is the strongest "yes", a revert the strongest "no", a manual edit a "close, but".
Package acceptance closes memcode's interaction loop by reading the room AFTER the work: did the agent's changes survive contact with the human? Git is the objective evidence most agents never look at — a commit is the strongest "yes", a revert the strongest "no", a manual edit a "close, but".
agent/compaction
Package compaction is the PURE, testable core of in-session context compaction: deciding WHERE to cut a running conversation and rendering the cut-off part into a plain transcript for an Anthropic summarizer.
Package compaction is the PURE, testable core of in-session context compaction: deciding WHERE to cut a running conversation and rendering the cut-off part into a plain transcript for an Anthropic summarizer.
agent/edit
Package edit implements the safe edit transaction used by the agent: read → verify the anchor is unique → patch → re-read → show the diff.
Package edit implements the safe edit transaction used by the agent: read → verify the anchor is unique → patch → re-read → show the diff.
agent/focus
Package focus is memcode's COGNITIVE / attention axis — what the human is attending to — the complement of package room (the emotional / interaction axis).
Package focus is memcode's COGNITIVE / attention axis — what the human is attending to — the complement of package room (the emotional / interaction axis).
agent/input
Package input routes a raw interactive line — coalesce / steer / queue / interrupt — so the agent collaborates the way people actually type instead of treating every Enter as a new task.
Package input routes a raw interactive line — coalesce / steer / queue / interrupt — so the agent collaborates the way people actually type instead of treating every Enter as a new task.
agent/introspect
Package introspect is memcode's read-only intelligence surface — the commands the agent reaches through the single `memcode` tool (overview, map, context, why, recall, next, recap, memories, sources, session, acceptance, doctor, jobs) and the TUI's "orient me" slash shortcuts, plus the two ambiguity classifiers (plan-intent, follow-up steer-vs-queue) and the personality greeting.
Package introspect is memcode's read-only intelligence surface — the commands the agent reaches through the single `memcode` tool (overview, map, context, why, recall, next, recap, memories, sources, session, acceptance, doctor, jobs) and the TUI's "orient me" slash shortcuts, plus the two ambiguity classifiers (plan-intent, follow-up steer-vs-queue) and the personality greeting.
agent/jobs
Package jobs is memcode's background-job layer — the async extension of the shell lanes.
Package jobs is memcode's background-job layer — the async extension of the shell lanes.
agent/ledger
Package ledger holds the cost-accounting readout types and pure aggregation logic carved off the agent Session god-object.
Package ledger holds the cost-accounting readout types and pure aggregation logic carved off the agent Session god-object.
agent/mood
Package mood detects interaction *friction* — how a user is engaging with the agent — from their terminal input, using a deterministic, dependency-free lexical heuristic.
Package mood detects interaction *friction* — how a user is engaging with the agent — from their terminal input, using a deterministic, dependency-free lexical heuristic.
agent/permissions
Package permissions classifies the risk of an action and decides — given the active mode — whether it may run, needs approval, or is blocked.
Package permissions classifies the risk of an action and decides — given the active mode — whether it may run, needs approval, or is blocked.
agent/plan
Package plan holds the plan-mode lifecycle as a real state machine.
Package plan holds the plan-mode lifecycle as a real state machine.
agent/protocol
Package protocol drives an interactive memcode session over the stream-json control protocol (newline-delimited JSON on stdio) — the machine-facing twin of the TUI.
Package protocol drives an interactive memcode session over the stream-json control protocol (newline-delimited JSON on stdio) — the machine-facing twin of the TUI.
agent/room
Package room reads the *room* — the current state of the human↔agent interaction — and turns it into a runtime policy.
Package room reads the *room* — the current state of the human↔agent interaction — and turns it into a runtime policy.
agent/runtime
Package runtime: this file is the thin seam to the read-only intelligence Engine (internal/agent/introspect).
Package runtime: this file is the thin seam to the read-only intelligence Engine (internal/agent/introspect).
agent/secrets
Package secrets keeps the agent from leaking credentials.
Package secrets keeps the agent from leaking credentials.
agent/tools
Package tools declares the typed tool registry exposed to the model.
Package tools declares the typed tool registry exposed to the model.
artifacts
Package artifacts is the CLI's client for memcode.ai's artifact hosting: the agent publishes a self-contained HTML page and gets a stable, unguessable URL (memcode.ai/code/artifact/<id>) back.
Package artifacts is the CLI's client for memcode.ai's artifact hosting: the agent publishes a self-contained HTML page and gets a stable, unguessable URL (memcode.ai/code/artifact/<id>) back.
assemble
Package assemble is the context compiler.
Package assemble is the context compiler.
atomicfile
Package atomicfile writes a file so a crash mid-write never leaves it truncated: content goes to a temp file in the SAME directory, is fsync'd, then renamed over the target (an atomic operation on POSIX).
Package atomicfile writes a file so a crash mid-write never leaves it truncated: content goes to a temp file in the SAME directory, is fsync'd, then renamed over the target (an atomic operation on POSIX).
authflow
Package authflow is the browser login flow shared by `memcode login` (cobra) and the TUI's /login slash command.
Package authflow is the browser login flow shared by `memcode login` (cobra) and the TUI's /login slash command.
banner
Package banner renders memcode's startup wordmark banners.
Package banner renders memcode's startup wordmark banners.
browser
Package browser drives a long-lived Chrome instance via the Chrome DevTools Protocol (chromedp) so the agent can fully interact with web pages as tools — the same dispatch as read_file/bash.
Package browser drives a long-lived Chrome instance via the Chrome DevTools Protocol (chromedp) so the agent can fully interact with web pages as tools — the same dispatch as read_file/bash.
browserrender
Package browserrender is memcode's OPTIONAL local browser-render capability: the last-resort fetch tier for JavaScript-rendered pages that raw GET and the server-side web_fetch (both no-JS) cannot read.
Package browserrender is memcode's OPTIONAL local browser-render capability: the last-resort fetch tier for JavaScript-rendered pages that raw GET and the server-side web_fetch (both no-JS) cannot read.
buildinfo
Package buildinfo reports build-time metadata.
Package buildinfo reports build-time metadata.
checkpoint
Package checkpoint stores per-turn PRE-IMAGES of files the agent edits, so a bad run can be rewound without touching git: before edit_file mutates a file, its current bytes (or its absence) are snapshotted under .memcode/checkpoints/<session>/<seq>/.
Package checkpoint stores per-turn PRE-IMAGES of files the agent edits, so a bad run can be rewound without touching git: before edit_file mutates a file, its current bytes (or its absence) are snapshotted under .memcode/checkpoints/<session>/<seq>/.
config
Package config loads and persists per-project memcode configuration, stored under a .memcode directory at the project root.
Package config loads and persists per-project memcode configuration, stored under a .memcode directory at the project root.
doctor
Package doctor runs deterministic health checks over a memcode project — the built-in answer to "is the runtime actually doing what we think?".
Package doctor runs deterministic health checks over a memcode project — the built-in answer to "is the runtime actually doing what we think?".
doctrine
Package doctrine is the memcode prompt doctrine — client-owned since the one-wire architecture (the CLI is the agent; backends serve models, they never compose prompts).
Package doctrine is the memcode prompt doctrine — client-owned since the one-wire architecture (the CLI is the agent; backends serve models, they never compose prompts).
events
Package events defines the canonical event kinds and a typed helper for appending them.
Package events defines the canonical event kinds and a typed helper for appending them.
explore
Package explore runs a fan-out of read-only "reader" sub-agents over a repository and synthesizes their findings into one answer.
Package explore runs a fan-out of read-only "reader" sub-agents over a repository and synthesizes their findings into one answer.
forks
Package forks holds vendored forks of third-party Go modules that memcode patches locally.
Package forks holds vendored forks of third-party Go modules that memcode patches locally.
forks/vaxis
Package vaxis is a terminal user interface for modern terminals
Package vaxis is a terminal user interface for modern terminals
forks/vaxis/cmd/vtwidth command
vtwidth is a utility to measure the width of a string as it will be rendered in the terminal
vtwidth is a utility to measure the width of a string as it will be rendered in the terminal
forks/vaxis/octreequant
Package octreequant implements an image quantizer, for transforming bitmap images to palette images, before encoding them to SIXEL.
Package octreequant implements an image quantizer, for transforming bitmap images to palette images, before encoding them to SIXEL.
forks/vaxis/sixel
Package sixel encodes and decodes DEC sixel images.
Package sixel encodes and decodes DEC sixel images.
forks/vaxis/ui
Package ui provides a Flutter-inspired widget, layout, and painting layer for terminal applications built with Vaxis.
Package ui provides a Flutter-inspired widget, layout, and painting layer for terminal applications built with Vaxis.
forks/vaxis/ui/uitest
Package uitest provides small helpers for testing ui widgets without a terminal.
Package uitest provides small helpers for testing ui widgets without a terminal.
forks/vaxis/vxfw/image
Package image provides a vxfw widget for rendering vaxis images.
Package image provides a vxfw widget for rendering vaxis images.
forks/vaxis/widgets/term/pty
Package pty provides pseudo-terminal support for the terminal widget.
Package pty provides pseudo-terminal support for the terminal widget.
gateway/client
Package client is the CLI's HTTP client for the memcode gateway's SIDE-CHANNEL surfaces: /v1/advisor, /v1/websearch, /v1/webfetch, and the /v1/byok key-management routes.
Package client is the CLI's HTTP client for the memcode gateway's SIDE-CHANNEL surfaces: /v1/advisor, /v1/websearch, /v1/webfetch, and the /v1/byok key-management routes.
gitlog
Package gitlog is a tiny, dependency-free reader over `git log`, shared by the context compiler, provenance, predict and producer attribution.
Package gitlog is a tiny, dependency-free reader over `git log`, shared by the context compiler, provenance, predict and producer attribution.
hooks
Package hooks runs user-defined shell commands at agent lifecycle points — the extensibility seam for policy and automation the prompt can't provide (deterministic guards, notifications, context injection).
Package hooks runs user-defined shell commands at agent lifecycle points — the extensibility seam for policy and automation the prompt can't provide (deterministic guards, notifications, context injection).
jobs
Package jobs runs and tracks detached background agent sessions.
Package jobs runs and tracks detached background agent sessions.
knowledge
Package knowledge gives memcode the baseline a senior engineer just HAS — curated, authoritative facts and idioms for common stacks (Vercel, Next, React, Node, Supabase…), embedded in the binary so they travel into any repo.
Package knowledge gives memcode the baseline a senior engineer just HAS — curated, authoritative facts and idioms for common stacks (Vercel, Next, React, Node, Supabase…), embedded in the binary so they travel into any repo.
learn
Package learn is the reconciler: it turns source documents and deterministic evidence into adjudicated claims.
Package learn is the reconciler: it turns source documents and deterministic evidence into adjudicated claims.
lessons
Package lessons is the distilled-failure memory: strategy-level lessons ("when X breaks, do Y") extracted from the agent's own failure-and-repair episodes, accumulated as lesson_signal events, and promoted to standing plaintext files once they recur — the preference_signal promotion rigor applied to failures (≥3 signals, ≥2 sessions, weighted score ≥ 2.0).
Package lessons is the distilled-failure memory: strategy-level lessons ("when X breaks, do Y") extracted from the agent's own failure-and-repair episodes, accumulated as lesson_signal events, and promoted to standing plaintext files once they recur — the preference_signal promotion rigor applied to failures (≥3 signals, ≥2 sessions, weighted score ≥ 2.0).
llm
Package llm is the metered model-execution gateway: the ONE path every model call goes through.
Package llm is the metered model-execution gateway: the ONE path every model call goes through.
lsp
Package lsp is memcode's resident Language Server Protocol client — the "give the agent eyes" layer.
Package lsp is memcode's resident Language Server Protocol client — the "give the agent eyes" layer.
mcp
Package mcp gives memcode an MCP (Model Context Protocol) client: it discovers the servers configured across scopes (local / project / user), connects to them (stdio, streamable HTTP, or SSE), lists their tools, and exposes a single Call entrypoint.
Package mcp gives memcode an MCP (Model Context Protocol) client: it discovers the servers configured across scopes (local / project / user), connects to them (stdio, streamable HTTP, or SSE), lists their tools, and exposes a single Call entrypoint.
membench
Package membench evaluates memcode's session-memory retrieval against public conversational-memory benchmarks (LongMemEval, LoCoMo) with ZERO model calls.
Package membench evaluates memcode's session-memory retrieval against public conversational-memory benchmarks (LongMemEval, LoCoMo) with ZERO model calls.
objectives
Package objectives manages the human-authored goals that give the engine its sense of direction ("what we're trying to do").
Package objectives manages the human-authored goals that give the engine its sense of direction ("what we're trying to do").
overview
Package overview synthesizes a CANONICAL current-state overview of a project — the answer to "what is this now?" — from fresh signals (recent commits, active objectives, current claims, recent-active subsystems) rather than rebuilding it from random old docs/memories each time.
Package overview synthesizes a CANONICAL current-state overview of a project — the answer to "what is this now?" — from fresh signals (recent commits, active objectives, current claims, recent-active subsystems) rather than rebuilding it from random old docs/memories each time.
plans
Package plans is the user-level store of saved plans — one markdown file per plan under ~/.memcode/plans, mirroring Claude Code's ~/.claude/plans.
Package plans is the user-level store of saved plans — one markdown file per plan under ~/.memcode/plans, mirroring Claude Code's ~/.claude/plans.
predict
Package predict infers where a developer was working and what they were about to do next.
Package predict infers where a developer was working and what they were about to do next.
prefs
Package prefs is the preference-learning reducer.
Package prefs is the preference-learning reducer.
producer
Package producer attributes work to who/what produced it — a human or a specific AI tool — from commit metadata.
Package producer attributes work to who/what produced it — a human or a specific AI tool — from commit metadata.
provenance
Package provenance answers "why is this here?" for a file, directory or subsystem — the question humans constantly ask and agents are bad at.
Package provenance answers "why is this here?" for a file, directory or subsystem — the question humans constantly ask and agents are bad at.
provider
Package provider defines the (model, embedding, edit-apply) boundaries the engine talks to, plus the default Claude model tiers.
Package provider defines the (model, embedding, edit-apply) boundaries the engine talks to, plus the default Claude model tiers.
providers/anthropic
Package anthropicwire is the Anthropic Messages API adapter — the ONE implementation of the Messages dialect (cache_control placement, adaptive thinking, streaming decode, tool calls, native web search, usage parsing), shared by the hosted gateway (its own or the user's BYOK key) and the CLI's direct endpoint mode (api.anthropic.com).
Package anthropicwire is the Anthropic Messages API adapter — the ONE implementation of the Messages dialect (cache_control placement, adaptive thinking, streaming decode, tool calls, native web search, usage parsing), shared by the hosted gateway (its own or the user's BYOK key) and the CLI's direct endpoint mode (api.anthropic.com).
providers/compat
Package compat is the CLI's ONLY turn transport: a stdlib-only HTTP client speaking OpenAI-compat chat/completions — streaming SSE, tools + forced tool_choice, image/file parts — against any base URL: the memcode gateway at {api}/v1 (Memcode=true: the optional extensions ride) or any arbitrary compat endpoint (Memcode=false: pure standard wire).
Package compat is the CLI's ONLY turn transport: a stdlib-only HTTP client speaking OpenAI-compat chat/completions — streaming SSE, tools + forced tool_choice, image/file parts — against any base URL: the memcode gateway at {api}/v1 (Memcode=true: the optional extensions ride) or any arbitrary compat endpoint (Memcode=false: pure standard wire).
providers/gemini
Package geminiwire is the Gemini adapter (google.golang.org/genai) — the ONE implementation of the Gemini dialect for BOTH backends: the Developer API (API key) and Vertex AI (service-account JSON, passed in — credential RESOLUTION stays with the caller).
Package geminiwire is the Gemini adapter (google.golang.org/genai) — the ONE implementation of the Gemini dialect for BOTH backends: the Developer API (API key) and Vertex AI (service-account JSON, passed in — credential RESOLUTION stays with the caller).
providers/memcode
Package memcode is the memcode PROTOCOL's provider: the OpenAI-compat chat/completions dialect PLUS the memcode extensions — the two-system stable/volatile convention, the memcode_opaque reasoning round-trip, the `memcode` response object, the enforced `memcode_billing` lane, session affinity via `user`, and the GET /v1/models routing CONTROL PLANE the CLI-side selection policy runs on.
Package memcode is the memcode PROTOCOL's provider: the OpenAI-compat chat/completions dialect PLUS the memcode extensions — the two-system stable/volatile convention, the memcode_opaque reasoning round-trip, the `memcode` response object, the enforced `memcode_billing` lane, session affinity via `user`, and the GET /v1/models routing CONTROL PLANE the CLI-side selection policy runs on.
providers/openai
Package openaiwire is the OpenAI Responses API adapter — the ONE implementation of the Responses dialect (request encoding, streaming decode, reasoning-item round-trip, tool calls, usage parsing), shared by the hosted gateway (which injects its own or the user's BYOK key) and the CLI's direct endpoint mode (api.openai.com / api.x.ai).
Package openaiwire is the OpenAI Responses API adapter — the ONE implementation of the Responses dialect (request encoding, streaming decode, reasoning-item round-trip, tool calls, usage parsing), shared by the hosted gateway (which injects its own or the user's BYOK key) and the CLI's direct endpoint mode (api.openai.com / api.x.ai).
providers/provcore
Package provcore is the shared kernel under the provider WIRE adapters: the bounded retry loop, the tuned turn HTTP client, the native web-search tool swap, and the context-overflow classification — protocol plumbing shared by every adapter (the gateway's and the extracted ones alike), with NO routing policy, keys, or metering in it.
Package provcore is the shared kernel under the provider WIRE adapters: the bounded retry loop, the tuned turn HTTP client, the native web-search tool swap, and the context-overflow classification — protocol plumbing shared by every adapter (the gateway's and the extracted ones alike), with NO routing policy, keys, or metering in it.
recall
Package recall answers natural-language questions about a repository's prose memory — "where did we decide X?", "what's our policy on Y?" — by ranking the corpus of source docs, adjudicated claims, and human decisions against the question with BM25 plus memcode-aware boosts (claim status, recency, scope, source kind, exact phrase).
Package recall answers natural-language questions about a repository's prose memory — "where did we decide X?", "what's our policy on Y?" — by ranking the corpus of source docs, adjudicated claims, and human decisions against the question with BM25 plus memcode-aware boosts (claim status, recency, scope, source kind, exact phrase).
repofiles
Package repofiles enumerates the files that are actually part of a project — honoring .gitignore — so the engine never mistakes vendored, generated, cached or ignored files (node_modules, docker volumes, build output) for real source.
Package repofiles enumerates the files that are actually part of a project — honoring .gitignore — so the engine never mistakes vendored, generated, cached or ignored files (node_modules, docker volumes, build output) for real source.
sandbox
Package sandbox wraps agent shell commands in an OS-level containment layer — defense-in-depth UNDER the permission classifier, not a replacement for it.
Package sandbox wraps agent shell commands in an OS-level containment layer — defense-in-depth UNDER the permission classifier, not a replacement for it.
scripts
Package scripts is the repo-local store of reusable multi-step command sequences — a proven recipe ("rebuild the cli", "commit, push, deploy") saved once and replayed by name instead of re-derived every time.
Package scripts is the repo-local store of reusable multi-step command sequences — a proven recipe ("rebuild the cli", "commit, push, deploy") saved once and replayed by name instead of re-derived every time.
sessionlog
Package sessionlog is memcode's episodic memory: a local, append-only record of the high-level causal trail of a session — user messages, assistant messages, meaningful actions (commands, edits, commits), and approvals — written to disk as it happens, independent of the LLM context window.
Package sessionlog is memcode's episodic memory: a local, append-only record of the high-level causal trail of a session — user messages, assistant messages, meaningful actions (commands, edits, commits), and approvals — written to disk as it happens, independent of the LLM context window.
skills
Package skills gives memcode discoverable, lazy-loaded "traits" — the same mechanism Claude Code uses: a markdown file with a name + a "when to use" blurb, its body loaded on demand when the model decides a task matches.
Package skills gives memcode discoverable, lazy-loaded "traits" — the same mechanism Claude Code uses: a markdown file with a name + a "when to use" blurb, its body loaded on demand when the model decides a task matches.
sources
Package sources discovers the instruction/memory/doc artifacts left by AI coding tools and humans (CLAUDE.md, .claude/, .cursor/rules, AGENTS.md, copilot/windsurf/aider configs, README, docs, ADRs) and records them as doctrine *candidates*.
Package sources discovers the instruction/memory/doc artifacts left by AI coding tools and humans (CLAUDE.md, .claude/, .cursor/rules, AGENTS.md, copilot/windsurf/aider configs, README, docs, ADRs) and records them as doctrine *candidates*.
stack
Package stack is a deterministic project tech-stack detector.
Package stack is a deterministic project tech-stack detector.
store
Package store is the persistence layer for the memcode state engine.
Package store is the persistence layer for the memcode state engine.
structure
Package structure derives a repository's topology — its subsystems and the dependencies between them — from language-agnostic, deterministic signals: the directory tree, dependency manifests, ownership and change history.
Package structure derives a repository's topology — its subsystems and the dependencies between them — from language-agnostic, deterministic signals: the directory tree, dependency manifests, ownership and change history.
subscription/claudesub
Package claudesub turns a Claude Pro/Max subscription into a memcode backend by reusing the login the Claude Code CLI already stored.
Package claudesub turns a Claude Pro/Max subscription into a memcode backend by reusing the login the Claude Code CLI already stored.
subscription/codex
Package codex turns a ChatGPT (Codex) subscription into a memcode backend by reusing the login the Codex CLI already stored.
Package codex turns a ChatGPT (Codex) subscription into a memcode backend by reusing the login the Codex CLI already stored.
subscription/copilot
Package copilot turns a GitHub Copilot subscription into a memcode backend: it finds the GitHub token the machine already has (an env var or `gh auth token`), exchanges it for a short-lived Copilot API token, and returns the endpoint + identity headers the Copilot API requires.
Package copilot turns a GitHub Copilot subscription into a memcode backend: it finds the GitHub token the machine already has (an env var or `gh auth token`), exchanges it for a short-lived Copilot API token, and returns the endpoint + identity headers the Copilot API requires.
sync
Package sync writes project memory to AI-editor context files (CLAUDE.md, .github/copilot-instructions.md, .cursor/rules, .windsurfrules).
Package sync writes project memory to AI-editor context files (CLAUDE.md, .github/copilot-instructions.md, .cursor/rules, .windsurfrules).
theme
Package theme defines memcode's color themes: a registry of named palettes (semantic color roles for TUI styles, diff RGBs, and chroma syntax-highlight style names) plus the active-theme accessor used by the renderer.
Package theme defines memcode's color themes: a registry of named palettes (semantic color roles for TUI styles, diff RGBs, and chroma syntax-highlight style names) plus the active-theme accessor used by the renderer.
todos
Package todos is the agent's operational work tracker — a lightweight checklist the agent maintains itself so it doesn't lose its place when a request has several moving parts.
Package todos is the agent's operational work tracker — a lightweight checklist the agent maintains itself so it doesn't lose its place when a request has several moving parts.
update
Package update implements self-update against the public GitHub Releases repo (memcode-ai/memcode — the same source the curl|sh installer uses).
Package update implements self-update against the public GitHub Releases repo (memcode-ai/memcode — the same source the curl|sh installer uses).
vxui
Package vxui is memcode's interactive renderer, built on vaxis's Elm-style `ui` framework (StatefulWidget/State/Build/HandleEvent).
Package vxui is memcode's interactive renderer, built on vaxis's Elm-style `ui` framework (StatefulWidget/State/Build/HandleEvent).
vxui/spike command
Command vxspike proves vaxis PrimaryScreen is the right foundation for memcode's TUI: a persistent, themed, DYNAMICALLY-SIZED live region (status bar + composer, and an expandable menu) with durable native scrollback above it — and no cursor probes, so the glitch class the fork fights simply can't occur.
Command vxspike proves vaxis PrimaryScreen is the right foundation for memcode's TUI: a persistent, themed, DYNAMICALLY-SIZED live region (status bar + composer, and an expandable menu) with durable native scrollback above it — and no cursor probes, so the glitch class the fork fights simply can't occur.
websites
Package websites is the CLI's client for memcode.ai's Websites feature — AI-built static sites.
Package websites is the CLI's client for memcode.ai's Websites feature — AI-built static sites.
wire
Package common is the memcode PROTOCOL contract: the wire types shared by the CLI (the client) and the api gateway (the server), the sdk/agent ↔ CLI stream-json envelope, the abstract Intent, shared error sentinels, and the model/pricing metadata both ledgers price against.
Package common is the memcode PROTOCOL contract: the wire types shared by the CLI (the client) and the api gateway (the server), the sdk/agent ↔ CLI stream-json envelope, the abstract Intent, shared error sentinels, and the model/pricing metadata both ledgers price against.
tools
keyprobe command
keyprobe is a tiny raw-stdin key inspector.
keyprobe is a tiny raw-stdin key inspector.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL