Easily zip your codebase while excluding unnecessary files like a pro! Say goodbye to bloated archives and hello to clean, lightweight packages. ๐
Project description
๐ฆ 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 cachesgit-friendly: Keep .git directory but exclude large filescomplete: Exclude all unnecessary files including .gitlightweight: 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
-
Clone the repository
git clone https://github.com/Deali-Axy/code-packager.git cd code-packager
-
Sync dependencies
uv sync -
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:
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- 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
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 pack_my_code-0.3.4.tar.gz.
File metadata
- Download URL: pack_my_code-0.3.4.tar.gz
- Upload date:
- Size: 41.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
af73d7006144f53ad95542a2cbb11d6cb03d6648056cbb28af430368eda4f6a1
|
|
| MD5 |
790580f163f8353fc0b78895ef463556
|
|
| BLAKE2b-256 |
4f80f62d4408fbccd4ff97a6ff6be066acf76063d361ea80ad148da6087c16c5
|
Provenance
The following attestation bundles were made for pack_my_code-0.3.4.tar.gz:
Publisher:
publish.yaml on star-plan/code-packager
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pack_my_code-0.3.4.tar.gz -
Subject digest:
af73d7006144f53ad95542a2cbb11d6cb03d6648056cbb28af430368eda4f6a1 - Sigstore transparency entry: 870125834
- Sigstore integration time:
-
Permalink:
star-plan/code-packager@36f95b7f402c658cc37aab3d76f866e07c97b173 -
Branch / Tag:
refs/tags/v0.3.4 - Owner: https://github.com/star-plan
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@36f95b7f402c658cc37aab3d76f866e07c97b173 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pack_my_code-0.3.4-py3-none-any.whl.
File metadata
- Download URL: pack_my_code-0.3.4-py3-none-any.whl
- Upload date:
- Size: 24.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1341b31d340028b18fb9dc6dcd651b951e740db42a265712dd9e58cf996f93cf
|
|
| MD5 |
7db09c2b40523a1717b5d8bedb9adb27
|
|
| BLAKE2b-256 |
8d3ee6a33234a0011614c891109d540866b268ff167ef809ed2473e57b832ab4
|
Provenance
The following attestation bundles were made for pack_my_code-0.3.4-py3-none-any.whl:
Publisher:
publish.yaml on star-plan/code-packager
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pack_my_code-0.3.4-py3-none-any.whl -
Subject digest:
1341b31d340028b18fb9dc6dcd651b951e740db42a265712dd9e58cf996f93cf - Sigstore transparency entry: 870125844
- Sigstore integration time:
-
Permalink:
star-plan/code-packager@36f95b7f402c658cc37aab3d76f866e07c97b173 -
Branch / Tag:
refs/tags/v0.3.4 - Owner: https://github.com/star-plan
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@36f95b7f402c658cc37aab3d76f866e07c97b173 -
Trigger Event:
push
-
Statement type: