COMMAND LINE OPTIONS


Every command and option, generated from ledgdex --help. SELLER, LEDGER and INDEX are a dex address (https://...), a dex folder or a ledgdex.jsonl file; DEX is your own dex folder; ids are sha256: and 64 hex digits; keys are ed25519: and 64 hex digits, or the name of a key in ~/.ledgdex where noted. Messages to another ledger are written to a file (--output, or a name made from the message) and kept as sent in your ledger.

Commands: keygen, init, offer, withdraw, received, delivered, admit, revoke, note, delist, device, record, claim, pay, confirm, receipt, rotate, recover, recovered, dispute, ruling, auction, bid, reveal, list, discover, sign, verify, state, render, check, workflow, publish.

ledgdex keygen

usage: ledgdex keygen [-h] name

make a key in ~/.ledgdex and print its public key

positional arguments:
  name

options:
  -h, --help  show this help message and exit

ledgdex init

usage: ledgdex init [-h] --name NAME [--about ABOUT] [--url URL] --key KEY [--dexname DEXNAME] [--dest DEST]
                    [--branch BRANCH] [--site-path SITE_PATH] [--root ROOT]
                    dex

make a ledgdex: a complete dex with a new ledger

positional arguments:
  dex                   the dex folder

options:
  -h, --help            show this help message and exit
  --name NAME           your name, shown on the ledger
  --about ABOUT         one line about you or your shop
  --url URL             this dex's web address
  --key KEY             key name in ~/.ledgdex (made if missing)
  --dexname DEXNAME     dex name (default: --name)
  --dest DEST           repository address to publish to
  --branch BRANCH       branch to publish to
  --site-path SITE_PATH
                        folder in the repository to publish to (default: its root)
  --root ROOT           the root ledger this dex trades under (dex, file or URL): admission, recovery and
                        the default arbiter; pinned by its ledger id

ledgdex offer

usage: ledgdex offer [-h] dex file

sell something: sign and record an offer from a JSON file

positional arguments:
  dex         the dex folder
  file

options:
  -h, --help  show this help message and exit

ledgdex withdraw

usage: ledgdex withdraw [-h] dex offer

withdraw an offer

positional arguments:
  dex         the dex folder
  offer

options:
  -h, --help  show this help message and exit

ledgdex received

usage: ledgdex received [-h] dex claim amount

record that a payment arrived

positional arguments:
  dex         the dex folder
  claim
  amount

options:
  -h, --help  show this help message and exit

ledgdex delivered

usage: ledgdex delivered [-h] [--note NOTE] dex claim

record delivery

positional arguments:
  dex          the dex folder
  claim

options:
  -h, --help   show this help message and exit
  --note NOTE

ledgdex admit

usage: ledgdex admit [-h] [--name NAME] [--note NOTE] dex key

admit a key (for offers with "allow": "admitted")

positional arguments:
  dex          the dex folder
  key          public key, or the name of a key in ~/.ledgdex

options:
  -h, --help   show this help message and exit
  --name NAME
  --note NOTE

ledgdex revoke

usage: ledgdex revoke [-h] [--reason REASON] dex key

revoke an admitted key

positional arguments:
  dex              the dex folder
  key              public key, or the name of a key in ~/.ledgdex

options:
  -h, --help       show this help message and exit
  --reason REASON

ledgdex note

usage: ledgdex note [-h] dex ref text

add a remark about an earlier entry

positional arguments:
  dex         the dex folder
  ref
  text

options:
  -h, --help  show this help message and exit

ledgdex delist

usage: ledgdex delist [-h] [--reason REASON] dex ledger

index: delist a ledger

positional arguments:
  dex              the dex folder
  ledger           ledger id

options:
  -h, --help       show this help message and exit
  --reason REASON

ledgdex device

usage: ledgdex device [-h] [--name NAME] [--reason REASON] {add,revoke} dex key

add or revoke a device key (needs the owner key)

positional arguments:
  {add,revoke}
  dex              the dex folder
  key              public key, or the name of a key in ~/.ledgdex

options:
  -h, --help       show this help message and exit
  --name NAME
  --reason REASON

ledgdex record

usage: ledgdex record [-h] [--from SOURCES] dex [files ...]

record claims, payments and confirmations from buyers

positional arguments:
  dex             the dex folder
  files           message files

options:
  -h, --help      show this help message and exit
  --from SOURCES  a buyer's dex: collect what they sent you

ledgdex claim

usage: ledgdex claim [-h] [--quantity QUANTITY] [-o OUTPUT] dex seller offer

buy: sign a claim for a seller's offer

positional arguments:
  dex                   the dex folder
  seller                the seller's dex URL, dex folder or ledger file
  offer

options:
  -h, --help            show this help message and exit
  --quantity QUANTITY
  -o OUTPUT, --output OUTPUT
                        where to write the message file

ledgdex pay

usage: ledgdex pay [-h] --method METHOD [--ref REF] [-o OUTPUT] dex seller claim

tell the seller you paid

positional arguments:
  dex                   the dex folder
  seller                the seller's dex URL, dex folder or ledger file
  claim                 claim id (or your claim message id)

options:
  -h, --help            show this help message and exit
  --method METHOD
  --ref REF
  -o OUTPUT, --output OUTPUT
                        where to write the message file

ledgdex confirm

usage: ledgdex confirm [-h] [-o OUTPUT] dex seller claim

confirm you received the goods

positional arguments:
  dex                   the dex folder
  seller                the seller's dex URL, dex folder or ledger file
  claim

options:
  -h, --help            show this help message and exit
  -o OUTPUT, --output OUTPUT
                        where to write the message file

ledgdex receipt

usage: ledgdex receipt [-h] [--entry ENTRY] dex seller

keep the seller's records of your messages as receipts

positional arguments:
  dex            the dex folder
  seller         the seller's dex URL, dex folder or ledger file

options:
  -h, --help     show this help message and exit
  --entry ENTRY  only this entry id

ledgdex rotate

usage: ledgdex rotate [-h] --key KEY dex

replace the owner key (signed by the old one)

positional arguments:
  dex         the dex folder

options:
  -h, --help  show this help message and exit
  --key KEY   name of the new key in ~/.ledgdex (made if missing)

ledgdex recover

usage: ledgdex recover [-h] dex ledger key

root: name a new key for a ledger whose owner lost theirs

positional arguments:
  dex         the dex folder
  ledger      the ledger (dex, file or URL)
  key         the new public key

options:
  -h, --help  show this help message and exit

ledgdex recovered

usage: ledgdex recovered [-h] --root ROOT --key KEY dex

take a ledger back with the key the root named

positional arguments:
  dex          the dex folder

options:
  -h, --help   show this help message and exit
  --root ROOT
  --key KEY    name of the new key

ledgdex dispute

usage: ledgdex dispute [-h] [--text TEXT] [--evidence EVIDENCE] [--seller SELLER] [-o OUTPUT] dex claim

open a dispute about a claim

positional arguments:
  dex                   the dex folder
  claim

options:
  -h, --help            show this help message and exit
  --text TEXT
  --evidence EVIDENCE   an entry id or URL (repeatable)
  --seller SELLER       buyer: the seller's dex (without it, a dispute in your own ledger)
  -o OUTPUT, --output OUTPUT
                        where to write the message file

ledgdex ruling

usage: ledgdex ruling [-h] --outcome {release,refund,split} [--text TEXT] [-o OUTPUT] dex seller dispute

arbiter: rule on a dispute in a seller's ledger

positional arguments:
  dex                   the dex folder
  seller                the seller's dex URL, dex folder or ledger file
  dispute

options:
  -h, --help            show this help message and exit
  --outcome {release,refund,split}
  --text TEXT
  -o OUTPUT, --output OUTPUT
                        where to write the message file

ledgdex auction

usage: ledgdex auction [-h] dex file

start a sealed-bid auction from a JSON file

positional arguments:
  dex         the dex folder
  file

options:
  -h, --help  show this help message and exit

ledgdex bid

usage: ledgdex bid [-h] --amount AMOUNT [-o OUTPUT] dex seller auction

bid in a seller's auction (the amount stays secret until you reveal)

positional arguments:
  dex                   the dex folder
  seller                the seller's dex URL, dex folder or ledger file
  auction

options:
  -h, --help            show this help message and exit
  --amount AMOUNT
  -o OUTPUT, --output OUTPUT
                        where to write the message file

ledgdex reveal

usage: ledgdex reveal [-h] [-o OUTPUT] dex seller auction

reveal your bid after the auction closes

positional arguments:
  dex                   the dex folder
  seller                the seller's dex URL, dex folder or ledger file
  auction

options:
  -h, --help            show this help message and exit
  -o OUTPUT, --output OUTPUT
                        where to write the message file

ledgdex list

usage: ledgdex list [-h] [--url URL] [--note NOTE] dex ledger

index: list a ledger

positional arguments:
  dex          the dex folder
  ledger       dex, file or URL

options:
  -h, --help   show this help message and exit
  --url URL    address to list (default: its dex address)
  --note NOTE

ledgdex discover

usage: ledgdex discover [-h] [--offers] [--json] index

read an index: listed ledgers, and with --offers what they sell

positional arguments:
  index       the index (dex, file or URL)

options:
  -h, --help  show this help message and exit
  --offers
  --json

ledgdex sign

usage: ledgdex sign [-h] --key KEY type file

print a signed message (advanced)

positional arguments:
  type
  file

options:
  -h, --help  show this help message and exit
  --key KEY

ledgdex verify

usage: ledgdex verify [-h] [--full] [--root ROOT] ledger

check a ledger; exit code 0 only if whole

positional arguments:
  ledger       dex, file or URL

options:
  -h, --help   show this help message and exit
  --full       verify every line, ignoring the verification cache
  --root ROOT  the root ledger (dex, file or URL)

ledgdex state

usage: ledgdex state [-h] [--root ROOT] ledger

print a ledger's state

positional arguments:
  ledger       dex, file or URL

options:
  -h, --help   show this help message and exit
  --root ROOT  the root ledger (dex, file or URL)

ledgdex render

usage: ledgdex render [-h] dex

rewrite the generated pages and rebuild the site

positional arguments:
  dex         the dex folder

options:
  -h, --help  show this help message and exit

ledgdex check

usage: ledgdex check [-h] [--state STATE] [--media] [--published] [--json JSON] [--every EVERY] [--quiet]
                     [--root ROOT]
                     [sources ...]

check ledgers for tampering over time: rewrites, missing receipts, changed addresses

positional arguments:
  sources        ledgers to check: dex folders, files or URLs (default: this folder)

options:
  -h, --help     show this help message and exit
  --state STATE  where last-seen copies and proofs are kept
  --media        also fetch offer media and check their hashes
  --published    for dex folders: compare with the published ledger
  --json JSON    write the report as JSON to this file
  --every EVERY  run as a worker: check again every this many seconds
  --quiet        print only the summary line
  --root ROOT    the root ledger (dex, file or URL)

ledgdex workflow

usage: ledgdex workflow [-h] [--cron CRON] [--media] sources [sources ...]

print a GitHub Actions workflow that runs ledgdex check

positional arguments:
  sources      ledger files in the repository, or URLs

options:
  -h, --help   show this help message and exit
  --cron CRON  schedule (UTC cron)
  --media

ledgdex publish

usage: ledgdex publish [-h] dex

publish the dex with dexweb (catches up with other devices)

positional arguments:
  dex         the dex folder

options:
  -h, --help  show this help message and exit








BACK TO LEDGDEX DOCS