v1.2.0 Released 🚀 Star on GitHub

ContextGit

Requirements Traceability for LLM-Assisted Development

Stop losing context in your AI coding sessions. ContextGit tracks requirements, detects staleness, and provides precise context extraction for Claude Code, Cursor, and similar tools. Now with MCP Server, Watch Mode, and multi-format support!

Get Started View on GitHub

Quick install:

pip install contextgit

1,355×

Faster Search

94%

Context Reduction

<1s

Staleness Detection

13

CLI Commands

What's New in v1.2.0

Major Feature Release

Introducing MCP Server, multi-format scanning, watch mode, and more powerful automation features

MCP Server

Native Model Context Protocol integration for Claude Desktop with 11 powerful tools

  • JSON-RPC 2.0 compliant
  • Seamless Claude integration
  • Real-time context access

Multi-Format Scanning

Track requirements in Python, JavaScript, TypeScript, and Markdown files

  • Python docstrings
  • JSDoc comments
  • Pluggable architecture

Watch Mode

Real-time file system monitoring with automatic re-scanning on changes

  • Debounced updates
  • Background daemon support
  • Instant synchronization

Git Hooks Integration

Automatic scanning on commit and merge with configurable hooks

  • Pre-commit scanning
  • Post-merge updates
  • Easy install/uninstall

Impact Analysis

Analyze downstream effects when requirements change

  • Configurable depth
  • JSON output for CI/CD
  • Complete dependency tree

Validation Command

Validate metadata without modifying the index

  • Detects broken links
  • Missing field checks
  • CI integration ready

Install with Optional Features

# Install with all features

pip install contextgit[all]

# Or install specific features

pip install contextgit[watch] # Watch mode

pip install contextgit[mcp] # MCP server

Why ContextGit?

Built specifically for LLM-assisted development workflows. Keep your AI tools in sync with your requirements.

Bidirectional Linking

Connect business requirements to system specs, architecture decisions, code, and tests. Navigate upstream and downstream effortlessly.

Staleness Detection

Automatically detect when requirements become stale after upstream changes. Never work with outdated specs again.

Precise Context

Extract exactly what your LLM needs — no more, no less. Reduce token usage by up to 94% while improving accuracy.

LLM Integration

First-class support for Claude Code and Cursor. Auto-generates .cursorrules and CLAUDE.md for seamless integration.

JSON Output

All commands support --format json for easy parsing by LLMs and automation scripts.

Git-Friendly

YAML-based index with deterministic output. Clean diffs, easy merges, and full version control compatibility.

Real-World Performance

Based on objective measurements from actual projects. These aren't theoretical — they're verified improvements.

Metric Manual With ContextGit Improvement
Requirement search 12.5 min 0.55 sec 1,355× faster
Staleness detection 30-60 min <1 sec 1,800-3,600× faster
PR review time 3-5 min 30-60 sec 5-10× faster
Context extraction Manual copy Automated 14-29 min saved/task

Powerful CLI Commands

Everything you need to manage requirements traceability from your terminal. 13 commands to cover all workflows.

Initialization

# Initialize repository

contextgit init

# Initialize + create LLM files

contextgit init --setup-llm

Scanning

# Scan for metadata (MD, Python, JS/TS)

contextgit scan docs/ --recursive

# Preview changes

contextgit scan --dry-run

Querying

# Show project health

contextgit status

# Find requirements for a file

contextgit relevant-for-file src/auth.py

Extraction

# Extract requirement details

contextgit extract SR-010 --format json

# Show node info

contextgit show SR-010

Validation & Impact NEW

# Validate metadata

contextgit validate docs/ --recursive

# Analyze downstream impact

contextgit impact SR-010 --format json

Automation NEW

# Install git hooks

contextgit hooks install

# Watch for file changes

contextgit watch docs/

Multi-Format Metadata Support

Add requirements metadata to Markdown, Python, JavaScript, and TypeScript files.

Markdown - YAML Frontmatter

---
contextgit:
  id: SR-010
  type: system
  title: User authentication system
  status: active
  upstream: [BR-001]
---

# System Requirement: User Authentication

Python - Docstrings NEW

"""
contextgit:
  id: C-001
  type: code
  title: Auth module
  upstream: [SR-010]
"""

def authenticate(email, password):
    pass

JavaScript/TypeScript NEW

/**
 * @contextgit
 * id: C-002
 * type: code
 * title: Login handler
 * upstream: [SR-010]
 */
export function handleLogin(req, res) { 
  // implementation
}

Get Started in 5 Minutes

Start managing your requirements traceability today.

1

Install

pip install contextgit
or with all features:
pip install contextgit[all]
2

Initialize

contextgit init --setup-llm
3

Scan

contextgit scan docs/ -r

Support This Project

If you find ContextGit useful, consider supporting its development. Your support helps maintain and improve the tool!

Buy Me A Coffee