@z-torrent/publish
v0.0.1
Published
Publish static sites as torrents
Maintainers
Readme
@z-torrent/publish
CLI and library to publish static sites as BitTorrent payloads with zt-manifest.json.
Requirements
- Node.js 18+ (ESM,
node:utilparseArgs, dynamicimport()for config modules) - Bun also works as a runtime for
src/*.tsduring development.
Config files z-torrent.config.ts are loaded via dynamic import(). With Node, use .json, .js, or .mjs unless you use a TypeScript-aware runner; Bun natively resolves .ts configs.
CLI
After building the package:
cd packages/publish && bun run build
# or from repo root: bun run build --filter=@z-torrent/publish
node dist/cli.js --helpPublished installs expose the z-torrent-publish binary (runs with Node via the #!/usr/bin/env node shebang in dist/cli.js).
Library
import { publish, loadConfig } from '@z-torrent/publish'Options
--dry-run— compute info hash and manifest without writing.torrentorzt-manifest.jsonto the output path; no manifest is left in the site directory (staging uses a temp copy).
See --help on the CLI for the full option list.
