CLI
The cli/ package is a Bun/TypeScript tool for packaging dapps, interacting with governance, and managing the VibeFi registry. Built with Commander.js and Viem.
Commands
Global Options
Most commands accept:
--network <name>— select from config (default:defaultNetwork)--rpc <url>— override RPC (orVIBEFI_RPC_URLenv)--devnet <path>— override devnet JSON path--pk <hex>— override private key (orVIBEFI_PRIVATE_KEYenv)--json— machine-readable output withtxHashand decodedlogs
Status
vibefi status
Shows network, RPC, chain ID, contract addresses, signer info with role hints (developer, voter1, securityCouncil1, etc. when using devnet).
Package
vibefi package --path ./my-app --name "App" --dapp-version "1.0.0" --description "..." [--json]
Validates and bundles a dapp directory:
-
Dependency allowlist — only pinned versions of approved packages:
react19.2.4,react-dom19.2.4,wagmi3.4.1,viem2.45.0,shadcn3.7.0,@tanstack/react-query5.90.20- Dev:
@vitejs/plugin-react5.1.2,typescript5.9.3,vite7.2.4,@types/react19.2.4
-
Forbidden patterns — scans
.ts,.tsx,index.htmlfor:fetch(,XMLHttpRequest,WebSocket,import("http,http://,https:// -
Address validation — all addresses in
addresses.jsonmust be valid EIP-55 checksums -
ABI validation — all files in
abis/must be valid JSON -
Manifest generation — deterministic
manifest.jsonwith sorted file list, byte counts, metadata, and constraint versions -
IPFS publish — uploads bundle, returns
rootCid(or--no-ipfsfor keccak256 hash)
Options: --constraints <path> for custom constraint overrides, --ipfs-api, --ipfs-gateway.
Dapp Operations
vibefi dapp:propose --root-cid <cid> --name "App" --dapp-version "1.0.0" --description "..."
vibefi dapp:upgrade --dapp-id <id> --root-cid <cid> --name "App" --dapp-version "2.0.0" --description "..."
vibefi dapp:list [--json] [--from-block N]
vibefi dapp:fetch --root-cid <cid> --out <dir> [--ipfs-api <url>] [--ipfs-gateway <url>]
dapp:propose encodes publishDapp() calldata and submits a governance proposal. dapp:list aggregates all registry events (Published, Upgraded, Paused, Deprecated, etc.) and computes latest status per dapp.
dapp:fetch downloads a bundle from IPFS and verifies the CID matches.
Governance
vibefi proposals:list [--from-block N] [--limit 50]
vibefi proposals:show <proposalId>
vibefi proposals:queue <proposalId>
vibefi proposals:execute <proposalId>
Voting
vibefi vote:cast <proposalId> --support for|against|abstain [--reason "..."]
vibefi vote:status <proposalId>
vote:status shows For/Against/Abstain counts and quorum requirement at snapshot block.
Security Council
vibefi council:pause --dapp-id <id> --version-id <id> --reason "..."
vibefi council:unpause --dapp-id <id> --version-id <id>
vibefi council:deprecate --dapp-id <id> --version-id <id>
vibefi council:veto <proposalId>
Configuration
On first run, CLI creates .vibefi/config.json from defaults:
{
"defaultNetwork": "devnet",
"networks": {
"mainnet": {
"rpcUrl": "",
"chainId": 1,
"contracts": {
"vfiToken": "", "vfiGovernor": "", "vfiTimelock": "",
"dappRegistry": "", "constraintsRegistry": "", "proposalRequirements": ""
}
},
"devnet": {
"rpcUrl": "http://127.0.0.1:8545",
"chainId": 31337,
"devnetJson": "contracts/.devnet/devnet.json"
}
}
}
When a devnet JSON is present, the CLI auto-resolves contract addresses, test account keys, and provides role hints in output.
ABI Refresh
Extracts ABIs from contracts/out/ into packages/shared/src/abis/:
bun run refresh-abis
Run this after any contract changes.
Smoke Test
bun run test:smoke
Spawns a local devnet, runs status, proposals:list, and dapp:propose, then tears down.