CodeBank
CodeBank is a powerful code analysis and documentation tool that parses source code from multiple programming languages and generates structured documentation in markdown format. It provides deep insights into your codebase's structure, making it easier to understand and maintain large projects.
Features
-
Multi-Language Support:
- Rust (fully supported with comprehensive parsing)
- Python (fully supported with function, class, and module parsing)
- TypeScript/JavaScript (fully supported with function, class, interface, and export parsing)
- C (TODO)
-
Code Structure Analysis:
- Parses functions, modules, structs/classes, traits/interfaces
- Extracts documentation and comments
- Analyzes visibility and scope
- Handles declarations and imports
-
Flexible Output Strategies:
- Default: Complete code representation
- NoTests: Code representation excluding test code
- Summary: Public interface documentation only
-
Tree-sitter Integration:
- Robust parsing using tree-sitter
- Accurate syntax analysis
- Language-specific parsing rules
Installation
Add CodeBank to your project's dependencies:
[]
= "0.1.0" # Replace with actual version
Usage
Command Line Interface
# Generate complete code documentation
# Generate documentation excluding tests
# Generate public interface summary
Library Usage
use ;
use Path;
Development Status
Current Implementation
- ✅ Comprehensive Rust parsing
- ✅ Comprehensive Python parsing with support for functions, classes, and modules
- ✅ Comprehensive TypeScript/JavaScript parsing with support for functions, classes, interfaces, and exports
- ✅ Basic C file parsing (includes/defines)
- ✅ Markdown output generation
- ✅ Multiple output strategies
Planned Improvements
-
Parser Enhancements:
- Enhanced C parser with full language support
- Support for more languages
-
Feature Additions:
- Parallel file processing
- Caching support
- Custom output formats
- Incremental parsing
-
Performance Optimizations:
- Streaming parsing for large files
- Memory usage optimization
- Parser result caching
-
Documentation and Testing:
- Expanded test coverage
- More usage examples
- Comprehensive API documentation
Contributing
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
License
This project is distributed under the terms of MIT.
See LICENSE for details.
Copyright 2025 Tyr Chen