@dclimate/tyche-cli
v0.1.5
Published
`@dclimate/tyche-cli` is the agent-facing CLI for Tyche core hedge and collateral flows.
Downloads
447
Readme
Tyche CLI
@dclimate/tyche-cli is the agent-facing CLI for Tyche core hedge and collateral flows.
Supported command groups
networkschemadescribestatsmarketpositionstakepoolwallet
Runtime config
Global flags:
--network--rpc-url--markets-subgraph-url--collateral-subgraph-url--account--mode--output--fields--limit--cursor--input--input-file--allow-approvals--infinite
Environment variables:
TYCHE_NETWORKTYCHE_RPC_URLTYCHE_MARKETS_SUBGRAPH_URLTYCHE_COLLATERAL_SUBGRAPH_URLTYCHE_PRIVATE_KEYTYCHE_CLI_CHECK_FOR_UPDATE(1by default; set0to disable update checks)
Update notice behavior
- The CLI is notify-only: it never auto-updates and never prompts for update approval.
- On command runs, a newer npm version is reported to
stderr. - For successful
--output jsoncommands, the same notice is appended towarnings[].
Example notice:
Update available for @dclimate/tyche-cli (current 0.1.3, latest 0.1.4). Run: pnpm add -g @dclimate/tyche-cli. Warning: Older CLI versions may target obsolete contracts and should be updated urgently.Execution modes
auto: execute only when the path is unambiguous and approvals are already satisfied; otherwise return a plan and exit20.dry-run: validate and return the planned transaction steps without mutating chain state.force: execute despite soft ambiguity gates, but still require hard validation and--allow-approvalsfor approval-plus-action sequences.
Release discipline
- Use PARITY_MATRIX.md to keep duplicated CLI behavior aligned with supported dapp flows.
- Use RELEASE_CHECKLIST.md before publishing a new package version.
- Standard post-deploy publish entrypoint is
pnpm run release:cli-after-contractsfrom repo root (orpnpm run release:cli-after-contracts:dry-runfirst).
Examples
tyche schema list --output json
tyche describe market.buy --output json
tyche market list --limit 5 --output json
tyche market buy --market-id 0x... --outcome-id 1 --shares-out 1 --slippage-bps 100 --account 0x...
tyche wallet approve --target global-pool --amount 100 --mode dry-run --account 0x...