Skip to main content

๐Ÿ“ฆ CodePackager โ€” The Ultimate Code Packaging Tool ๐Ÿš€

Easily zip your codebase while excluding unnecessary files like a pro! Say goodbye to bloated archives and hello to clean, lightweight packages. ๐ŸŽ‰

โœจ Features

  • ๐ŸŽฏ Multiple Presets: Choose from 4 built-in presets for different packaging needs

    • basic: Exclude common build files and caches
    • git-friendly: Keep .git directory but exclude large files
    • complete: Exclude all unnecessary files including .git
    • lightweight: Keep only core source code
  • ๐Ÿงน Smart Comment Removal: Remove comments from Python, JavaScript, Java, C/C++ files

  • ๐Ÿ—œ๏ธ Multiple Compression Methods: Support for deflate, lzma, and bzip2 compression

  • ๐Ÿ“Š Detailed Statistics: Get comprehensive packaging statistics

  • ๐ŸŒ Cross-Platform: Works seamlessly on Windows, macOS, and Linux

  • โšก Fast & Efficient: Optimized for large codebases with blazing-fast execution

๐Ÿค” Why Use PackMyCode?

When working with large codebases, manual packaging can be a nightmare. PackMyCode simplifies the process by:

  • Automatically skipping files you don't need (e.g., node_modules, *.log, __pycache__)
  • Providing flexible preset configurations for different scenarios
  • Offering advanced features like comment removal and multiple compression methods
  • Keeping your archives clean and deploy-ready
  • Saving time and reducing human errors

๐Ÿš€ Quick Start

Usage

You can run pack-my-code directly using uvx without installation:

uvx pack-my-code

Or install it first:

# Install via pip
pip install pack-my-code

# Install via uv (recommended)
uv tool install pack-my-code

Once installed, you can use the pack-my-code command directly:

# Run TUI (Terminal User Interface)
pack-my-code

# Run CLI (Command Line Interface)
pack-my-code --source . --output code_package.zip

Development Setup

  1. Clone the repository

    git clone https://github.com/Deali-Axy/code-packager.git
    cd code-packager
    
  2. Sync dependencies

    uv sync
    
  3. Run from source

    # Run TUI
    uv run pack-my-code
    
    # Run CLI
    uv run pack-my-code --source . --output output.zip
    

๐Ÿ“‹ Command Line Options

Usage: pack-my-code [OPTIONS] [SOURCE_DIR] [OUTPUT_ZIP]

Arguments:
  SOURCE_DIR    Source code directory to package
  OUTPUT_ZIP    Output zip file path

Options:
  -p, --preset PRESET       Choose preset: basic, git-friendly, complete, lightweight (default: basic)
  -c, --config CONFIG       Use custom configuration file
  -r, --remove-comments     Remove comments from source code files
  --compression METHOD      Compression method: deflate, lzma, bzip2 (default: deflate)
  -l, --list-presets        List all available presets
  -v, --verbose             Show detailed output
  -h, --help                Show help message

๐Ÿ“‚ Preset Configurations

Preset Description Use Case
basic Excludes common build files, caches, and IDE files General development projects
git-friendly Keeps .git directory but excludes large objects Sharing projects with version history
complete Excludes everything unnecessary including .git Final release or distribution
lightweight Keeps only essential source code Minimal code sharing

๐Ÿ“‚ Example Directory Structure

Before packaging:

project/
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ main.py
โ”‚   โ””โ”€โ”€ utils/
โ”‚       โ””โ”€โ”€ helpers.py
โ”œโ”€โ”€ node_modules/          # Excluded
โ”œโ”€โ”€ __pycache__/          # Excluded
โ”œโ”€โ”€ build/                # Excluded
โ”œโ”€โ”€ .git/                 # Depends on preset
โ”œโ”€โ”€ .vscode/              # Excluded
โ””โ”€โ”€ .gitignore

After packaging (basic preset):

code_package.zip
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ main.py
โ”‚   โ””โ”€โ”€ utils/
โ”‚       โ””โ”€โ”€ helpers.py
โ”œโ”€โ”€ .git/
โ””โ”€โ”€ .gitignore

๐Ÿ”ง Advanced Features

Comment Removal

Supports removing comments from:

  • Python (.py)
  • JavaScript (.js, .jsx, .ts, .tsx)
  • Java (.java)
  • C/C++ (.c, .cpp, .h, .hpp)

Custom Configuration

Create your own exclusion rules by using the --config option with a custom configuration file.

Compression Methods

  • deflate: Fast compression, good compatibility (default)
  • lzma: Best compression ratio, slower
  • bzip2: Good balance between speed and compression

๐Ÿค Contributing

Contributions are welcome! Please feel free to:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

For bug reports and feature requests, please open an issue.

๐Ÿ“„ License

This project is licensed under the MIT License. See LICENSE for details.


Made with โค๏ธ by DealiAxy

Metadata

Release files for pack-my-code 0.3.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pack-my-code 0.3.4
File Size Uploaded Provenance Actions
pack_my_code-0.3.4.tar.gz 41.6 kB With provenance Details for pack_my_code-0.3.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pack-my-code 0.3.4
File Interpreter ABI Platform Actions
pack_my_code-0.3.4-py3-none-any.whl Python 3 none any Details for pack_my_code-0.3.4-py3-none-any.whl

Total release size: 66.1 kB

Release files / pack_my_code-0.3.4.tar.gz

Download URL pack_my_code-0.3.4.tar.gz
Size 41.6 kB
Tags Source
SHA-256 checksum
How to use checksums
af73d7006144f53ad95542a2cbb11d6cb03d6648056cbb28af430368eda4f6a1
BLAKE2b-256 checksum
How to use checksums
4f80f62d4408fbccd4ff97a6ff6be066acf76063d361ea80ad148da6087c16c5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 29, 2026.

Transparency log

Release files / pack_my_code-0.3.4-py3-none-any.whl

Download URL pack_my_code-0.3.4-py3-none-any.whl
Size 24.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1341b31d340028b18fb9dc6dcd651b951e740db42a265712dd9e58cf996f93cf
BLAKE2b-256 checksum
How to use checksums
8d3ee6a33234a0011614c891109d540866b268ff167ef809ed2473e57b832ab4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 29, 2026.

Transparency log

Security for pack-my-code 0.3.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pack_my_code-0.3.4.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 29, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.3.4 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page