codeindex  by scheidydude

AI-powered code intelligence and impact analysis

Created 3 weeks ago

New!

257 stars

Top 98.3% on SourcePulse

GitHubView on GitHub
Project Summary

Codeindex is a repository dependency analyzer and symbol indexer designed to enhance AI-assisted development workflows. It provides developers and AI tools with deep insights into code structure, dependencies, and the potential impact of changes, enabling more efficient code navigation and refactoring. The primary benefit is a significant reduction in token usage for AI models when locating symbols or understanding code impact, alongside a comprehensive view of project architecture.

How It Works

Codeindex parses codebases across numerous languages (Python, JavaScript/TypeScript, Go, Ruby, Rust, Java, PHP, etc.) using Abstract Syntax Trees (ASTs) and import analysis to build a detailed dependency graph. It calculates a "blast-radius" score for each file, quantifying the direct and transitive impact of its modification. Concurrently, it generates a symbol index, mapping functions, classes, and types to their exact locations, facilitating O(1) lookups. The tool is built with pure Python standard library, requiring no build steps or external package managers like npm.

Quick Start & Requirements

  • Installation: pip install codeindex
  • Prerequisites: Python 3.9+, a modern web browser for the visualization UI. Optional dependencies for enhanced features include watchdog (pip install 'codeindex[watch]'), PyYAML (pip install 'codeindex[yaml]'), and tomli (pip install 'codeindex[toml]').
  • Setup: Minimal setup time due to its pure Python nature and lack of build steps.
  • Documentation: Primarily via the command-line interface and README.

Highlighted Details

  • Multi-Language Support: Analyzes over 12 languages, including Python, JavaScript/TypeScript, Go, Ruby, Rust, Java, and PHP.
  • AI Integration: Generates codeindex.json and symbolindex.json files, directly usable by AI assistants like Claude Code via MCP server or CLAUDE.md injection, drastically cutting token usage for symbol location tasks.
  • Interactive Visualization: Offers multiple views including 2D/3D force graphs, dependency matrices, and treemaps.
  • Blast-Radius Scoring: Provides per-file impact scores and risk levels, identifying critical files before refactoring.
  • Pre-commit Hook: Integrates a Git pre-commit hook to warn or block commits that modify high-impact files.

Maintenance & Community

The provided documentation does not detail specific contributors, sponsorships, or community channels (e.g., Discord, Slack).

Licensing & Compatibility

Licensed under the Apache 2.0 license, permitting free use and modification, with attribution required. It is compatible with commercial use and closed-source linking.

Limitations & Caveats

The interactive visualization feature requires a modern web browser. For specific advanced parsing capabilities (e.g., Docker, CI/CD, SQL, Prisma), optional dependencies must be installed. The CLAUDE.md injection method increases prompt token count, which may be a consideration for extremely large codebases or simple tasks.

Health Check
Last Commit

1 day ago

Responsiveness

Inactive

Pull Requests (30d)
2
Issues (30d)
3
Star History
257 stars in the last 23 days

Explore Similar Projects

Feedback? Help us improve.