Simple ZIP archiving tool with password protection for easy command-line usage.
- β Cross-platform - Works on Windows, Linux, and macOS
- β Easy to use - Simple command-line interface
- β Password protection - Secure your archives
- β Hash generation - Verify archive integrity
- β Progress tracking - See compression progress
- β Security focused - Built-in protection against ZIP bombs and path traversal
- β TypeScript support - Full type definitions included
# Install globally for command-line usage
npm install -g simpl-zip
# Or install locally in your project
npm install simpl-zip# Archive a folder
szip my-folder my-archive.zip
# Archive with password protection
szip my-folder secure.zip -p mypassword
# Archive with hash generation
szip my-folder verified.zip -h sha256
# Archive with custom compression level
szip my-folder compressed.zip -l 9# Extract archive
szip unzip my-archive.zip
# Extract to specific directory
szip unzip my-archive.zip -o ./extracted
# Extract password-protected archive
szip unzip secure.zip -p mypassword# Direct extraction (auto-detect)
szip my-archive.zip
# Using sunzip command
sunzip my-archive.zipszip [command] <source> [output] [options]zip- Create archive (default if source is not .zip)unzip- Extract archive (default if source is .zip)info- Show detailed informationsupport- Show support contact-test- Run self-tests
| Option | Description | Example |
|---|---|---|
-p PASSWORD |
Set password protection | -p mypassword |
-h ALGORITHM |
Generate hash (md5, sha256, sha512) | -h sha256 |
-o OUTPUT |
Specify output location | -o ./backup |
-l LEVEL |
Compression level (1-9) | -l 9 |
# Basic usage
szip documents backup.zip
szip backup.zip
# Advanced usage
szip photos secure-photos.zip -p secret123 -h sha256 -l 9
szip unzip secure-photos.zip -p secret123 -o ./restored-photos
# Batch operations
szip project-src project-v1.0.zip -h sha256
szip project-v1.0.zip -o ./project-restoredAutomatically prevents directory traversal attacks (../../../etc/passwd).
Detects and prevents ZIP bomb attacks that could exhaust system resources.
Validates file names and extensions to prevent malicious files.
Monitors memory usage to prevent resource exhaustion.
Run the built-in test suite:
szip -testRun development tests:
npm test
npm run test:coveragegit clone https://github.com/yourusername/simpl-zip.git
cd simpl-zip
npm install
npm run build
npm testsimpl-zip/
βββ bin/ # Executable files
β βββ szip.js # Main CLI executable
β βββ sunzip.js # Extraction shortcut
βββ src/ # TypeScript source files
β βββ index.ts # Core functionality
β βββ logger.ts # Logging utilities
β βββ crypto.ts # Cryptographic functions
β βββ progress.ts # Progress tracking
β βββ security.ts # Security utilities
βββ tests/ # Test files
βββ dist/ # Compiled JavaScript
βββ docs/ # Documentation
Error: "Missing main szip.js executable"
npm run build # Compile TypeScript filesError: "Node.js version not supported"
# Upgrade Node.js to v16.0.0 or higherError: "Permission denied"
# On Linux/macOS:
sudo chmod +x /usr/local/bin/szip
# On Windows:
# Run as AdministratorEnable debug logging:
SZIP_DEBUG=true szip my-folder archive.zipEnable memory monitoring:
SZIP_MONITOR=true szip large-folder archive.zip| Archive Size | Compression Time | Memory Usage |
|---|---|---|
| 10 MB | ~2 seconds | ~50 MB |
| 100 MB | ~15 seconds | ~100 MB |
| 1 GB | ~2 minutes | ~200 MB |
- Use appropriate compression levels (-l 1 for speed, -l 9 for size)
- Enable progress tracking for large archives
- Monitor memory usage for very large files
- Use hash generation only when needed
We welcome contributions! Please see our Contributing Guide.
git clone https://github.com/yourusername/simpl-zip.git
cd simpl-zip
npm install
npm run build
npm testPlease include:
- Operating system and version
- Node.js version
- Full command that failed
- Error message (if any)
- Debug output (
SZIP_DEBUG=true)
MIT License Β© 2025 Kozosvyst Stas
- Built with archiver and yauzl
- Inspired by the need for simple, secure archiving tools
- Thanks to all contributors and users
- Email: dev@sxscli.com
- Issues: GitHub Issues
- Documentation: Wiki
Made with β€οΈ by Kozosvyst Stas