A comprehensive Python utility for analyzing and extracting the contents of source code files across a project directory structure, outputting them into a single organized document for easier review and analysis.
- Recursive Directory Scanning: Analyzes entire project structures including subdirectories
- File Type Filtering: Include/exclude files by extension or specific filenames
- Smart Binary Detection: Automatically skips binary files while allowing trusted text extensions
- Directory Tree Generation: Creates visual directory structure representation
- Configurable Output: Customizable output formatting with summary statistics
- Size Limits: Configurable maximum file size processing limits
- Flexible Configuration: INI-based configuration with command-line overrides
Install directly from PyPI - works on any system with Python:
pip install print-projectLatest Release: v2.0.3 (October 2025) - View on PyPI
✅ After installation, use from any directory:
print-project --help # Main command
analyze-project /path/to/project # Alternative command
print-project --console -f ~/myproject # Example usageInstall without cloning - alternative method for any system:
Unix/Linux/macOS:
curl -sSL https://raw.githubusercontent.com/smaxiso/print-project/master/scripts/install.sh | bashWindows (PowerShell):
iwr -useb https://raw.githubusercontent.com/smaxiso/print-project/master/scripts/install.ps1 | iex
```### 🔧 Option 3: Development Installation
For development or latest features from source:
```bash
# Clone the repository
git clone https://github.com/smaxiso/print-project.git
cd print-project
# Install as Python package (creates 'print-project' and 'analyze-project' commands)
pip install -e .For interactive setup with multiple installation options:
git clone https://github.com/smaxiso/print-project.git
cd print-project
python scripts/install.py
# Provides guided installation with choices for different setupsRun directly without any installation:
git clone https://github.com/smaxiso/print-project.git
cd print-project
python print_project.py --help # Works immediately
python print_project.py --console # Example usage- Python 3.6+ (required)
- chardet library (automatically installed with pip methods)
After installation, test that everything works:
# Test CLI commands (after pip install):
print-project --help
analyze-project --help
# Test basic functionality:
print-project --console --only-include-files "README.md"
# Test Python script (development):
python print_project.py --helpThis tool works identically on:
- ✅ Windows (tested)
- ✅ macOS (clone and
pip install -e .) - ✅ Linux (clone and
pip install -e .)
The tool automatically searches for config.ini in:
- Current working directory
- Script directory (for development)
- Script directory
config/subdirectory (organized structure) ~/.print-project/config.ini(user config)/etc/print-project/config.ini(system config - Unix/Linux)%APPDATA%/print-project/config.ini(system config - Windows)
# CLI commands (after pip install or local install):
print-project # Analyze current directory
print-project -f /path/to/project # Analyze specific directory
print-project --console # Show console output during processing
# Alternative command name:
analyze-project --help
# Direct Python script usage:
python print_project.py
python print_project.py -f /path/to/project
python print_project.py --consoleThe tool generates a `.txt` file containing:
1. **Directory Tree**: Visual representation of the project structure
2. **File Analysis**: Content of each processed file with:
- File path and metadata
- Line numbers
- Syntax highlighting markers
3. **Summary Statistics**:
- Total files processed
- Files skipped (with reasons)
- Processing time and performance metrics
## Project Structure
print-project/ ├── print_project.py # Main application ├── config/ │ └── config.ini # Default configuration ├── scripts/ │ ├── install.sh # Unix/Linux installer │ ├── install.ps1 # Windows installer │ ├── install.py # Interactive installer │ └── release.sh # Release automation ├── docs/ │ ├── CHANGELOG.md # Version history │ ├── CONTRIBUTING.md # Development guidelines │ ├── INSTALL.md # Installation guide │ └── PYPI_PUBLISHING.md # Publishing guide ├── archive/ # Previous versions └── README.md # This file
## Use Cases
- **Code Reviews**: Generate comprehensive project snapshots
- **Documentation**: Create detailed project overviews
- **Analysis**: Understand project structure and content
- **Migration**: Prepare project content for analysis or transfer
- **AI/LLM Input**: Generate context-rich project representations
## Contributing
We welcome contributions! Please see [CONTRIBUTING.md](https://github.com/smaxiso/print-project/blob/master/docs/CONTRIBUTING.md) for detailed guidelines on:
- Setting up the development environment
- Code style and testing requirements
- Submitting bug reports and feature requests
- Pull request process and release guidelines
For version history and recent changes, see [CHANGELOG.md](https://github.com/smaxiso/print-project/blob/master/docs/CHANGELOG.md).
## License
This project is open source. See the repository for license details.