Getting Started
Quick Start
Get Contxt running in your project in under 2 minutes.
1
Initialize
Navigate to your project root and run:
$cd my-project$contxt init
Contxt creates a .contxt/ directory in your project root. This is where your local context store lives.
You'll be prompted for basic project info:
? Project name: my-saas-app ? Project type: web-app ? Tech stack: Next.js, Prisma, Postgres, Stripe ? Description: B2B SaaS with team billing and SSO
2
Log Your First Decision
contxt decision add? Decision: Use Stripe for billing
? Category: infrastructure
? Rationale: Better API design, webhook reliability,
global coverage. Using Checkout links for v1.
? Alternatives considered: Paddle (simpler tax, weaker API),
LemonSqueezy (good DX, limited enterprise)
✓ Decision logged: dec_a1b2c3d4 (v1)3
Add a Code Pattern
contxt pattern add? Pattern name: API route handler
? Category: api
? When to use: Every new API endpoint
? Template: Parse with Zod schema → pass to handler → return typed response
✓ Pattern saved: pat_e5f6g7h8 (v1)4
Set Active Context
$contxt context set\--feature"user onboarding flow"\--status"in-progress"\--blockers"Stripe webhook integration"
5
See What Your AI Will See
contxt suggest --task "add team billing endpoint"Smart Suggest — 4 entries (relevance ≥ 0.60) 0.94 DECISION Use Stripe for billing 0.87 PATTERN API route handler 0.72 CONTEXT Building: user onboarding flow 0.65 DOCUMENT API spec v2 Token estimate: 1,240 (vs 5,620 loading all) Reduction: 78%
6
Connect to Your AI Tool
For Claude Code (via MCP):
// .claude/mcp.json{"mcpServers": {"contxt": {"command": "contxt","args": ["mcp", "serve"]}}}
Now Claude Code automatically has access to your project's context on every session.