Skip to main content

Turn repositories into AI-friendly summaries

Project description

tria

Python Version PyPi Package PyPI Downloads

Turn Python repositories into AI-friendly format (.md / .json/ .xml)

tria scans a git repository, analyzes commits, branches, and contributors, extracts and chunks files intelligently, and produces concise Markdown, JSON or XML 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 (markdown by default)
tria .


# Generate XML summary of current directory
tria . -f xml

# 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 [md|json|xml]    Output format (default: md)
  -o, --output PATH             Output file path (default: ./tria_output.[md|json|xml])
  --exclude PATTERN             Exclude path pattern (can be repeated)
  --no-gitignore                Do not use .gitignore to exclude files (gitignore is used by default)
  --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

  • Documentation Generation - Create automatic project overviews
  • Onboarding - Help new team members understand codebases
  • AI Context Preparation - Prepare repositories for LLM analysis
  • 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

tria-0.4.2.tar.gz (15.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tria-0.4.2-py3-none-any.whl (15.8 kB view details)

Uploaded Python 3

File details

Details for the file tria-0.4.2.tar.gz.

File metadata

  • Download URL: tria-0.4.2.tar.gz
  • Upload date:
  • Size: 15.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for tria-0.4.2.tar.gz
Algorithm Hash digest
SHA256 4b7cfeee3f0ea7bd0c45e6ecb179f47a0c216c6b0b9df6a22d746172a2f5d242
MD5 e1053231a6b5a1a8e09dc4fed872d217
BLAKE2b-256 75c8accd86e1946ff76fd95bd99240c7c2548d7225824d23d67dc2c16c581240

See more details on using hashes here.

File details

Details for the file tria-0.4.2-py3-none-any.whl.

File metadata

  • Download URL: tria-0.4.2-py3-none-any.whl
  • Upload date:
  • Size: 15.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for tria-0.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d56ab09d9910d77dafb98afceb4ea93c83fe3ff4eb8be824a2711da64a6e0f81
MD5 a76a4c053cf31075b02314866e7d1440
BLAKE2b-256 44c098be89aa5e77ee4ee36ca1e679834913dab348e27a1890464e3010c6a1d9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page