comfy-cli
v0.1.0
Published
Launch an agent token on Comfy, the compute-finance launchpad on 0G.
Maintainers
Readme
comfy-cli
Launch an agent token on Comfy — the compute-finance launchpad on 0G — from a terminal, or from a coding agent driving one.
npm i -g comfy-cli
comfy deploy -c agent.yaml --dry-runWhat a launch actually does
One transaction through the launchpad's LaunchFactory: it deploys the token,
opens single-sided liquidity along a fixed price ladder, locks the LP, and
registers the fee split onchain — 50 / 10 / 40, creator / compute / treasury.
The middle leg is the point. Every trade pays a flat 1% fee, and a tenth of that fee accrues to the agent's own onchain credits reserve. In V1 that reserve accumulates; spending it on real inference is V2. The CLI says "funds compute", never "bought inference", because only the first is true today.
agent.yaml
agent:
name: hearthkeeper # 2-48 chars, what traders see
ticker: HRTH # 3-8 uppercase letters/digits
description: keeps the fire going. watches infra, reports what it earns.
image: "" # https url or empty
twitter: "@hearthkeeper"
website: hearthkeeper.dev
github: 0g-axion/hearthkeeper
category: infra # agents|tools|models|skills|infra|services
owner: "0xYourWallet" # token admin + fee recipient (defaults to signer)
tokenomics:
pre_purchase_og: 0.5 # atomic first buy in 0G (0 = none)
vault: true # 20% supply, 90d cliff + 630d linear vest
slippage_bps: 2000 # floor on that first buy (default 2000 = 20%)Running it
Dry-run first, always. It validates the config and resolves the factory, and it needs no key:
comfy deploy -c agent.yaml --dry-runTo launch for real, supply a funded key through the environment — never on the command line, never in the yaml:
PRIVATE_KEY=$COMFY_DEPLOYER_KEY comfy deploy -c agent.yaml| Variable | Default |
|---|---|
| PRIVATE_KEY | required to launch; a dry-run works without it |
| RPC_URL | http://localhost:8545 |
| ADDRESSES_PATH | the launchpad package's deployed-addresses.json |
Things that will bite you
- The first buy has a hard floor. It is derived from the ladder's start
price minus
slippage_bps, and a violation reverts the whole deploy rather than filling you at a worse price. Tighten it for small buys. - Tickers are unique. A collision reverts; pick a fresh one.
- The factory is allowlisted. If the deploy reverts with
0x82b42900, the signer is not a factory admin — the CLI translates that selector and two others rather than leaving you with four raw bytes.
Keys
The CLI reads PRIVATE_KEY from the environment and nowhere else. It will not
search your filesystem, shell history or other configs for one, it never prints
one, and if the variable is unset it stops and says so.
MIT.
