Skip to content

ivdimova/codebase-time-machine

Repository files navigation

Codebase Time Machine

Navigate any codebase through time, understanding evolution of features and architectural decisions.

Features

  • Time Travel: Clone and analyze git repository history
  • Semantic Understanding: AI-powered analysis of code changes
  • Natural Language Queries: Ask questions about code evolution
  • Rich Visualizations: Interactive charts and timelines
  • Feature Mapping: Link commits to business features

Tech Stack

Core Technologies

  • Python 3.10+: Main programming language
  • UV: Blazing-fast Python package management and environment management
  • Streamlit: Web application framework for the interactive interface
  • GitPython: Git repository analysis and manipulation
  • OpenAI API: AI-powered semantic analysis of code changes

Key Dependencies

  • Click: Command-line interface framework
  • Pygments: Syntax highlighting for code visualization
  • Rich: Terminal formatting and progress indicators
  • Pydantic v2: Data validation and settings management
  • Matplotlib & Plotly: Data visualization and charting
  • NetworkX: Graph analysis for code relationships
  • Pandas: Data manipulation and analysis
  • TextStat: Code complexity analysis

Development Tools

  • Ruff: Ultra-fast Python linter and formatter (replaces Black & Flake8)
  • MyPy: Static type checking
  • Pytest: Testing framework with coverage support
  • Pre-commit: Git hooks for code quality

Deployment & Infrastructure

  • Docker: Containerization with multi-stage builds
  • Google Cloud Build: CI/CD pipeline configuration
  • Cloud Run: Serverless container deployment platform

Installation

Prerequisites

  • Python 3.10 or higher
  • Git
  • UV package manager

Setup

# Install UV (if not already installed)
curl -LsSf https://astral.sh/uv/install.sh | sh

# Clone the repository
git clone <repository-url>
cd codebase-time-machine

# Install dependencies
uv sync

Usage

Web Interface (Recommended)

# Launch the web application
python run_webapp.py

# Or with UV
uv run streamlit run src/codebase_time_machine/web_app.py

Then open http://localhost:8501 in your browser and enter a GitHub repository URL!

Command Line Interface

# Analyze repository
ctm analyze https://github.com/username/repository

# Ask questions
ctm query ./repo "How did authentication evolve?"

# Generate charts
ctm visualize ./repo --output ./charts

About

Navigate any codebase through time, understanding evolution of features and architectural decisions.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors