Turn repositories into AI-friendly summaries
Project description
tria
Turn Python repositories into AI-friendly format (.md / .json / .xml / .toon)
tria scans a git repository, analyzes commits, branches, and contributors, extracts and chunks files intelligently, and produces summaries that are ready for LLM consumption. Perfect for onboarding and documentation generation.
🚀 Features
- ✅ Basic CLI with essential flags
- ✅ Local repository scanning
- ✅ Create project structure tree
- ✅ Analyze commits, branches and contributors
- ✅ Exclude binary files and common ignore patterns, default gitignore file support & custom exclusions
- ✅ Python, Markdown, Dockerfile and License parsers
- ✅ Simple line-based chunking
- ✅ Multiple output formats
- ✅ PyPI package (git2mind)
📦 Installation
# Install from PyPI
pip install tria
# or install from source
git clone https://github.com/yegekucuk/tria.git
pip install -e tria
🎯 Usage
Basic Usage
# Generate summary of current directory (TOON by default)
tria .
# Generate Markdown summary (Better for human reading)
tria . -f md
# Include git history
tria . --git-history
# Specify the name of output file (gitignore is used by default)
tria /path/to/repo -o summary.md
# If you want to ignore .gitignore and include all files, disable it:
tria /path/to/repo -o summary.md --no-gitignore
# Exclude specific patterns
tria ./my-repo --exclude "tests" --exclude "*.log" --format md --output summary.md
# Verbose output with custom chunk size
tria . --verbose --chunk-size 100 --format json
Command Line Options
Usage: tria PATH [OPTIONS]
Options:
-f, --format [toon|md|json|xml] Output format (default: toon)
-o, --output PATH Output file path (default: ./tria_output.[toon|md|json|xml])
--exclude PATTERN Exclude path pattern (can be repeated)
--no-gitignore Do not use .gitignore to exclude files
--git-history Include git history (commits, contributors). Disabled by default
--git-commits INT Number of recent commits to include (default: 20)
--chunk-size INT Lines per chunk (default: 50)
--max-files INT Max files to process (default: 1000)
--dry-run Do everything except writing output
-v, --verbose Verbose logging
-h, --help Show help message
📋 Default Exclusions
The following patterns are excluded by default:
*.pyc,__pycache__.git,.venv,venvnode_modules,dist,build*.egg-info- Binary files
- Files larger than 100KB
🤝 Use Cases
- Token-Efficient LLM Input - Use TOON format for maximum efficiency with language models
- Documentation Generation - Create automatic project overviews
- Onboarding - Help new team members understand codebases
- Project Auditing - Quick overview of project structure and content
📝 License
- Author: Yunus Ege Küçük
- MIT License - see LICENSE file for details
Project details
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 tria-0.5.0.tar.gz.
File metadata
- Download URL: tria-0.5.0.tar.gz
- Upload date:
- Size: 17.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
32f1732927959f7947600e54cb03146cf4fae9e7bb4599eca916e8e1e39dec6d
|
|
| MD5 |
4c5f21c52d098fb42140f2d9a1fb8408
|
|
| BLAKE2b-256 |
30e14f71b79621c41fa877af2ac3d1f94bb9935d19ade0ee34af988d2b20b61c
|
File details
Details for the file tria-0.5.0-py3-none-any.whl.
File metadata
- Download URL: tria-0.5.0-py3-none-any.whl
- Upload date:
- Size: 16.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c6ff88e9944f51dc33b0db91178c83a9c77d569d3e6a5cec3fa479ecce2c635d
|
|
| MD5 |
8d7c1b0232f8a52ae48745fbfe44683c
|
|
| BLAKE2b-256 |
bd1ae5147fd1acffafbb07e39820a6856d4fd1a49e97ce93c96a91e823aa6b22
|