Skip to content

Latest commit

 

History

44 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pak

Small command line archive tool for project files.

Use it for asset packs, configs, fixtures, and simple file bundles.

Install

Windows:

powershell -ExecutionPolicy Bypass -c "irm https://raw.githubusercontent.com/xaviersupreme/pak/master/scripts/install.ps1 | iex"

Linux and macOS:

curl -fsSL https://raw.githubusercontent.com/xaviersupreme/pak/master/scripts/install.sh | sh

Specific release:

curl -fsSL https://raw.githubusercontent.com/xaviersupreme/pak/master/scripts/install.sh | PAK_VERSION=v0.3.2 sh

Quick start

pak make assets image.png sound.wav config.txt
pak list assets.pak
pak unpack assets.pak -C out

pak make assets ... writes assets.pak.

Commands

pak make [options] <archive> <files...>
  --compress --no-smart-compress --level N -0..-9
  --paths --exclude pattern --no-pakignore

pak update [options] <archive.pak> <files...>
  --compress --no-smart-compress --level N -0..-9
  --paths --exclude pattern --no-pakignore

pak list [--long] [--full-name] <archive.pak> [files...|patterns...]
  --long --full-name

pak unpack|extract [options] <archive.pak> [files...|patterns...]
  -C dir --overwrite --skip-existing

pak cat <archive.pak> <file|pattern>
pak info <archive.pak>
pak delete <archive.pak> <files...|patterns...>
pak rename <archive.pak> <old> <new>

pak repack [options] <archive.pak> [files...|patterns...]
  --compress --no-smart-compress --level N -0..-9

pak check <archive.pak>
pak version

Examples

pak make --compress assets sprites.png theme.wav config.txt
pak make --paths game assets/sprites/player.png assets/audio/jump.wav
pak make source "**/*.c"

pak update assets.pak config.txt
pak list --long assets.pak
pak unpack assets.pak "*.png" -C out

pak cat assets.pak config.txt
pak delete assets.pak "*.tmp"
pak rename assets.pak config.txt config/default.txt
pak repack --compress assets.pak "*.wav"
pak check assets.pak

Quote wildcard patterns when you want pak to expand them itself.

Use -- when a file name starts with -:

pak make weird -- -dash.txt

Build

make
make test

Windows fallback:

.\make.ps1
.\make.ps1 test

Docs

Current archives are PAK2.

About

Small file packer CLI written in C.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages