CLI overview
@joinmonolith/cli is the official command-line interface for the
Monolith API. It computes the same fingerprints
and perceptual hashes the API uses, so you can hash files locally before
calling POST /api/v1/artifacts.
- Fingerprint — SHA-256 of the file bytes, prefixed with
0x. Identical to the value Monolith stores on an Artifact. - Perceptual hash —
pHashfor images, AcoustID-compatible Chromaprint for audio. Computed in pure JS/WASM, no native binaries required. - Auto-detection — file kind is sniffed from magic bytes via
file-type.
Source: stabilityprotocol/joinmonolith-cli .
Install
bun
bun add -g @joinmonolith/cliRequires Node.js >=18 (or Bun). The package ships pure ESM and ships its
own WASM for audio fingerprinting — no node-gyp, no Python, no compile step.
Commands
| Command | Purpose |
|---|---|
monolith hash | Compute SHA-256 fingerprint + perceptual hash for a file or stdin |
monolith --help | Show inline usage |
Exit codes
| Code | Meaning |
|---|---|
0 | Success |
1 | Runtime error (missing file, IO failure, decode error) |
2 | Invalid usage (missing arg, unknown command) |
The CLI is read-only against your filesystem and does not call the Monolith
API. Pipe its output into curl (or any HTTP client) to mint an Artifact —
see the Quickstart.
Next
Last updated on