@glorychain/cli
v0.1.2
Published
Glory Chain CLI
Readme
glorychain CLI
Full chain lifecycle management from your terminal. No server required.
npm install -g glorychainQuickstart
# 1. Generate a keypair (store the private key securely)
glorychain keygen
# 2. Create a chain
glorychain create \
--key $PRIVATE_KEY \
--pubkey $PUBLIC_KEY \
--content "My Organisation Board Decisions" \
--purpose "governance"
# 3. Append your first real block
glorychain append \
--chain <chainId> \
--key $PRIVATE_KEY \
--pubkey $PUBLIC_KEY \
--content "Board meeting 2026-03-22: approved new budget. Motion: Jane Smith."
# 4. Verify the whole chain
glorychain verify --chain <chainId>Commands
keygen
Generate an Ed25519 keypair.
glorychain keygenOutput: publicKey and privateKey (base64url). Store your private key securely — it cannot be recovered.
create
Create a new chain.
glorychain create \
--key <privateKey> \
--pubkey <publicKey> \
--content "Genesis block content" \
[--purpose "governance"] \
[--creator "[email protected]"] \
[--dir ./chains]append
Append a block to an existing chain.
glorychain append \
--chain <chainId> \
--key <privateKey> \
--pubkey <publicKey> \
--content "Block content" \
[--dir ./chains]verify
Verify the integrity of a chain.
glorychain verify --chain <chainId> [--dir ./chains]Checks: hash continuity, signatures, block sequence, timestamp validity, schema conformance.
inspect
Display the contents of a specific block.
glorychain inspect --chain <chainId> --block <n> [--dir ./chains] [--json]--block is required. Use 0 for the genesis block.
fork
Fork a chain from a given block.
glorychain fork \
--chain <chainId> \
--block <n> \
--key <newPrivateKey> \
--pubkey <newPublicKey> \
--content "Fork genesis content" \
[--purpose fork] \
[--dir ./chains]Forking preserves the original chain intact. The new chain carries provenance — it knows where it came from. Use it when a signing key is compromised or a governance change requires a new signer.
migrate
Migrate a chain from one directory to another.
glorychain migrate \
--chain <chainId> \
--from ./chains \
--to ./archivefeed
Generate an Atom 1.0 feed of a chain.
glorychain feed --chain <chainId> [--dir ./chains] [--base-url <url>]export
Export a chain to a JSON file.
glorychain export --chain <chainId> [--out ./export.json] [--dir ./chains]init
Initialise a directory for use with glorychain.
glorychain init \
[--dir chains] \
[--preset <preset>] \
[--github] \
[--content "Genesis content"] \
[--key <key>] \
[--pubkey <pubkey>]With --preset: populates CHAIN_CHARTER.md with a ready-to-use charter for a specific chain type. Available presets: governance, board-decisions, audit-log, policy-register, membership-register.
With --github: scaffolds .github/workflows/chain-genesis.yml and chain-append.yml. Requires CHAIN_PRIVATE_KEY and CHAIN_PUBLIC_KEY repo secrets.
With --content: also creates the genesis block immediately.
template
Show usage templates.
glorychain templateFull reference
See docs/reference/cli-reference.md for the complete flag reference for every command.
