Skip to main content

Just turns your repo into a text file innit...🦖

Project description

Reposaurus Banner

🦖 Reposaurus

A powerful tool for transforming repositories into comprehensive text files. Perfect for documentation, AI tool integration, and code review preparation.

Overview

Reposaurus is designed to capture your entire codebase in a single, well-organized text file. It features a dual pattern matching system: simple and efficient default exclusions for common cases, plus advanced gitignore-style pattern matching when you need more control. Whether you're preparing code for AI analysis, documenting your project, or archiving project states, Reposaurus helps you focus on what matters by excluding unnecessary files.

Features

  • 📁 Smart Directory Structure Visualization
  • 📝 Complete File Content Extraction
  • 🧠 Dual Pattern Matching System:
    • Simple, efficient matching for common exclusions
    • Advanced gitignore-style patterns when you need them
  • 🦖 Compatible with Any Git Repository
  • ⚡ Fast and Efficient Processing
  • 🛠️ Simple Command-Line Interface

Installation

Install Reposaurus using pip:

pip3 install reposaurus

On macOS, you might need to add Python's bin directory to your PATH:

echo 'export PATH="$HOME/Library/Python/3.9/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc

Basic Usage

Reposaurus offers straightforward command-line operation:

# Process current directory with default exclusions
reposaurus

# Process a specific directory
reposaurus /path/to/repository

# Use custom exclusion patterns
reposaurus --exclude-file my_patterns.txt

This creates a repository_contents.txt file in your target directory containing:

  • A visual representation of your directory structure
  • The complete contents of all included text files
  • Automatic filtering of binary files and development artifacts

Pattern Matching System

Reposaurus employs a dual approach to file exclusions:

Default Pattern Matching

By default, Reposaurus uses a simple, efficient pattern matching system that automatically excludes:

  • Development Directories:

    • Version control (.git, .svn)
    • IDE configurations (.vs, .idea, .vscode)
    • Python artifacts (__pycache__, .egg-info)
    • Virtual environments (venv, .env)
  • Build and Dependencies:

    • Build outputs (bin, obj, build, dist)
    • Dependencies (node_modules, packages)
    • Cache directories (.cache, __pycache__)
  • System and Binary Files:

    • System files (.DS_Store, Thumbs.db, package.lock.json, repository_contents.txt)
    • Compiled files (.pyc, .exe, .dll)
    • Archives (.zip, .tar, .gz)
    • Media files (.jpg, .png, .mp3)
    • Logs and databases (.log, .sqlite)

Advanced Pattern Matching

When you need more control, you can provide a custom exclusion file using familiar gitignore syntax:

reposaurus --exclude-file my_patterns.txt

Your exclusion file can use the full .gitignore syntax:

# Ignore all .txt files
*.txt

# But keep important.txt
!important.txt

# Ignore temp folders anywhere
**/temp/

# Ignore specific directories
build/
node_modules/

# Complex patterns
docs/**/*.md
!docs/README.md

Pattern matching features include:

  • Basic wildcards (*.txt, project-*/)
  • Directory wildcards (**/temp matches temp anywhere)
  • Negation patterns (!important.txt)
  • Directory-specific matching (docs/*.md)
  • Comments for pattern documentation

Output Format

The generated repository_contents.txt file is structured for clarity:

Directory structure:
└── repository/
    ├── src/
    │   ├── main.py
    │   └── utils.py
    ├── docs/
    │   └── README.md
    └── config.json

================================================
File: /src/main.py
================================================
[File contents here]

================================================
File: /src/utils.py
================================================
[File contents here]

Error Handling

Reposaurus handles various edge cases gracefully:

  • Binary files are automatically skipped
  • Files with encoding issues are noted but don't halt processing
  • Invalid patterns in exclusion files are reported with helpful messages
  • Missing directories or permissions issues are clearly reported

Contributing

Contributions are welcome! Feel free to:

  • Report bugs
  • Suggest features
  • Submit pull requests
  • Improve documentation

License

MIT License - See LICENSE file for details

Authors

  • Andy Thomas - Initial work

Acknowledgments

Built with love and a touch of prehistoric magic 🦖✨

For more information, visit our documentation or raise an issue on GitHub.

Version History

  • 0.1.4 - Added dual pattern matching system with gitignore support
  • 0.1.3 - Initial public release

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

reposaurus-0.1.9.tar.gz (17.1 kB view details)

Uploaded Source

Built Distribution

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

reposaurus-0.1.9-py3-none-any.whl (21.4 kB view details)

Uploaded Python 3

File details

Details for the file reposaurus-0.1.9.tar.gz.

File metadata

  • Download URL: reposaurus-0.1.9.tar.gz
  • Upload date:
  • Size: 17.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.6

File hashes

Hashes for reposaurus-0.1.9.tar.gz
Algorithm Hash digest
SHA256 41ba916f014ed2177b3e9cbb401971d890020e2ed580e380fd1172c8ccc4fc7b
MD5 4fc78fddc38541ea4baa4c6f1869e572
BLAKE2b-256 fa4464d0042e9178966d4506ab5fc0d444e2aea17640d726a18dc1b6e3502c54

See more details on using hashes here.

File details

Details for the file reposaurus-0.1.9-py3-none-any.whl.

File metadata

  • Download URL: reposaurus-0.1.9-py3-none-any.whl
  • Upload date:
  • Size: 21.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.6

File hashes

Hashes for reposaurus-0.1.9-py3-none-any.whl
Algorithm Hash digest
SHA256 e893ca6f59aa76837a862c72beff7acfef68ab75fd5f02b63694ad12e3aefc87
MD5 0d6a848b2223aaa6f8d2b96e5420595e
BLAKE2b-256 674a3c44f60a7bdafb4a1690d12d84e58435b44c8155e9d6783ba0e831a3e130

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