@continuity/cli
v3.3.4
Published
Synthetic memory system for AI coding assistants - CLI tool for context generation, decision logging, and knowledge graphs
Maintainers
Readme
Continuity Ultimate CLI
AI Memory & Development Intelligence for the command line
A command-line tool for AI memory, project intelligence, architectural decision tracking, and deep codebase analysis. Generate context handoffs, track decisions, map your entire project, and give AI tools persistent memory across all sessions.
Quick Start
# Install globally
npm install -g @continuity/cli
# Initialize in your project
cd your-project
continuity init
# Setup MCP for native @continuity integration (optional but recommended)
# Open VS Code → Continuity sidebar → Click "Setup MCP"
# Generate your first handoff
continuity sync
# Use @continuity in your AI tool (MCP) or copy SESSION_HANDOFF.mdWhy Continuity Ultimate?
Continuity Ultimate combines AI memory with deep project intelligence - persistent decision tracking plus complete codebase mapping (8 languages) with 70% token optimization. AI tools get both the "why" (decisions) and the "what" (project structure) across all sessions.
Key Features
- 🧠 AI Memory - Persistent decision tracking that AI can recall across all sessions
- 🗺️ Project Intelligence - Complete codebase mapping with AST parsing (8 languages)
- 📊 Token Optimization - 70% token reduction via smart context generation
- 📝 Context Generation - SESSION_HANDOFF.md with project map, decisions, and deltas
- 🔗 Knowledge Graphs - Visualize decision relationships with D3.js force-directed graphs
- 💡 Decision Logging - Track architectural decisions with automatic relationship detection
- 🛡️ File Protection - Prevent AI from modifying .env, credentials, or critical files
- 📊 Delta Tracking - See what changed since your last sync
- 🚀 MCP Integration - Native
@continuitymentions in Claude Code, Cursor, Cline, and more - 🔍 Symbol Indexing - Fast search across functions, classes, interfaces (8 languages)
- 🧪 Dev Tools - Server management, browser debugging, performance analysis
Installation
Global Installation (Recommended)
npm install -g @continuity/cliLocal Installation
npm install --save-dev @continuity/cli
npx continuity initFrom Source
git clone https://github.com/Thiagoscode/continuity
cd continuity/continuity-cli
npm install
npm linkFrom This Repo Checkout
From the repository root, run the CLI directly without a global install:
node continuity-cli/bin/continuity.js --help
node continuity-cli/bin/continuity.js status
node continuity-cli/bin/continuity.js sync --silentCommands
continuity init
Initialize Continuity in your project. Creates .continuity/ directory and auto-protects sensitive files.
continuity initWhat it does:
- Creates
.continuity/directory - Initializes
decisions.json(empty) - Auto-protects
.env,credentials.json, SSH keys, etc. - Adds
.continuity/to.gitignore
continuity sync
Generate SESSION_HANDOFF.md with full project context.
continuity sync # Generate and copy to clipboard
continuity sync --silent # Generate file only, don't copyGenerated handoff includes:
- 🏗️ Architecture overview
- 📊 Delta (changes since last sync)
- 📁 Project structure
- 🔄 Recent git commits
- 📝 Recent decisions
- 🎯 Currently modified files
- 💡 Tech stack detection
Example workflow:
continuity sync- Paste
SESSION_HANDOFF.mdinto new AI chat - AI instantly understands your project context
continuity log
Log architectural decisions for future reference.
continuity log # Interactive mode
continuity log "Why Redis?" "Faster than Postgres for caching"Decision templates:
- Why X over Y? - Technology choices
- How does X work? - Architecture explanations
- What is X for? - Component purposes
- When to use X? - Usage guidelines
- Where is X implemented? - Code locations
Auto-features:
- Extracts technical keywords as tags (redis, postgres, auth, etc.)
- Timestamps all decisions
- Searchable via
continuity search
continuity search
Search logged decisions by keyword.
continuity search redis # Find all decisions mentioning "redis"
continuity search # Interactive browserSearch matches:
- Decision questions
- Decision answers
- Auto-extracted tags
continuity protect
Manage file protection to prevent AI modification.
continuity protect # Interactive manager
continuity protect .env # Protect .env file
continuity protect "*.key" # Protect pattern
continuity protect .env --remove # UnprotectAuto-protected files:
.env,.env.*credentials.json,secrets.*- SSH keys (
id_rsa,id_ed25519) .npmrc,.pypirc
continuity status
Show current stats and configuration.
continuity statusDisplays:
- Total decisions logged
- Recent decisions (last 30 days)
- Protected files count
- Delta tracking status
- Last sync time
- Handoff file status
continuity config
View or update configuration settings.
continuity config # Interactive menu
continuity config maxTokens # Show current value
continuity config maxTokens 12000 # Set max tokens
continuity config deltaMode true # Enable delta trackingAvailable settings:
maxTokens(1000-50000) - Maximum tokens in handoff (default: 8000)deltaMode(true/false) - Show changes since last sync (default: true)
continuity quick
Quick-log a decision using interactive templates (Why X over Y?, How does X work?, etc.).
continuity quickcontinuity scan
Scan the project for architectural decisions that haven't been logged yet.
continuity scan # Scan project
continuity scan --force # Re-run even if already scannedcontinuity generate
Generate AI instruction files from your project's decisions and structure.
continuity generate # Generate CLAUDE.md, AGENTS.md, .cursorrules, GEMINI.md, copilot-instructions.md
continuity generate --dry-run # Preview without writing filescontinuity search:semantic
Semantic search using AI embeddings for meaning-based matching.
continuity search:semantic "caching strategy"
continuity search:semantic "auth" --limit 5 --min-score 0.5
continuity search:semantic "deployment" --hybrid-weight 0.7 # 0=semantic, 1=keywordcontinuity search:advanced
Advanced search with filters, fuzzy matching, and export capabilities.
continuity search:advanced "auth" --tags security,api
continuity search:advanced --after 2026-01-01 --before 2026-04-01
continuity search:advanced "database" --export markdown
continuity search:advanced --fuzzy 0.8 --format json
continuity search:advanced -i # Interactive selection modecontinuity relationships
Detect and suggest relationships between decisions (supersedes, contradicts, depends-on, related-to).
continuity relationships # Analyze all decisions
continuity relationships <decision-id> # For a specific decision
continuity relationships "auth" --min-confidence 0.5continuity metrics
View usage metrics, information gain statistics, and decision velocity.
continuity metrics # Display in terminal
continuity metrics --export # Export to Markdown file
continuity metrics --top-tags 5 # Show top 5 tagscontinuity graph
Build and export the decision knowledge graph.
continuity graph # Export as Mermaid (default)
continuity graph -f dot -o graph.dot # Export as Graphviz DOT
continuity graph -f json # Export as JSON
continuity graph -f cytoscape # Export as Cytoscape JSONcontinuity serve
Start the web dashboard server for browser-based decision browsing.
continuity serve # Start on default port 24280
continuity serve -p 3000 # Start on custom portcontinuity dashboard
Launch a live monitoring dashboard in the terminal with real-time stats.
continuity dashboardcontinuity tui
Launch an interactive terminal UI for browsing and navigating decisions.
continuity tuicontinuity timeline
View a decision timeline visualization.
continuity timeline # ASCII timeline
continuity timeline -i # Interactive mode
continuity timeline -w 80 # Custom bar widthcontinuity visualize
Visualize the decision graph directly in the terminal.
continuity visualize # Full graph
continuity visualize -i # Interactive mode
continuity visualize -c # Compact ASCII viewcontinuity mcp
Manage the MCP (Model Context Protocol) server for AI tool integration.
continuity mcp start # Start MCP server
continuity mcp stop # Stop MCP server
continuity mcp status # Show server status
continuity mcp status --logs # Status with recent log entries
continuity mcp setup # Configure AI tools for MCPcontinuity dream
Run memory consolidation using the Dream Engine — analyzes decisions for conflicts, redundancy, and staleness.
continuity dream # Run full consolidation
continuity dream --dry-run # Preview without making changes
continuity dream --report # Show last dream reportcontinuity notes
Manage session notes (goals, blockers, progress).
continuity notes # View current session notes
continuity notes update blockers "desc" # Add a blocker
continuity notes clear # Archive notes and start freshcontinuity debt
Track and resolve decision debt (decisions that need revisiting).
continuity debt # List current decision debt
continuity debt resolve <id> # Mark debt item as resolvedcontinuity governance
Check governance conflicts and manage decision locks.
continuity governance check "switch to MongoDB" # Check proposal for conflicts
continuity governance lock # View locked decisions
continuity governance reset # Reset danger scorecontinuity hooks
Manage git hooks for automatic decision logging on commits.
continuity hooks install # Install pre/post-commit hooks
continuity hooks uninstall # Remove hooks
continuity hooks status # Show hook installation statuscontinuity link / continuity links / continuity safety
Code intelligence — link decisions to specific code locations.
continuity link <decision-id> src/auth.ts 42 # Link decision to file:line
continuity links # Show all code-decision links
continuity links src/auth.ts # Show decisions linked to a file
continuity safety src/auth.ts # Check refactoring safetycontinuity license
Manage your Continuity Pro license.
continuity license activate <key> # Activate a Pro license key
continuity license status # Show current license status
continuity license info # Tier comparison and pricing
continuity license deactivate # Deactivate current licensecontinuity update
Update an existing decision by ID.
continuity update <id> --question "New question"
continuity update <id> --answer "Updated answer"
continuity update <id> --tags "new,tags"
continuity update <id> --status outdated # active, outdated, or deprecatedcontinuity archive
Archive decisions by age or status.
continuity archive --older-than 90 # Archive decisions >90 days old
continuity archive --status deprecated # Archive deprecated decisions
continuity archive --dry-run # Preview without changescontinuity entities
Manage entity extraction from decisions.
continuity entities backfill # Extract entities from all decisions
continuity entities stats # Show entity statistics
continuity entities backfill --dry-run # Preview without writingcontinuity lint
Lint the decision wiki for quality issues.
continuity lint # Run all checks
continuity lint -v # Verbose with details per categoryChecks for: contradictions, orphan decisions, stale entries, low-quality answers, duplicates.
continuity report
Generate a topic report from decisions.
continuity report "authentication" # Summary report
continuity report "database" -f comparison # Comparison format
continuity report "api" -f timeline # Timeline formatcontinuity source
Manage knowledge sources (external documents ingested into decisions).
continuity source ingest <file> # Ingest a document
continuity source list # List ingested sources
continuity source get <id> # Get source detailscontinuity audit
Audit decision coverage against recent git commits.
continuity audit # Audit last 7 days
continuity audit -d 30 # Audit last 30 days
continuity audit --auto-log # Auto-create draft decisions for uncovered commitscontinuity echo-chamber
Detect echo-chamber risk — clusters of decisions reinforcing the same conclusion without counter-evidence.
continuity echo-chamber # Default analysis
continuity echo-chamber --min-cluster 5 # Only report clusters of 5+File Structure
your-project/
├── .continuity/
│ ├── decisions.json # Logged decisions
│ ├── protected-files.json # Protected file patterns
│ ├── delta-snapshot.json # Last sync snapshot
│ └── config.json # CLI configuration
├── SESSION_HANDOFF.md # Generated context (gitignored)
└── .gitignore # Updated to ignore Continuity filesWorkflow Examples
Example 1: Starting a New AI Session
# 1. Generate fresh context
continuity sync
# 2. Use @continuity in your AI tool (or paste SESSION_HANDOFF.md)
# 3. AI now knows:
# - Your project architecture
# - Recent changes
# - Past decisions
# - What you're currently working onExample 2: Logging a Decision
# Just made a big architectural decision?
continuity log
# Question: Why did we choose PostgreSQL over MongoDB?
# Answer: Need ACID compliance for financial transactions,
# relational data model fits our domain better,
# team has more Postgres experience.
# ✅ Decision logged - will appear in future handoffsExample 3: Project Onboarding
# New team member setup
cd project
continuity init
continuity sync
# Share SESSION_HANDOFF.md with new developer
# They can paste it into their AI tool to understand the project instantlyExample 4: Protecting Sensitive Files
# Prevent AI from modifying production config
continuity protect config/production.yml
# View all protected files
continuity protect
# AI tools will be warned not to modify these filesAdvanced Usage
Custom Token Limits
# For larger codebases, increase token limit
continuity config maxTokens 15000
continuity syncScripting & CI/CD
# Generate handoff in CI pipeline (no clipboard)
continuity sync --silent
# Check if handoff is up to date
continuity status | grep "Modified: less than"Multiple Projects
# Each project has its own .continuity/ directory
cd project-A && continuity init && continuity sync
cd ../project-B && continuity init && continuity sync
# Decisions and config are project-specificIntegration with AI Tools
Claude Desktop / Claude.ai
- Run
continuity sync - Copy
SESSION_HANDOFF.mdcontent - Paste into new Claude chat
- Claude now has full project context
Cursor / GitHub Copilot Chat
- Run
continuity sync - Open
SESSION_HANDOFF.mdin editor - Reference in chat:
@SESSION_HANDOFF.md - AI uses file as context
ChatGPT / Any LLM
- Run
continuity sync - Copy
SESSION_HANDOFF.mdcontent - Paste into chat with: "Please read this project context first"
Troubleshooting
Command not found: continuity
# Ensure global install worked
npm list -g --depth=0 | grep continuity
# Or use npx
npx @continuity/cli init"Not a git repository"
Continuity requires git for tracking changes and commits.
git init
git add .
git commit -m "Initial commit"
continuity initHandoff file too large
# Reduce token limit
continuity config maxTokens 5000
# Or use --silent to skip clipboard (large files fail to copy)
continuity sync --silentProtected files not working
Protected files are tracked in .continuity/protected-files.json. The protection is informational - you must configure your AI tool to respect it.
Comparison: CLI vs VS Code Extension
Feature Parity
Extension is ~6x more powerful (30,000+ lines vs 5,000 lines)
| Feature Category | CLI | VS Code Extension |
|------------------|-----|-------------------|
| Core Features | | |
| Manual Decision Logging | ✅ Basic | ✅ Enhanced (tags, relationships) |
| Search Decisions | ✅ Text only | ✅ Text + Semantic + AI |
| Generate Handoffs | ✅ Basic | ✅ Enhanced (relationships, metrics) |
| File Protection | ✅ Yes | ✅ Yes + UI management |
| Delta Tracking | ✅ Basic | ✅ Advanced with convergence |
| Automation | | |
| Triple Auto-Logging | ❌ | ✅ Git + Save + Session tracking |
| Git Hooks | ❌ | ✅ Pre/post-commit detection |
| Real-time Monitoring | ❌ | ✅ File save pattern detection |
| MCP Integration | | |
| MCP Server | ❌ | ✅ Full implementation |
| AI Tool Setup (7 tools) | ❌ | ✅ One-click configuration |
| @continuity Mentions | ❌ | ✅ Native support |
| Visualization | | |
| Timeline View | ❌ | ✅ Chronological display |
| Graph View | ❌ | ✅ Interactive D3.js graphs |
| Knowledge Graph | ❌ | ✅ 3 layouts + physics simulation |
| Intelligence | | |
| Relationship Detection | ❌ | ✅ AI-powered with confidence |
| Semantic Search | ❌ | ✅ Embeddings-based |
| Convergence Tracking | ❌ | ✅ Decision consensus |
| Metrics Dashboard | ❌ | ✅ Comprehensive stats |
| User Experience | | |
| Interface | 📟 Terminal | 🎨 Rich GUI + Terminal |
| Sidebar Panel | ❌ | ✅ Full UI |
| Session Counter | ❌ | ✅ Editable goals + reset |
| Keyboard Shortcuts | ❌ | ✅ Multiple shortcuts |
Power Comparison
Extension: ████████████████████████████████ 100% (30+ features)
CLI: ████████░░░░░░░░░░░░░░░░░░░░░░░░ 25% (7 features)When to use CLI:
- You don't use VS Code
- You want a lightweight, portable tool (18.5 KB vs 19.99 MB)
- You're scripting/automating workflows
- You prefer terminal-only workflows
- You need basic decision logging and handoff generation
- You're running on a server or in CI/CD
When to use VS Code Extension:
- You use VS Code daily
- You want full synthetic memory power
- You want automatic decision logging (zero manual effort)
- You want knowledge graphs and visualizations
- You want native
@continuityin AI tools via MCP - You want advanced features (relationships, semantic search, metrics)
- You want GUI instead of command-line
Recommendation: Use the Extension for full power. The CLI is a lightweight companion tool, not a replacement.
MCP Integration (VS Code Extension Only)
The VS Code extension provides native Model Context Protocol (MCP) integration, allowing you to use @continuity directly in your AI tools.
Supported AI Tools
| Tool | Status | Usage |
|------|--------|-------|
| Claude Code | ✅ Native MCP | @continuity tell me about this project |
| Claude CLI | ✅ Native MCP | @continuity://session-handoff |
| Cursor | ✅ Native MCP | @continuity search for auth decisions |
| Cline (VS Code) | ✅ Native MCP | @continuity what changed recently? |
| Roo Code (VS Code) | ✅ Native MCP | @continuity explain architecture |
| GitHub Copilot | ✅ Native MCP | @continuity review decisions |
| OpenAI Codex | ✅ Native MCP | @continuity list recent changes |
Setup MCP
- Install Continuity VS Code extension
- Open Continuity sidebar
- Click "Setup MCP" button
- Extension configures all 7 AI tools automatically
- Restart your AI tool if needed
- Use
@continuityanywhere!
Codex users: Use /mcp in the TUI to verify active servers
Works Well With: Serena
Serena is a complementary MCP server for semantic code navigation. Use both together:
In Claude Code:
@serena find the login function
> Found: login() at src/auth.ts:45
@continuity why did we choose JWT for auth?
> Decision #23: "We chose JWT tokens because..."
@serena show references to login()
> 12 references across 5 files
@continuity what security decisions relate to login?
> Related decisions: rate limiting, password hashing, session managementContinuity = Project memory & decisions Serena = Code navigation & symbol search
Together they provide a complete AI coding experience!
Contributing
Issues and PRs welcome at: https://github.com/Thiagoscode/continuity
License
MIT
Credits
Built by @Thiagoscode with ❤️ and Claude
Questions? Open an issue: https://github.com/Thiagoscode/continuity/issues
