A powerful tool for analyzing the evolution of code in software projects. Code Historian tracks changes in source files, categorizes them according to common software patterns, and generates detailed reports with visual timelines.
graph TD
A[Repository] --> B[Code Historian]
B --> C[Analysis]
B --> D[Visualization]
B --> E[Reports]
C --> F[Categories]
C --> G[Patterns]
C --> H[Metrics]
D --> I[Timelines]
D --> J[Charts]
D --> K[Graphs]
E --> L[Markdown]
E --> M[JSON]
- Smart Change Detection: Automatically categorizes changes into 15 different categories
- Visual Timelines: Generate visual representations of code evolution
- Detailed Statistics: Track lines added, removed, and net changes
- Git Integration: Deep integration with Git repositories
- Plugin System: Extensible analysis capabilities
- ML-Based Categorization: Optional machine learning for better categorization
- Architecture (structural changes)
- API (interface changes)
- Logic (flow modifications)
- Data (structure changes)
- Error Handling
- Logging
- Documentation
- Testing
- Performance
- Security
- Refactoring
- Dependencies
- Configuration
- UI/UX
- Accessibility
- Command Line: Traditional CLI interface
- Interactive Mode: Guided configuration and analysis
- Watch Mode: Real-time monitoring and analysis
- Configuration Files: Persistent settings management
- Rust 1.70+
- Git
- Graphviz (for visualizations)
# Clone repository
git clone https://github.com/abcdqfr/code-historian.git
cd code-historian
# Build the project
cargo build --release
# Run tests
cargo test
# Install locally
cargo install --path .
# Initialize a new repository for tracking
cd your-project
code-historian init
# Import existing history
code-historian init --import-history /path/to/old/history
# Analyze current directory
code-historian analyze
# Analyze with visualizations
code-historian analyze -v
# Watch for changes
code-historian watch
# Analyze specific directory
code-historian /path/to/repo analyze
# Enable ML categorization with visualizations
code-historian analyze --ml -v
# Analyze with specific plugins
code-historian analyze -p "security,performance"
# Watch with custom debounce time (seconds)
code-historian watch --debounce 5
# Recursive analysis with file pattern
code-historian analyze --recursive -p "*.rs"
# Custom output directory
code-historian analyze -o /path/to/output
# Initialize configuration
code-historian config init
# Get configuration value
code-historian config get visualization.theme
# Set configuration value
code-historian config set visualization.theme "modern"
# List available plugins
code-historian plugin list
# Install plugin
code-historian plugin install security-analyzer
# Remove plugin
code-historian plugin remove security-analyzer
Create .code-historian/config.toml
in your project:
default_output_dir = "docs/code-history"
preferred_plugins = ["security", "performance"]
default_ml_enabled = true
[visualization]
theme = "modern"
timeline_style = "compact"
chart_style = "dark"
color_scheme = ["#4C9AFF", "#F66D44", "#6C8EBF"]
Located at ~/.config/code-historian/config.toml
(Linux/macOS) or %APPDATA%\code-historian\config.toml
(Windows).
Located at /etc/code-historian/config.toml
(Linux/macOS).
- Markdown: Detailed change history with categorization
- JSON: Machine-readable analysis data
- Visualizations: Timelines, charts, and graphs
docs/code-history/
βββ REPORT.md # Main analysis report
βββ timeline.png # Visual timeline
βββ categories.png # Category distribution
βββ impact.png # Impact analysis
βββ data.json # Raw analysis data
- Core analysis engine
- Git integration
- Basic ML categorization
- Plugin system
- Report generation
- Basic visualizations
- Interactive mode
- Watch mode
- Configuration system
- Enhanced ML capabilities
- Advanced visualization options
- Real-time analysis improvements
- Plugin marketplace
- Web interface
- IDE integrations
- Cloud deployment
- Team collaboration features
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
This project is licensed under the MIT License - see the LICENSE file for details.