@amirja811/openzl-cli
v0.1.0
Published
OpenZL CLI - High-performance compression tool
Maintainers
Readme
@openzl/cli
OpenZL CLI - High-performance compression tool for Node.js applications.
Installation
Global Installation (Recommended)
npm install -g @openzl/cliThat's it! The package automatically detects your platform and installs the correct binary.
Local Installation
npm install @openzl/cliPlatform Support
- ✅ macOS (ARM64, x64) - Fully tested
- ✅ Linux (x64, ARM64) - Built via CI/CD
- ✅ Windows (x64) - Built via CI/CD
No build tools required! The package includes pre-built binaries for all supported platforms.
Usage
After installation, you can use the zli command:
# Check version
zli --version
# Compress a file
zli compress input.json output.zl
# Decompress a file
zli decompress input.zl output.json
# List available compression profiles
zli list-profiles
# Inspect a compressed file
zli inspect input.zlPlatform Support
This package provides pre-built binaries for:
- macOS: arm64, x64
- Linux: arm64, x64
- Windows: x64
The appropriate binary is automatically selected during installation based on your platform.
Integration with @openzl/express
This CLI is designed to work seamlessly with the @openzl/express middleware:
# Install both packages
npm install @openzl/express @openzl/cli
# The middleware will automatically find and use the CLIDevelopment
Building from Source
If you need to build the CLI from source:
# Clone the OpenZL repository
git clone https://github.com/openzl/openzl.git
cd openzl
# Build the CLI
make zli BUILD_TYPE=OPT
# The binary will be created in the build directoryBuilding for Multiple Platforms
To build binaries for all supported platforms, you'll need to:
- Build on macOS for darwin-arm64 and darwin-x64
- Use GitHub Actions or similar CI to build for Linux platforms
- Use Windows CI to build for win32-x64
Troubleshooting
Binary Not Found
If you get a "binary not found" error:
- Ensure you're using a supported platform
- Try reinstalling:
npm uninstall -g @openzl/cli && npm install -g @openzl/cli - Check that the binary is executable:
ls -la $(which zli)
Permission Denied
On Unix-like systems, ensure the binary is executable:
chmod +x $(which zli)Platform Not Supported
If your platform isn't supported, you can:
- Build from source (see Development section)
- Use the gzip fallback in @openzl/express
- Request support for your platform
License
MIT
