Thanks to visit codestin.com
Credit goes to github.com

Skip to content

strabo231/pack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pack - Simple File Packaging Utility

Tests License: MIT

A user-friendly command-line tool for Ubuntu that makes creating archives (tar.gz, zip, etc.) quick and easy with smart defaults.

Features

  • 🚀 Simple, intuitive command-line interface
  • 📦 Support for multiple formats: tar.gz, tar.bz2, tar.xz, zip
  • 🎯 Smart defaults - just specify what you want to pack
  • 🚫 Built-in exclude patterns for common files
  • ✨ Colorful output with progress indicators
  • 🔒 Safety checks to prevent accidental overwrites

Installation

Quick Install (Recommended)

curl -sSL https://raw.githubusercontent.com/strabo231/pack/main/install.sh | bash

Manual Install

  1. Download the script:
wget https://raw.githubusercontent.com/strabo231/pack/main/pack
  1. Make it executable:
chmod +x pack
  1. Move to your PATH:
sudo mv pack /usr/local/bin/

Usage

Basic Examples

Package a directory (creates myproject.tar.gz):

pack myproject

Create a zip file:

pack -f zip myproject

Custom output name:

pack myproject backup-2024

Save to specific directory:

pack -o ~/backups myproject

Advanced Examples

Exclude node_modules and log files:

pack -e "node_modules" -e "*.log" myproject

Create compressed backup with multiple exclusions:

pack -f tar.bz2 -e ".git" -e "*.cache" -o ~/backups myproject

Quiet mode (only show errors):

pack -q myproject

Supported Formats

  • tar.gz - Gzip compressed tar (default, best balance)
  • tar.bz2 - Bzip2 compressed tar (smaller, slower)
  • tar.xz - XZ compressed tar (smallest, slowest)
  • zip - Zip archive (compatible with Windows)

Command Reference

pack [OPTIONS] <source> [output_name]

Arguments:
  source          File or directory to package
  output_name     Optional custom name (without extension)

Options:
  -f, --format    Archive format (tar.gz, zip, tar.bz2, tar.xz)
  -o, --output    Output directory (default: current directory)
  -e, --exclude   Exclude pattern (can be used multiple times)
  -q, --quiet     Suppress non-error output
  -h, --help      Show help message
  -v, --version   Show version information

Why Pack?

Standard archiving commands are powerful but cumbersome:

Before:

tar -czf myproject-backup-$(date +%Y%m%d).tar.gz \
  --exclude=node_modules \
  --exclude=*.log \
  -C /path/to myproject

After:

pack -e "node_modules" -e "*.log" myproject myproject-backup-$(date +%Y%m%d)

Requirements

  • Ubuntu 18.04+ (or any modern Linux distribution)
  • bash 4.0+
  • Standard utilities: tar, zip, du

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

MIT License - see LICENSE file for details

Roadmap

  • Auto-detection of optimal compression format
  • Progress bar for large archives
  • Parallel compression support
  • Configuration file support (~/.packrc)
  • Archive extraction mode
  • Cloud storage integration (S3, Drive)

Author

Your Name - @tattlesnitch

Project Link: https://github.com/strabo231/pack

Changelog

v1.0.0 (2024-12-14)

  • Initial release
  • Support for tar.gz, tar.bz2, tar.xz, and zip formats
  • Exclude pattern support
  • Colorful CLI output
  • Safety checks for overwrites

About

Simple file packaging utility for Ubuntu

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published

Languages