zippy zip <inputDir> [outputFile] [-d dir] [-n name] [-o]
zippy unzip <inputFile> [outputDir] [-d dir] [-n name] [-o]If outputFile/outputDir is omitted, it defaults to a sibling of the input path with the
same base name (.epub appended for zip, stripped for unzip). -d/--dir overrides the
parent directory and -n/--name overrides the base name of that default. -o/--overwrite
allows replacing an existing output file/directory; without it, an existing output is a
graceful error.
| Command | Description |
|---|---|
zip <inputDir> [outputFile] |
Zips inputDir into outputFile as an EPUB-compliant container |
unzip <inputFile> [outputDir] |
Extracts the EPUB at inputFile into outputDir |
| Option | Applies to | Description |
|---|---|---|
-d, --dir <dir> |
zip & unzip | Parent directory for the default output path |
-n, --name <name> |
zip & unzip | Base name for the default output path |
-o, --overwrite |
zip & unzip | Overwrite the output file/directory if it exists |
Examples:
# writes /path/to/book.epub
zippy zip /path/to/book
# writes /other/dir/renamed.epub
zippy zip /path/to/book -d /other/dir -n renamed
# extracts into /path/to/book/
zippy unzip /path/to/book.epub
# overwrite an existing output
zippy zip /path/to/book -oRun npm run build first, or invoke directly during development with npx tsx src/cli.ts <command> ....