Thanks for your interest in contributing to Cortex! This guide will get you up and running in under 5 minutes.
- Node.js 20+ (check with
node -v) - npm (comes with Node)
- VSCode 1.85+
git clone https://github.com/cortex-dev/cortex.git
cd cortex
npm install
npm run buildStart the watch mode for automatic rebuilds on save:
npm run watchTo test the extension in VSCode:
- Open the project in VSCode
- Press F5 to launch the Extension Development Host
- The extension activates automatically in any workspace with a
CLAUDE.mdfile or.cortexdirectory
src/
cli/ # CLI entry point (`cortex` command)
engine/
extractor/ # LLM-based memory extraction from sessions
injector/ # Writes working memory into CLAUDE.md
memory/ # Memory store (working, episodic, semantic layers)
watcher/ # Session file watcher and JSONL parser
hooks/ # Git hooks manager
compressor.ts
orchestrator.ts # Main orchestrator tying everything together
extension/
providers/ # VSCode tree view and webview providers
index.ts # Extension activation entry point
mcp/ # MCP server for external tool integration
types/ # Shared TypeScript type definitions
- TypeScript with strict mode
- Semicolons at end of statements
- Single quotes for strings
- 2-space indentation
- Trailing commas in multi-line arrays/objects
Run the linter before submitting:
npm run lintnpm test- Fork the repo and create a branch from
master - Make your changes with clear, focused commits
- Run
npm run lintandnpm testbefore pushing - Open a PR with a clear title and description of what changed and why
- Link any related issues
- Search existing issues first to avoid duplicates
- Use the provided issue templates for bug reports and feature requests
- Include reproduction steps for bugs
- Include your Node, VSCode, and OS versions
Looking for a place to start? Here are some areas where contributions are welcome:
- Tests -- Many modules in
src/engine/need unit test coverage - Documentation -- Improve inline JSDoc comments across the codebase
- LLM providers -- Add support for new LLM backends in the extraction engine
- Memory viewers -- Improve the sidebar webview UI for memory health
- CLI commands -- Extend the
cortexCLI with new subcommands
Look for issues labeled good first issue on GitHub.
By contributing, you agree that your contributions will be licensed under the MIT License.