CLI tutorial
Create a store, commit a file, and read it back with the digstore CLI.
The Quickstart leads with the free, web-first path (build and preview at no cost, publish only at the end). This page is the deeper CLI walkthrough — the parallel track for terminal and CI workflows.
0. Set up your wallet
digstore init mints a singleton on Chia mainnet and costs the uniform capsule price in $DIG + a small XCH fee, so you need a seed and a funded wallet first. (Building and previewing locally are free — you only spend when you publish a capsule.)
digstore seed import # import an existing BIP-39 mnemonic (prompted)
# or
digstore seed generate # generate a fresh mnemonic (shown once — back it up)
Fund the wallet address that digstore seed status shows before continuing. For full details see On-chain anchoring.
1. Initialize a workspace
mkdir my-project && cd my-project
digstore init
digstore init creates a .dig/ workspace and mints the store's singleton on Chia mainnet — the on-chain launcher id becomes the store id. It blocks until the transaction is confirmed (default timeout 300 s), then writes the store locally. Run interactively, it asks a couple of setup questions:
Relative path to the build/content directory this store captures [.]:
Make this a private (salted) store? [y/N]:
- The content directory is what the store captures (a build dir like
dist/). Press Enter to use the current directory. - Private mixes in a secret salt so the URN alone can't decrypt (see Public vs private).
You can skip the prompts with flags — handy in scripts:
digstore init # current dir, public
digstore init site --dir dist # a store named "site" capturing ./dist
digstore init --private # private store