Just turns your repo into a text file innit...🦖
Project description
🦖 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)
- Version control (
-
Build and Dependencies:
- Build outputs (
bin,obj,build,dist) - Dependencies (
node_modules,packages) - Cache directories (
.cache,__pycache__)
- Build outputs (
-
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)
- System files (
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 (
**/tempmatches 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
Release history Release notifications | RSS feed
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 reposaurus-0.1.7.tar.gz.
File metadata
- Download URL: reposaurus-0.1.7.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fa32ba0377a9c94777aac542a2a2660c55b9eb9ad7ad3146ee1680876d58159b
|
|
| MD5 |
73fdeb23dc05160d562f9f5a0558d341
|
|
| BLAKE2b-256 |
16254ba062b932bacf50788e677f41f378da257617f43cce61da3a7bfc4de7cb
|
File details
Details for the file reposaurus-0.1.7-py3-none-any.whl.
File metadata
- Download URL: reposaurus-0.1.7-py3-none-any.whl
- Upload date:
- Size: 7.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d3c526ad9c227cb5545b8aef38cf650a3e00a68ecc31c44b12d8137cc492fbc9
|
|
| MD5 |
18244f478c9cb91df1da0944aec4d45a
|
|
| BLAKE2b-256 |
437933d9fa6c258bf5c5d7831a61a480af2a4c58231adc023702f7365c4eec69
|