@echoclaw/echo-0g
v1.4.8
Published
EchoClaw CLI for 0G Network
Readme
EchoClaw CLI
One CLI surface for building and operating on the 0G ecosystem from terminal or AI agents. The core principle is simple: if a framework can execute CLI commands, it can use EchoClaw.
What This Package Is Today
As of March 7, 2026, EchoClaw is in a practical hybrid state:
- Provider-agnostic core exists across wallet, transfers, Jaine, ChainScan, EchoBook, Slop modules, MarketMaker runtime, and update runtime.
- Multi-provider skill linking exists (
openclaw,claude,claude-code,codex,other). - Claude Code now has a dedicated local backend path (guided flow, proxy, config inject/remove/restore).
- OpenClaw-specific integration is still the deepest agent/gateway path (guided launcher flow, hooks/gateway wiring, compute config patching, restart guidance).
Candor on boundaries:
- If you are not using OpenClaw, core CLI commands still work.
- OpenClaw hook/gateway flows are not provider-agnostic and require OpenClaw runtime to deliver notifications.
Install
npm install -g @echoclaw/echo-0gRequires Node.js >= 20.
Start Here
For humans, the supported entrypoint is now:
echo0g echoecho0g echo is the guided launcher for:
- connecting OpenClaw, Claude Code, Codex, or another agent runtime
- funding your shared 0G compute wallet / ledger / provider balance
- exploring safe read-only parts of the ecosystem
- checking status, diagnostics, and support data
- handling Claude config remove / restore / proxy lifecycle from one place
The first screen is task-first:
Connect my AIFund my AI in 0GBridge / Cross-ChainExplore EchoWallet & KeysManage / FixAdvanced
Runtime Notes
OpenClaw
Use echo0g echo, then choose Connect my AI -> OpenClaw.
This path gives you:
- OpenClaw skill linking and environment wiring
- hook routing configuration through the existing
setup openclaw-hooksflow - compute funding + monitoring guidance
- restart guidance when env/config changes need a gateway reload
Important boundary:
- monitor notifications depend on OpenClaw-compatible hook routing
- the launcher only offers monitor notifications when the selected runtime is OpenClaw
Claude Code
Use echo0g echo, then choose Connect my AI -> Claude Code.
This path gives you a local Claude Code backend on top of 0G Compute:
- guided provider/model selection
- funding, ACK, and API key creation
- local Claude settings injection
- local translation proxy on
127.0.0.1 - remove / restore flow for Claude config
Default Claude integration target:
- project-local
.claude/settings.local.json
Advanced follow-up commands stay available under the new root:
echo0g echo claude proxy status
echo0g echo claude config show
echo0g echo claude config inject --scope project-local|user|project-shared
echo0g echo claude config remove
echo0g echo claude config restoreImportant integration details:
- EchoClaw merges only its managed Claude keys into the target settings file; it does not replace the whole file.
- Injected aliases pin Claude
sonnet,opus,haiku, and subagents to the selected0G-<provider-model>label. removeremoves only untouched EchoClaw-managed keys;restorereplays the full pre-injection snapshot.- Context compaction remains Claude Code behavior; EchoClaw provides the local gateway path and token-count estimate.
Codex / Other frameworks
Use echo0g echo, then choose Connect my AI -> Codex or Other.
Human-first path:
- the launcher links the skill when auto-linking is supported
- if auto-link is not possible, it shows the exact manual source path and next steps
Low-level agent surface still exists:
echo0g skill install --provider codex|other --scope user|project
echo0g skill path --jsonAI Agent Platforms (MVP)
| Platform | Install targets (--scope user / --scope project) | Auto-link behavior | Current support |
|---|---|---|---|
| OpenClaw | ~/.openclaw/skills/echo0g (+ workspace mirror), project: <cwd>/skills/echo0g | Linked automatically | Full integration: guided launcher path, hooks, monitoring, automation |
| Claude Code | ~/.claude/skills/echo0g, project: <cwd>/.claude/skills/echo0g | Linked automatically | Guided local backend: alias/subagent pinning, proxy, config inject/remove/restore |
| Codex | ~/.agents/skills/echo0g, project: <cwd>/.agents/skills/echo0g | Linked automatically | Skill linking + manual CLI commands |
| Other | Source path only (returned by CLI) | Always manual_required (no auto-link) | Manual fallback path output |
Human-first vs agent-first
EchoClaw now deliberately separates:
human-first:echo0g echoagent-first:echo0g echo ... --jsontask flows plus low-level module commands That means:- people should start with
echo0g echo - agents should prefer the task-first planner/executor surface when the user asks for setup, repair, funding, or verification:
echo0g echo connect --plan --json
echo0g echo connect --apply --runtime claude-code --json
echo0g echo fund --plan --json
echo0g echo fund --apply --provider <addr> --amount 1 --json
echo0g echo verify --runtime openclaw --json
echo0g echo status --json
echo0g echo doctor --json
echo0g echo support-report --json- skills and automations can still call explicit low-level commands like
wallet,0g-compute,jaine,chainscan,slop,echobook,0g-storage, andskill install - the old public runtime roots
onboard,openclaw,claude, and0g-compute wizard/openclaware no longer the supported human entrypoints
0G Compute: How It Fits
0G Compute itself is a decentralized inference network (official overview): https://docs.0g.ai/developer-hub/building-on-0g/compute-network/overview
For humans, start with echo0g echo and choose Fund my AI in 0G.
That flow covers:
- live provider/model discovery
- pricing-aware recommendations (min locked 0G)
- ledger deposit and provider funding
- signer ACK + API key creation
- live balance refresh without stale broker cache
- optional monitor start/stop when the runtime is OpenClaw
The low-level compute surface remains available for agents and advanced users:
echo0g 0g-compute setup --json
echo0g 0g-compute providers --detailed --with-balances --fresh --json
echo0g 0g-compute provider <address> info --fresh --json
echo0g 0g-compute ledger status --json
echo0g 0g-compute monitor start --daemonImportant runtime boundary:
- monitor notifications depend on
OPENCLAW_HOOKS_*routing and an OpenClaw-compatible gateway - Claude Code uses a local Anthropic-to-OpenAI proxy because the live 0G broker currently exposes OpenAI
/chat/completions, not Anthropic/v1/messages, on the deployed path - Codex/other runtimes still use skill linking plus direct CLI orchestration
Core Module Surface
| Module | What it does | |---|---| | Wallet | Create/import wallet, inspect native and Khalani-backed balances | | Transfers | Native 0G transfer with prepare -> confirm intent flow | | Jaine DEX | Pools, swaps, allowances, LP operations | | Jaine Subgraph | Read-only DEX intelligence and analytics | | 0G Compute | Provider/account setup, funding, API keys, readiness checks | | MarketMaker | Trigger-based trading daemon | | Update | One-shot package auto-update on CLI use | | ChainScan | On-chain data queries | | EchoBook | Social feature command set | | Slop Bonding | On-chain token lifecycle commands on Slop bonding curve | | Slop Stream | Real-time token stream ingestion | | Slop App | slop.money app-layer API commands | | 0G Storage | Durable agent storage: file upload/download, virtual drive, notes, snapshots |
Most Used Commands
# Human-first launcher
echo0g echo
echo0g echo connect --plan --json
echo0g echo connect --apply --runtime openclaw --json
echo0g echo fund --plan --json
echo0g echo fund --apply --provider <addr> --amount 1 --json
echo0g echo verify --runtime claude-code --json
echo0g echo status --json
echo0g echo doctor --json
echo0g echo support-report --json
# Claude Code local backend
echo0g echo claude
echo0g echo claude proxy status
echo0g echo claude config show
# Skill linking (multi-provider)
echo0g skill install --provider openclaw|claude|codex|other
# Wallet + transfers
echo0g wallet ensure --json
echo0g wallet balance --json
echo0g wallet balances --json
echo0g wallet address --chain solana --json
echo0g send prepare --to <address> --amount <0G> --json
echo0g send confirm <intentId> --yes --json
# Khalani / cross-chain
echo0g khalani chains --json
echo0g khalani tokens top --json
echo0g khalani quote --from-chain eth --to-chain base --from-token 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 --to-token 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 --amount 1000000 --json
echo0g khalani quote --from-chain eth --to-chain base --from-token 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 --to-token 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 --amount 1000000 --stream --json
echo0g khalani bridge --from-chain eth --to-chain base --from-token 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 --to-token 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 --amount 1000000 --dry-run --json
echo0g khalani orders --json
# Jaine
echo0g jaine pools scan-core --json
echo0g jaine swap sell w0G USDC --amount-in 1 --dry-run --json
echo0g jaine lp list --json
# Automation
echo0g marketmaker order add --json
echo0g marketmaker start --daemon
echo0g marketmaker status --json
# Compute monitor
echo0g 0g-compute monitor start --daemon
# Updates
echo0g update enable
echo0g update status --json
echo0g update check --jsonHooks, Notifications, and Daemons
OpenClaw-only boundary
setup openclaw-hooks and setup test-hooks are designed for OpenClaw gateway architecture.
echo0g setup openclaw-hooks --base-url <url> --token <secret> --channel <ch> --to <recipient>
echo0g setup test-hooks --json
echo0g setup test-hooks --probe-live --jsonWhat this means for non-OpenClaw setups:
- Long-lived daemon webhook notifications depend on
OPENCLAW_HOOKS_*routing and OpenClaw-compatible/hooks/agentendpoint. - Running daemons from Claude/Codex still requires an OpenClaw gateway (or equivalent compatible endpoint) for those notifications to be delivered.
Advanced diagnostics:
setup test-hooks --json: dry validation (token sync, gateway-token consistency checks, routing checks, payload construction).setup test-hooks --probe-live --json: sends real webhook probes to gateway and can create remote session turns.
Gateway Restart Required (Manual Setup)
When setup password or setup openclaw-hooks writes env/config changes, restart is required so OpenClaw host/container reloads them.
Host flow:
openclaw gateway restart
# then send /restart in chatContainer flow:
docker compose -f ~/openclaw/docker-compose.yml restart
echo0g 0g-compute monitor start --from-state --daemon
# then send /restart in chatAuto-Update
Auto-update is enabled by default. On the first ordinary CLI command (everything except echo and update), including --json and other headless/non-TTY runs, ECHO_AUTO_UPDATE=1 is written to ~/.config/echo0g/.env (+ OpenClaw mirror) if no explicit preference exists. The update check then runs as a one-shot background install and uses npm install -g without blocking the command.
Preference commands:
echo0g update enable— turns auto-update on for CLI use, including headlessecho0g update disable— turns auto-update off for CLI useecho0g update check— read-only manual version checkecho0g update status— shows current preference, last check state, and any legacy artifacts
Compatibility aliases:
echo0g update start->echo0g update enableecho0g update stop->echo0g update disable
Opt-out paths:
echo0g update disable— prevents automatic package installECHO_AUTO_UPDATE=0in.env— explicit opt-out, not overridden by default seedingECHO_DISABLE_UPDATE_CHECK=1— disables the entire update check flow (not just auto-install)
Headless mode (--json and non-TTY) now follows the same default seeding and one-shot auto-update flow. You do not need echo0g update enable just because a workflow is automated. Bootstrap-exempt roots (echo, update) still skip seeding/checking, and ordinary commands skip default seeding only when an explicit preference exists, ECHO_DISABLE_UPDATE_CHECK=1, or legacy update.stopped is migrated first.
Commands that manage update preferences (echo, update) skip auto-update seeding and checking in their preAction to avoid side effects before the user makes a choice.
Legacy note:
update.stoppedis migrated best-effort intoECHO_AUTO_UPDATE=0during ordinary-command CLI bootstrap.update.pid,update.shutdown, andupdate-state.jsonare legacy cleanup artifacts only. The update daemon is no longer part of the runtime model.
Daemon Lifecycle and Resurrection
Two daemon families use PID/state/stopped marker files:
| Daemon | Files | Auto-resurrection condition |
|---|---|---|
| BalanceMonitor | monitor.pid, monitor-state.json, monitor.stopped | monitor-state.json exists and no monitor.stopped |
| MarketMaker | bot.pid, orders.json, bot.stopped | orders.json exists with at least one armed order and no bot.stopped |
Marker semantics:
- Explicit
startclears.stopped. - Explicit
stop(including SIGTERM/shutdown-file/SIGKILL stop paths) writes.stopped. - Daemons are auto-respawned only when runtime says they should be running and marker state allows it.
Auto-update is separate:
- package updates are not a daemon family anymore,
- the updater runs one-shot on CLI use,
- preference lives in
ECHO_AUTO_UPDATE/ECHO_DISABLE_UPDATE_CHECK.
Developer detail:
- Child daemon spawns use
ECHO_NO_RESURRECT=1to prevent recursive resurrection loops. - Auto-update preference is centralized in
src/update/auto-update-preference.ts— single source of truth forisAutoUpdateEnabled().
Security Model
| Feature | Current behavior |
|---|---|
| Password read precedence | process.env -> ~/.config/echo0g/.env -> ~/.openclaw/.env mirror -> legacy openclaw.json |
| Password sanitization | Empty string and literal "undefined" are treated as missing |
| Password write default | Dual-write to app .env (chmod 600) + OpenClaw .env mirror |
| Password legacy path | setup password --to-config writes to openclaw.json (legacy/deprecated) |
| Wallet key encryption | AES-256-GCM with scrypt KDF |
| Transfer safety | Mandatory 2-step prepare -> confirm |
| Headless guardrails | echo requires TTY; wallet mutations blocked by default unless ECHO_ALLOW_WALLET_MUTATION=1; interactive setup password prompt blocked unless --from-env or --password |
| On-chain confirmations | Chain-writing 0g-compute actions require explicit --yes |
| Secret handling | Tokens/keys are masked in output/log paths |
| Writes | Atomic write strategy for config/env updates |
Troubleshooting
Common quick fixes:
- Stale PID daemon errors (monitor/marketmaker): run matching
stopfirst to clear stale PID path, then runstart. - Hook token mismatch:
echo0g setup openclaw-hooks --token <tok> --force. - Webhooks accepted but not delivered: ensure both
OPENCLAW_HOOKS_CHANNELandOPENCLAW_HOOKS_TOare configured.
V2 / Deferred
The Khalani cross-chain surface is being added in staged form. A few parts are intentionally deferred until the execution contract is clearer or the extra complexity is justified.
PERMIT2live executev1supports quote/build visibility and dry-run only.- We are not enabling live CLI execution until Khalani exposes a canonical execution payload or ABI contract for safe submit/broadcast without guessing.
- Solana
TRANSFERdeposit methodv1targets the standard SolanaCONTRACT_CALLpath returned by Khalani.- Native support for SPL-style transfer deposits can be added later if real routes require it.
- Advanced custom RPC overrides per chain
v1plans to use RPC metadata returned by Khalani chain definitions.- Per-chain manual overrides should only be added if real reliability issues appear with public RPCs.
Priority for v1: stable quote -> build -> execute -> order tracking across EVM and Solana, not maximum coverage of every deposit variant on day one.
Already implemented in v1:
- streaming quotes via
echo0g khalani quote --stream --json - NDJSON output with
type: "route"events and a finaltype: "complete"summary - multi-chain
wallet balanceswith Khalani token balances plus live native balances
Current Skill Docs (Only What Exists Now)
Use only these packaged skill docs as authoritative right now:
| Skill file | Purpose |
|---|---|
| skills/echo0g/SKILL.md | Router skill: baseline execution rules and module selection |
| skills/echo0g/references/wallet-transfers.md | Wallet lifecycle, transfer flow, config, guardrails |
| skills/echo0g/references/jaine-dex.md | Jaine execution commands (swap/LP/allowance/w0G) |
| skills/echo0g/references/jaine-subgraph.md | Read-only market analytics via subgraph |
| skills/echo0g/references/slop-bonding.md | Bonding-curve token lifecycle and trading flow |
| skills/echo0g/references/0g-compute.md | Provider setup, funding, API keys, monitor workflow |
| skills/echo0g/references/marketmaker.md | Trigger-based daemon trading and operations |
| skills/echo0g/references/slop-stream.md | Real-time token stream events |
| skills/echo0g/references/echobook.md | EchoBook social command surface |
| skills/echo0g/references/chainscan.md | Explorer-style on-chain intelligence |
| skills/echo0g/references/slop-app.md | slop.money app profile/chat/agent-query layer |
| skills/echo0g/references/0g-storage.md | Durable storage: file upload/download, virtual drive, notes, snapshots |
| skills/echo0g/references/khalani-cross-chain.md | Multi-chain chain/token discovery, quotes, bridge execution, order tracking, and Solana wallet handling |
Notes:
skills/echo0g/SKILL_old.mdis a legacy snapshot.
For AI Agents
Use machine-readable mode whenever possible:
echo0g <command> --jsonFind packaged skill location:
echo0g skill path --jsonDocumentation
- EchoClaw docs: https://echoclaw.ai/docs/overview/quick-start
- 0G Compute overview: https://docs.0g.ai/developer-hub/building-on-0g/compute-network/overview
Development
npm install
npm run build
npm testLicense
MIT
