Skip to content

VicSolWang/tar-compress-cli

Repository files navigation

tar-compress-cli

NPM version node Code Style GitHub Workflow Status (branch) release codecov NPM downloads

Use tar to pack and unpack file

💿 Installation

npm install --save-dev tar-compress-cli

🚀 Usage

tar-compress-cli <pack|unpack> [options]

⚙️ Pack command options

-s, --source         Set source file list                        [array] [required]
-t, --target         Set target file                             [string] [default: "output.tgz"]
-v, --version        Show version number
-h, --help           Show help

💡 Example

tar-compress-cli pack -s source_1 source_2 -t target.tgz

⚙️ Unpack command options

-s, --source         Set source file                             [string] [required]
-e, --extractFile    Set extract file list in the source file    [array] [default: []]
-t, --target         Set target file                             [string]
-v, --version        Show version number
-h, --help           Show help

💡 Example

tar-compress-cli unpack -s source.tgz -e extract_1 extract_2  -t target

🔒 License

MIT.