Skip to content

Cocode

Repository analysis and AI-powered code understanding.

What it does

  • Analyze repositories - Convert code to text formats for analysis
  • Extract Python interfaces - Get signatures, imports, or full code
  • AI analysis - Generate docs, changelogs, and insights using LLMs
  • Git integration - Analyze diffs and track changes

Installation

pip install cocode

Set your OpenAI API key:

echo "OPENAI_API_KEY=sk-..." > .env

Quick example

# Analyze current directory
cocode repox

# Extract Python interfaces
cocode repox --python-rule interface --include-pattern "*.py"

# Generate project overview with AI
cocode swe-from-repo extract_fundamentals .

Learn more


GitHub | Discord | PyPI