Skip to Content
CLIOverview

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 hashpHash for 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 add -g @joinmonolith/cli

Requires 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

CommandPurpose
monolith hashCompute SHA-256 fingerprint + perceptual hash for a file or stdin
monolith --helpShow inline usage

Exit codes

CodeMeaning
0Success
1Runtime error (missing file, IO failure, decode error)
2Invalid 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