@routon/cli
v0.1.0
Published
Routon Protocol command-line interface.
Maintainers
Readme
Routon CLI (@routon/cli)
Command-line interface for Routon Protocol — builder registration, Brahma migration, simulation.
Status: v0.1.0 ready for first publish. Commands simulate (W5-A1) + migrate-brahma (W5-A2) + register-builder (W5-A3) are implemented against the in-process mock-tier surface. Live RPC + Ledger signing land in Phase 3 testnet per the Path-C deferral pattern documented in each command. Full design in ../specs/cli.md.
Install
pnpm add -g @routon/cli
# or run via npx
npx @routon/cli --helpAfter install, the CLI binary is invoked as routon (the package name is @routon/cli per npm scope discipline; the binary command name is routon per oclif bin config):
routon simulate --asset USDC --amount 1000 --chain base
routon migrate-brahma --print-mapping-table
routon register-builder --label TGBOT01 --chain baseDistribution: npm scoped namespace + GitHub releases. macOS .pkg + Linux GPG-signed binaries land in a Wave 5+ follow-up after the founder Apple Developer enrollment completes.
Commands (v0)
routon register-builder Register a builder code in BuilderCodeVault (W5-A3).
routon migrate-brahma Migrate a Brahma console to Routon (W5-A2).
routon simulate Simulate a strategy locally before broadcast (W5-A1).More subcommands track specs/cli.md.
Local dev
pnpm install
pnpm --filter @routon/cli run dev -- --help
pnpm --filter @routon/cli run build && node cli/dist/index.js --help
pnpm --filter @routon/cli run test # Vitest, 77 unit tests covering all 3 commandsRelease process
CI workflow: .github/workflows/cli-publish.yml. Two-phase publish posture — first publish creates the npm package; Trusted Publisher binding is per-package and cannot be configured before the package exists.
Phase A — first publish (v0.1.0)
The @routon/cli npm package does not yet exist; Trusted Publisher (TP) cannot be pre-bound. First publish uses NPM_TOKEN classic auth (no --provenance).
- Bump
cli/package.jsonversionto0.1.0+ commit (already done). - Tag + push:
git tag cli-v0.1.0 git push origin cli-v0.1.0 - The
cli-publish.ymlworkflow runs automatically on the tag push. It checks version consistency, runs build + tests, then publishes viaNPM_TOKEN(organization secret pre-configured during Wave 3 SDK publishing setup; same Granular Access Token covers all@routon/*scoped packages). - Post-publish: the workflow surfaces a notice reminding the founder to complete Phase B binding.
Phase B — bind Trusted Publisher (v0.1.1+)
After Phase A completes, the @routon/cli package exists on npm and TP can be bound.
- Visit npmjs.com/package/@routon/cli/access → "Trusted publishers".
- Add a new Trusted Publisher:
- Repository:
Dmitrze/routon-protocol - Workflow filename:
.github/workflows/cli-publish.yml - Environment: (leave blank or set
release)
- Repository:
- In GitHub repo settings → Secrets and variables → Actions → Variables, add:
- Name:
TRUSTED_PUBLISHER_ENABLED - Value:
true
- Name:
- Future publishes (
git tag cli-v0.1.1 && git push origin cli-v0.1.1) auto-detect the variable and add--provenancefor OIDC-attested supply-chain provenance — same posture as@routon/sdkwill adopt post-Wave-4 (perdocs/SDK-PUBLISHING.md).
Dry-run
To exercise the workflow without publishing (build + test + npm publish --dry-run):
gh workflow run cli-publish.yml -f dry_run=trueLicense
MIT — see ../LICENSE-MIT.txt.
