xtctx
v0.3.2
Published
Cross-tool context for AI coding agents
Downloads
88
Readme
xtctx
xtctx is a local-first context runtime for AI coding assistants.
It lets Claude Code, Codex, Cursor, Copilot, and Gemini share the same project memory so you can switch tools without re-briefing each session.
Core Capabilities
- Cross-tool retrieval with MCP tools (
xtctx_search,xtctx_project_knowledge, etc.) - Durable project knowledge in
.xtctx/knowledge - File-first config sync into tool-native instruction files
- One runtime process that serves:
- MCP server
- HTTP API (
/api/*) - bundled web UI (
/)
Knowledge Types
xtctx stores structured records as:
decisionerror_solutioninsightconventiongotchafaq
Practical Workflow (Tool Handoff)
- Start in your repo with
xtctx init. - Define shared rules in
.xtctx/tool-config/shared.yaml. - Run
xtctx syncto generate managed sections for each tool. - Start
xtctx serve. - At the beginning of every coding session:
- call
xtctx_search - call
xtctx_project_knowledge
- call
- After finishing work, write outcomes back with:
xtctx_save_decisionxtctx_save_error_solutionxtctx_save_insightxtctx_save_faq
This gives a repeatable loop: recall -> implement -> write back.
Quick Start
Install and build:
npm ci
npm --prefix web ci
npm --prefix landing ci
npm run buildInitialize project context:
npx xtctx initSync shared config into tool-native files:
npx xtctx syncStart runtime services:
npx xtctx serveOpen:
- Runtime web app:
http://127.0.0.1:3232/ - Health:
http://127.0.0.1:3232/health - API:
http://127.0.0.1:3232/api/*
Optional full re-index:
npx xtctx ingest --fullMCP Client Command
{
"command": "npx",
"args": ["xtctx", "serve", "--mcp-only", "--project", "/absolute/path/to/project"]
}File-First Configuration
Primary config source is .xtctx/config.yaml.
Environment variables are optional explicit overrides only.
Security-related overrides:
XTCTX_API_TOKENXTCTX_ALLOWED_ORIGINSXTCTX_ALLOW_LOCALHOST_ORIGINSXTCTX_RATE_LIMIT_WINDOW_MSXTCTX_RATE_LIMIT_MAX
UIs
web/: runtime product UI served byxtctx serve(dark mode default with toggle)landing/: public landing site deployed to GitHub Pages (dark mode default with toggle)
Local previews:
npm run web:dev
npm run landing:dev
npm run landing:previewCLI Commands
xtctx init [path]xtctx serve [--mcp-only] [--project <path>]xtctx ingest [--full] [--project <path>]xtctx sync [--project <path>]
Development
Full validation:
npm run verify:releaseRelease automation:
- Conventional commits feed Release Please
- Release PR merge on
maincreates GitHub release - GitHub release publication triggers npm publish via OIDC trusted publishing
See CONTRIBUTING.md and SECURITY.md for contributor and security policy details.
