| Crates.io | marco-polo |
| lib.rs | marco-polo |
| version | 0.5.0 |
| created_at | 2026-01-03 22:10:25.076558+00 |
| updated_at | 2026-01-04 19:38:35.512856+00 |
| description | A CLI tool to cartograph codebases and generate Mermaid.js diagrams. |
| homepage | |
| repository | https://github.com/wseabra/marco_polo |
| max_upload_size | |
| id | 2020872 |
| size | 133,490 |
A CLI Tool to Cartograph Codebases
Marco is a high-performance CLI tool written in Rust that scans your codebase and generates Mermaid.js Class Diagrams. It helps developers visualize structure, inheritance, and relationships in large projects quickly.
ignore crate to traverse directories while respecting .gitignore.tree-sitter for robust AST-based code analysis.*--, o--) from properties and __init__...>) from method parameters and return types..mmd files ready for Mermaid.js rendering.| Feature | Python | Java | C++ |
|---|---|---|---|
| Visibility Tracking | ✅ | ✅ | ✅ |
| Namespace Awareness | ✅ | ✅ | ✅ |
| Relationship Labels | ✅ | ✅ | ✅ |
| Multi-level Inheritance | ✅ | ✅ | ✅ |
You can install marco-polo directly from crates.io:
cargo install marco-polo
Alternatively, you can build from source:
git clone https://github.com/wseabra/marco_polo.git
cd marco_polo
cargo install --path .
Now you can run the marco-polo command from anywhere.
marco-polo [OPTIONS] [PATH]
Arguments:
[PATH]: Path to the codebase to scan (defaults to current directory .).Options:
-o, --output <FILE>: Output file path for the Mermaid diagram (default: output.mmd).-e, --extensions <EXT>: Comma-separated list of file extensions to scan (default: py,java,cpp,rb).-v, --visibility <LEVELS>: Comma-separated visibility levels to include (default: public). Options: public, protected, private, internal.-h, --help: Print help information.Example:
marco-polo ./src --output diagram.mmd
Given the following Python code:
from typing import List
class Entity:
def __init__(self, id: int):
self.id = id
class Product:
pass
class User(Entity):
def __init__(self, id: int, name: str):
super().__init__(id)
self.name = name
class Order:
def __init__(self, user: User):
self.user = user # Aggregation
self.items: List[Product] = []
def add_item(self, product: Product): # Dependency
self.items.append(product)
Marco-Polo generates the following Mermaid diagram:
classDiagram
class Entity {
+id
}
class User {
+name
}
class Order {
+user
+items
+add_item()
}
Entity <|-- User
User o-- Order : user
Product o-- Order : items
Product ..> Order
We love contributions! Whether it's adding support for a new language, fixing a bug, or improving documentation, here's how you can help:
git checkout -b feat/my-new-feature.feat: add Java support.Run tests to ensure everything is working:
cargo test
This project is licensed under the MIT License.