CLI · Section CLI-01

PEGD CLI

Terminal-first metrology for stablecoin issuers.

INSTALL

Global install via npm

$ npm i -g pegd-cli

Requires Node.js 18 or newer. The binary lands on your PATH as pegd.

DOWNLOAD

Signed tarball

Offline install or air-gapped mirrors. Verify the release hash against the on-chain attestor commitment before use.

Instrument commands

8 verbs
ISSUANCE · 01

pegd issue

Command
$ pegd issue --name "My USD" --symbol MYUSD --peg USD --collateral crypto

Register a new stablecoin issuer with a crypto over-collateralization policy.

MINT · 02

pegd mint

Command
$ pegd mint <mint> --amount 10000

Mint tokens against the vault once deposits clear the ratio floor.

REDEMPTION · 03

pegd burn

Command
$ pegd burn <mint> --amount 5000

Redeem collateral by burning tokens back to the vault.

RESERVES · 04

pegd reserves

Command
$ pegd reserves <mint>

Print the live collateral ratio, supply, and reserve breakdown.

ATTESTATION · 05

pegd por

Command
$ pegd por <mint> --history 30

Fetch signed proof-of-reserve attestations from the last 30 cycles.

RISK · 06

pegd stress

Command
$ pegd stress <mint> --shock 30 --duration 24

Simulate a market shock against the reserve and inspect breaker behavior.

MONITOR · 07

pegd watch

Command
$ pegd watch <mint> --threshold 120

Continuously monitor a mint and emit alerts when the ratio breaches a threshold.

VERIFY · 08

pegd verify

Command
$ pegd verify <mint>

Independently re-verify the latest attestation signature against the on-chain commitment.

PEGD.SDK

TypeScript SDK

Every CLI verb is available as a typed method on @pegd/sdk. Compose issuers into your own service.

import { pegd } from '@pegd/sdk';
const issuer = pegd.issuer('MyPeggedUsd');
await issuer.mint({ amount: 10_000, to: wallet });

Available on npm as @pegd/sdk.

GITHUB ACTION

Reserves guard

Wire proof-of-reserve into CI. Fail the build if the ratio drops below a floor.

- uses: pegd/reserves-check@v1
  with:
    mint: ${{ secrets.PEGD_MINT }}
    min-ratio: 130

Drop the step into .github/workflows/reserves.yml and schedule it hourly.