An interactive Pastel/Ink experience for Hashgraph Online’s Standards SDK. The CLI helps you:
- browse and run every demo with keyboard navigation and rich metadata
- auto-load credentials from
.env,TESTNET_/MAINNET_overrides, and persisted config - verify or install Cloudflare tooling for registry broker demos
- fall back to scripted commands for CI or automation
From the repository root the helper script installs dependencies on demand:
pnpm run cliThat launches the dashboard. Use the arrow keys/Enter to:
- Run a demo – dry-run or execute with environment validation.
- View configuration – inspect redacted credentials and active network.
- Agent utilities – run Cloudflare checks, installs, or tunnel dry-runs.
Non-interactive environments (e.g. CI) show guidance with equivalent commands.
# list demos (human readable)
pnpm run cli -- demo list
# list demos as JSON
pnpm run cli -- demo list --json
# inspect a demo definition
pnpm run cli -- demo info hcs-10:create-registry
# execute with env preview only (does not run the demo)
pnpm run cli -- demo run registry-broker --dry-run --print-env
# forward extra flags to the demo via -- separator
pnpm run cli -- demo run registry-broker -- --profile=mcpCredentials are resolved in this order and merged automatically:
- CLI config file (
~/.config/standards-sdk-cli/config.jsonon macOS/Linux). .env.local/.envfrom the repository root.- Process environment (
HEDERA_ACCOUNT_ID,TESTNET_HEDERA_PRIVATE_KEY,HEDERA_OPERATOR_*, etc.).
Persist defaults with the config command:
pnpm run cli -- config \
--network testnet \
--account-id 0.0.xxxxxx \
--private-key 302e... \
--registry-base-url https://hol.org/registry/api/v1 \
--prefer-cloudflared trueUseful flags:
--reset– restore defaults--autoTopUp false/--historyAutoTopUp false– toggle registry auto top-ups--env KEY=VALUE(repeatable) – inject bespoke variables for specific demos
Configuration changes take effect immediately for both interactive and scripted runs.
Bundled helpers streamline Cloudflare setup:
pnpm run cli -- agent check # detect existing cloudflared
pnpm run cli -- agent check --install # install/update bundled binary
pnpm run cli -- agent tunnel --dry-run --port 8787
pnpm run cli -- agent tunnel --port 8787 # live tunnel (Ctrl+C to exit)The CLI records the detected binary path in CLOUDFLARED_BIN so subsequent runs reuse it automatically.
- Commands live in
cli/standards-cli/source/commands/**. - Shared helpers (config, demos, environment, cloudflared) live in
cli/standards-cli/source/lib/**. - For hot iteration use
pnpm --dir cli/standards-cli start -- <subcommand>orpnpm --dir cli/standards-cli dev. - Ensure
pnpm run cli:buildpasses before committing.