Added NEW command : PACK

June 19, 2025

The pack command in CPTD CLI enables seamless export and import of CLI commands as ZIP archives. Ideal for backups, sharing tools, or migrating setups across machines.

The pack command is a core utility of CPTD CLI designed to manage the export and import of command modules in .zip format. It simplifies sharing commands between users, creating backups, and migrating CLI configurations across systems. Users can export all installed commands to a directory or import them back with options like –replace and –skip-existing. The tool enforces structural validation and excludes unnecessary files to ensure security. Whether you’re managing multiple environments or distributing tools to a team, pack provides a structured and safe way to handle command portability in CPTD.


📦 New Command: pack

Purpose: Exports installed commands into individual .zip archives or imports them from a directory. Supports batch transfer of CLI commands between machines and users.


✅ Arguments

ArgumentPurpose
--exportExport all installed commands as .zip files to the specified folder
--importImport .zip files from the specified folder
--output(with --export) path to the folder where ZIPs will be saved
--from(with --import) path to the folder to read ZIPs from
--replaceRemove all current commands before importing
--skip-existingSkip commands that are already installed

📦 pack Command — Export and Import CLI Commands in CPTD

The pack command allows you to export installed commands into .zip archives and import them back. It is ideal for backup, command sharing, creating themed bundles, and migrating CLI setups.


🧰 Use Cases


✅ Syntax

cptd pack --export --output <folder>
cptd pack --import --from <folder> [--replace] [--skip-existing]

📤 Exporting Commands

cptd pack --export --output ./my_exports

📥 Importing Commands

cptd pack --import --from ./my_exports

Additional flags:


🔐 Security


🧪 Examples

# Export all commands to ZIP
cptd pack --export --output ./backup

# Import with removal of existing commands
cptd pack --import --from ./backup --replace

# Import only new commands
cptd pack --import --from ./shared --skip-existing

📁 Example Export Structure

my_exports/
├── about.zip
├── command.zip
├── pack.zip
├── cpdsl.zip
└── ...

📌 Compatibility

← Back to archive