Skip to main content

tria

Python Version PyPi Package PyPI Downloads

Turn 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 sproduces 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, JavaScript, TypeScript, 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, venv
  • node_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

Metadata

Release files for tria 0.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tria 0.6.0
File Size Uploaded Provenance Actions
tria-0.6.0.tar.gz 17.3 kB Without provenance Details for tria-0.6.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tria 0.6.0
File Interpreter ABI Platform Actions
tria-0.6.0-py3-none-any.whl Python 3 none any Details for tria-0.6.0-py3-none-any.whl

Total release size: 34.5 kB

Release files / tria-0.6.0.tar.gz

Download URL tria-0.6.0.tar.gz
Size 17.3 kB
Tags Source
SHA-256 checksum
How to use checksums
a3020ddf463b01632604225f8caee507c29b5a2a13123f8c187fbd6ccd38f24d
BLAKE2b-256 checksum
How to use checksums
a70c6034d0129dae3e0271dcb537ef48b1810e09186edff7b29062838e498e35
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / tria-0.6.0-py3-none-any.whl

Download URL tria-0.6.0-py3-none-any.whl
Size 17.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
944590dd40198c5fb5c85fef25a1a2b4f5b6e57b6ca2ffb671237524b781c5d2
BLAKE2b-256 checksum
How to use checksums
10280e162cf0c76777c2bf1480c50f4a19333b747cb6f08955268ae44da40000
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Security for tria 0.6.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page