A universal tool to analyze and visualize code flow in any repository
Project description
Repo Flow Analyzer
A universal tool to analyze and visualize code flow in any repository, helping developers understand functionality by searching for keywords.
🎯 Features
- Multi-Language Support: Works with Java, Python, JavaScript/TypeScript, Go, C#, and more
- Multiple Output Formats: Markdown, Mermaid diagrams, and JSON
- Customizable: Configure component patterns, exclusions, and output preferences
- Repository Agnostic: Works with any codebase structure
- Fast & Efficient: Handles large repositories with smart file filtering
📦 Installation
Via pip (recommended)
pip install repo-flow-analyzer
From source
git clone https://github.com/yourorg/repo-flow-analyzer.git
cd repo-flow-analyzer
pip install -e .
🚀 Quick Start
Basic Usage
# Analyze credit-related functionality
flow-analyzer credit
# Search for user authentication flow
flow-analyzer authentication
# Find payment processing components
flow-analyzer payment
Generate Visual Diagrams
# Create a Mermaid diagram
flow-analyzer credit --format=mermaid --output=credit-flow.mmd
# Generate markdown documentation
flow-analyzer user --format=markdown --output=docs/user-flow.md
# Export as JSON for custom processing
flow-analyzer api --format=json --output=api-analysis.json
Custom Configuration
# Generate a configuration template
flow-analyzer --init
# Use custom config
flow-analyzer credit --config=.flow-analyzer.yaml
📖 Documentation
Command Line Options
Usage: flow-analyzer [OPTIONS] KEYWORD
Arguments:
KEYWORD The search term to find in your codebase
Options:
-f, --format [markdown|mermaid|json] Output format (default: markdown)
-o, --output PATH Output file (default: stdout)
-c, --config PATH Path to custom config file
-p, --base-path PATH Base path of the repository (default: .)
--version Show version
--help Show this message
Configuration File
Create a .flow-analyzer.yaml in your project root:
languages:
java:
extensions: [".java"]
component_patterns:
controller: ["controller", "resource"]
service: ["service", "manager"]
repository: ["repository", "dao"]
analysis:
max_files: 10000
exclude_patterns:
- "**/node_modules/**"
- "**/target/**"
- "**/.git/**"
output:
mermaid:
max_nodes: 50
color_scheme:
controller: "#e1f5ff"
service: "#f3e5f5"
🎨 Output Formats
Markdown
- Human-readable documentation
- Organized by component type
- Includes file paths, methods, and dependencies
- Perfect for README files and documentation
Mermaid
- Visual flow diagrams
- Color-coded components
- Shows relationships between layers
- Renders in GitHub, GitLab, and Confluence
JSON
- Machine-readable format
- Complete component metadata
- Ideal for custom integrations
- Can be processed by other tools
💡 Use Cases
For New Developers
"I need to understand how the payment system works"
flow-analyzer payment --format=mermaid --output=payment-flow.mmd
For Code Reviews
"What components does this feature affect?"
flow-analyzer feature-name --format=markdown
For Documentation
"Generate architecture diagrams for documentation"
flow-analyzer core --format=mermaid --output=docs/architecture.mmd
For Debugging
"Where is Kafka used in the application?"
flow-analyzer kafka --format=json
🔧 Supported Languages
- Java: Controllers, Services, DAOs, Entities
- Python: Views, Services, Repositories, Models
- JavaScript/TypeScript: Components, Services, Routes
- Go: Handlers, Services, Repositories
- C#: Controllers, Services, Repositories
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Development Setup
git clone https://github.com/yourorg/repo-flow-analyzer.git
cd repo-flow-analyzer
pip install -e ".[dev]"
Running Tests
pytest tests/
📄 License
MIT License - see LICENSE file for details
🙏 Acknowledgments
Built for multi-team collaboration in monorepo environments.
📞 Support
- Issues: https://github.com/yourorg/repo-flow-analyzer/issues
- Discussions: https://github.com/yourorg/repo-flow-analyzer/discussions
- Documentation: https://repo-flow-analyzer.readthedocs.io
Made with ❤️ for developers who want to understand code faster
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file code_flow_analyzer-1.0.0.tar.gz.
File metadata
- Download URL: code_flow_analyzer-1.0.0.tar.gz
- Upload date:
- Size: 12.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
70ec00d60eef4927b38db6c0a20ecc70657ba658f9734c13b44dd0edf3b686b2
|
|
| MD5 |
c8542dbd304314d1e015fcdaef3062a4
|
|
| BLAKE2b-256 |
10c95e346713f1ed91d6c23a8026114db29628a0a2d5003246cf409e57346e64
|
File details
Details for the file code_flow_analyzer-1.0.0-py3-none-any.whl.
File metadata
- Download URL: code_flow_analyzer-1.0.0-py3-none-any.whl
- Upload date:
- Size: 13.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
805ceb9d0b4d95ff86318c405170de212cce74f4b02affa9060413449d92b057
|
|
| MD5 |
e73fc59ea5bf68f49d0cd27b1f09b095
|
|
| BLAKE2b-256 |
a1169113ec6bfae18b36a679d04ceaaba7d01242381724bf920e3e5fbb167101
|