| Crates.io | codebank |
| lib.rs | codebank |
| version | 0.4.5 |
| created_at | 2025-04-27 18:09:19.108682+00 |
| updated_at | 2025-04-29 06:31:08.905203+00 |
| description | A powerful code documentation generator that creates structured markdown documentation from your codebase. Supports multiple languages including Rust, Python, TypeScript, C, and Go with intelligent parsing and formatting. Features test code filtering, summary generation, and customizable documentation strategies. |
| homepage | |
| repository | https://github.com/tyrchen/codebank |
| max_upload_size | |
| id | 1651341 |
| size | 681,862 |
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.
Multi-Language Support:
Code Structure Analysis:
Flexible Output Strategies:
Tree-sitter Integration:
You can install CodeBank using Cargo:
cargo install codebank
There are two executable binaries: cb and cb-mcp.
cb is the command line interface for CodeBank.cb-mcp is the MCP server for CodeBank.# Generate complete code documentation
cb /path/to/source --output docs.md
# Generate documentation excluding tests
cb /path/to/source --strategy no-tests --output docs.md
# Generate public interface summary
cb /path/to/source --strategy summary --output docs.md
Please refer to README_MCP.md for details.
Add CodeBank to your project's dependencies:
[dependencies]
codebank = { version = "0.4.1", default-features = false } # Replace with actual version
Then use it in your Rust code:
use codebank::{Bank, BankStrategy, CodeBank};
use std::path::Path;
fn main() -> Result<(), Box<dyn std::error::Error>> {
// Create a new code bank generator
let code_bank = CodeBank::try_new()?;
// Generate documentation
let content = code_bank.generate(
Path::new("/path/to/source"),
BankStrategy::Default
)?;
// Use the generated content
println!("{}", content);
Ok(())
}
Parser Enhancements:
Feature Additions:
Performance Optimizations:
Documentation and Testing:
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.
This project is distributed under the terms of MIT.
See LICENSE for details.
Copyright 2025 Tyr Chen