zine-cli
v0.1.0
Published
Simple markdown publishing and uploads to Arweave
Readme
zine
Simple CLI for uploading files and shipping markdown blog content to Arweave.
The 2 commands most people need
zine upload <path>
zine shipzine upload <path>uploads a single file and prints the txid.zine shipreads./content, uploads changed posts, uploads the manifest, and prints the manifest txid.
That final printed value is easy to pipe or store:
MANIFEST_ID=$(zine ship)
echo "$MANIFEST_ID"Install
Use from source
git clone <your-repo-url> zine
cd zine
npm install
npm linkThen run zine ... anywhere.
Install via npm (when published)
npm install -g zine-cliWallet defaults
zine looks for a wallet in this order:
--jwk /path/to/wallet.jsonARWEAVE_JWK./wallet.json~/.zine/wallet.json
Ship defaults
zine shipDefaults used:
- Content directory:
./content - Manifest output path:
./dist/manifest.json
Override content path either way:
zine ship ./my-content
zine ship --content ./my-contentOther common flags:
zine ship --manifest ./out/manifest.json
zine ship --include-drafts
zine ship --jwk ./wallet.jsonUpload examples
zine upload ./assets/hero.png
zine upload ./dist/manifest.json
zine upload ./notes.txt --content-type "text/plain; charset=utf-8"Markdown/frontmatter expected for ship
Each markdown file in content should have frontmatter like:
---
title: "My Post"
banner: "<43-char-arweave-txid>"
slug: "my-post" # optional, filename is fallback
draft: false
---
Post body...Required fields:
titlebanner(43-char txid)
Optional commands
zine validate
zine buildzine validatechecks content frontmatter and slugs.zine buildwrites/updates local manifest without uploading.
Notes on distribution
For GitHub + npm distribution, this repo is already set up with a bin entry in package.json:
bin/zine.jsis the executable.- Users can run with
npm linklocally. - Publish with
npm publishwhen ready.
If the package name zine-cli is taken, rename name in package.json (for example to your org scope: @your-org/zine).
