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.10.tar.gz (17.2 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.10-py3-none-any.whl (21.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: reposaurus-0.1.10.tar.gz
  • Upload date:
  • Size: 17.2 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.10.tar.gz
Algorithm Hash digest
SHA256 7e6800cc9d4d947d791201967571742ddceba61cd6bfc4943af1fe918b263087
MD5 1a1af7d615dd631d8edaa27fe0771ab7
BLAKE2b-256 6df4dc261b1f3b5d67c68c4cfd270e4168938113dc1c486f1c457150f340de96

See more details on using hashes here.

File details

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

File metadata

  • Download URL: reposaurus-0.1.10-py3-none-any.whl
  • Upload date:
  • Size: 21.5 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.10-py3-none-any.whl
Algorithm Hash digest
SHA256 b1223d950499627bbcba4af1cd87c2281b282f4c0a9ac8bf103b03f271730326
MD5 6f03a2221f9267d67d6d419bc3595c94
BLAKE2b-256 fb205e46ef1f991c743d4f60561eb1fa8b18883ec35e6a88d65487a15a4bec5d

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