Skip to content
 
 

Latest commit

 

History

111 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenClawd

Solana-native financial AI agent stack. Package name: openclawd-ts. CLI: clawd.

$CLAWD mint: 8cHzQHUS2s2h8TzCmfqPKYiM4dSt4roa3n7MyRLApump

Pump.fun · DexScreener · openclawd.biz · @clawddevs

This checkout is a monorepo, not a single app. Root package.json is the gateway runtime (src/). Other packages live in their own folders and have their own install/build steps.


What this repo actually contains

Surface Path Package / entry Status in this checkout
Gateway runtime + financial agents src/ openclawd-tssrc/index.ts Present
Terminal UI tui/ clawd-code-tui-ts (bin: clawd) Present
Control UI + R3F ocean demo ui/ openclawd-control-ui Present
Leviathan on-chain runtime openclawd-framework/ @openclawd/leviathan Present
Static agent catalog agents/ @openclawd/agents Present (54 JSON agents)
Channel plugins extensions/ loaded by src/plugins/ 31 packages
Agent skills skills/ SKILL.md dirs + .hubs/ ~702 top-level entries
Memory server membrain/ Go membraned Present
LLM router docs ClawdRouter/ docs only Stub (no router source)
Solana Clawd solana-clawd/ Placeholder (.cache/ only)
Git hooks (active) .githooks/ core.hooksPath Present
GitHub Actions .github/ secret-scan workflow Present
Legacy hooks git-hooks/ unused Present; not wired
Hook + scanner scripts scripts/ install-hooks.sh, scan-secrets.mjs Present
One-shot installer install.sh writes ~/.openclawd Present

Not in this checkout (docs still mention them): X/ (ClawdBot), open-router-skills/, tailclawd/, docs/ at repo root, services/pump-scanner-cron/.


Quick start

Requires Node ≥ 22 and pnpm ≥ 9.

git clone https://github.com/x402agent/openclawd-ts.git
cd openclawd-ts          # this tree is Openclawd2 locally
pnpm install             # also installs git hooks via prepare
cp .env.example .env     # then fill keys — never commit .env
pnpm typecheck
pnpm lint

Run the gateway CLI:

pnpm dev                 # tsx watch src/index.ts
# or after build:
pnpm build
node dist/index.js help
node dist/index.js agent trader
node dist/index.js extensions

Published TUI (separate package):

npm i -g clawd-code-tui-ts
clawd

Or from this repo:

cd tui && npm install && npm run dev

One-shot machine bootstrap (clones into ~/.openclawd, not this working tree):

curl -fsSL https://openclawd.biz/install.sh | bash

Architecture

                         Solana (Helius · Jupiter · DFlow · pump.fun)
                                          │
     ┌──────────────┬─────────────────────┼──────────────────┬─────────────┐
     │              │                     │                  │             │
  src/           tui/              openclawd-framework/    ui/        membrain/
  gateway        Ink TUI           leviathan spawn/pulse   Lit + R3F  gRPC memory
  agents         slash cmds        Metaplex identity       ocean.html
  plugins ──── extensions/         skills loader
                   │
              skills/  ← OPENCLAWD_SKILL_PATH + ~/.openclawd/skills + repo skills/
              agents/  ← static JSON catalog (@openclawd/agents), not runtime classes

Two different agents trees:

  • src/agents/ — runtime classes: Trader, Scanner, Analyst, Monitor
  • agents/ — published JSON catalog + Cloudflare gateway worker for openclawd.biz

Two different skill systems:


Directory map

src/ — gateway (openclawd-ts)

Entry: src/index.ts. Commands: help, agent, swap, scan, wallet, status, version, plus extensions.

Path Role
src/agents/ Trader, Scanner, Analyst, Monitor, clone, runtime, skill-registry
src/cli/clawd.ts CLI help + command dispatch
src/gateway/ OpenRouter handlers, device auth
src/plugins/ Loads extensions/*/index.ts
src/services/ birdeye, helius, jupiter, pumpfun, memory, openrouter
src/routing/, src/sessions/, src/shared/ session routing helpers
src/commands/, src/tools/, src/skills/, src/wallet/ empty placeholders

Root scripts (from package.json):

pnpm typecheck          # tsc --noEmit (src/ only)
pnpm build              # tsc → dist/
pnpm test               # vitest run (no src tests currently)
pnpm lint               # oxlint src
pnpm format             # oxfmt src
pnpm check              # typecheck + lint + scan:secrets  (does not run tests)
pnpm scan:secrets       # working-tree secret scan
pnpm hooks:install      # git config core.hooksPath .githooks

tui/clawd-code-tui-ts

Ink + React terminal. Bin: clawddist/cli.js. Reads .env from CWD then walks up. Slash commands include /skills (lists skills/ directories).

cd tui && npm install && npm run dev

ui/ — control UI + ocean

Vite multi-page: Lit control UI (index.html) and React Three Fiber colony (ocean.html).

cd ui && npm install && npm run dev     # http://localhost:5173/ocean.html
npm run build && npm run preview

See UI.md.

openclawd-framework/@openclawd/leviathan

Sovereign agent runtime: Sense → Think → Strike → Drift. On-chain spawn via Metaplex. Constitution: openclawd-framework/three-laws.md.

cd openclawd-framework && pnpm install && pnpm build
node dist/index.js --help
node dist/index.js --spawn --name Snippy --creator <PUBKEY>   # needs CREATOR_PUBKEY
npx tsx examples/ooda-loop.ts

Nine examples in openclawd-framework/examples/: blockchain-buddies-demo, listen-wallet, ooda-loop, x402-solana, auto-research-client, lobster-trader, orchestrator-client, clawd-wallet-demo, x402-payment-demo.

Leviathan state: ~/.openclawd/ (keystore.json, SHELL.md, shell.db).

Depth tiers (USDC): deep ≥ $5 · shallow ≥ $1 · shoreline ≥ $0.10 · beached = $0.

agents/@openclawd/agents

54 JSON agent definitions under agents/src/, built to agents-catalog.json. Separate Cloudflare worker in agents/gateway/. Build expects bun (bun run build).

extensions/ — 31 channel plugins

Loaded by src/plugins/registry.ts. Top-level packages:

birdeye · bluebubbles · copilot-proxy · diagnostics-otel · discord · google-antigravity-auth · google-gemini-cli-auth · googlechat · imessage · line · llm-task · lobster · matrix · mattermost · memory-core · memory-lancedb · minimax-portal-auth · msteams · nextcloud-talk · nostr · open-prose · qwen-portal-auth · signal · slack · telegram · tlon · twitch · voice-call · whatsapp · zalo · zalouser

pnpm build
node dist/index.js extensions

skills/ — bundled + hub-linked skills

~702 top-level entries. Most extra skills are symlinks into local hubs (not copies). Hidden index: skills/.hubs/.

Hub link Source
.hubs/skillhub cheshireterminal.ai/skills / local skillhub-main/skills
.hubs/solizardking github.com/Solizardking/skills
.hubs/cheshire-terminal Cheshire Terminal skill dump
.hubs/cheshireterminal-ai-store curated store
.hubs/openclaw-skills OpenClaw extra skills
.hubs/anthropic-skills Anthropic skill pack

Discovery order (leviathan): $OPENCLAWD_SKILL_PATH~/.openclawd/skills/<repo>/skills/.

Curated subset: skills/catalog.json (9 slugs). Human catalog notes: SKILLS.md.

TUI /skills lists top-level names in this folder.

membrain/ — memory substrate

Go gRPC server (cmd/membraned) plus TypeScript/Python/OpenClawd clients. Episodic / semantic / competence / plan-graph memory.

cd membrain && make build && ./bin/membraned
make test

See MEMEBRANE.md and membrain/README.md.

ClawdRouter/

Documentation stub for @openclawd/clawd-router. No router implementation in this folder. Env keys: OPENROUTER_API_KEY, CLAWDROUTER_DEFAULT_REASONING, CLAWDROUTER_DEFAULT_LONGCTX.

solana-clawd/

Empty placeholder (Go module cache only). Not a buildable package.

.githooks/ + scripts/ + .github/

Active hooks (pnpm installpreparescripts/install-hooks.sh):

  • .githooks/pre-commit — blocks node_modules/ / dist/ / build dirs; runs scripts/scan-secrets.mjs --staged
  • .githooks/pre-push — range scan
  • .github/workflows/secret-scan.yml — PR range scan; full tree on push to main

git-hooks/pre-commit is legacy and not installed. It calls a missing scripts/format-staged.js.

install.sh

Bootstraps ~/.openclawd, globally installs clawd-code-tui-ts, optionally clones this repo and sets up tailclawd. It does not install into the current working tree.


Docs in this tree

File What it is
AGENTS.md Agent-facing platform identity and conventions
CLAW.md Clawd persona, tools, memory tiers
CLAWD.md Trading strategy, OODA, MCP tool names
CLAWDBOT.md ClawdBot runbook — expects X/, which is not in this checkout
ARTICLE.md Long-form leviathan essay
CONTRIBUTING.md pnpm setup, PR hygiene
SECURITY.md Advisories + secret-scan policy
SKILLS.md Skill catalog notes (some paths stale)
UI.md How to run ui/
MEMEBRANE.md Membrain intro
LICENSE MIT, Copyright 2026 OpenClawd contributors

Environment

Copy .env.example.env. The live file is gitignored. dotenv keeps the first occurrence of each key — do not duplicate names.

Minimum for RPC reads:

HELIUS_API_KEY=
SOLANA_RPC_URL=

Also commonly used: XAI_API_KEY or OPENROUTER_API_KEY (models), SOLANA_PRIVATE_KEY (signing), CREATOR_PUBKEY (leviathan spawn), OPENCLAWD_SKILL_PATH (extra skill roots), Twitter/Telegram keys for ClawdBot if you restore X/.

Full key list is in .env.example. Do not commit filled values. See SECURITY.md.


$CLAWD

Mint 8cHzQHUS2s2h8TzCmfqPKYiM4dSt4roa3n7MyRLApump
Chain Solana
Site openclawd.biz
X @clawddevs

Smoke test

From repo root, after pnpm install and a filled .env:

# Root gateway (src/ only). Prefer ./node_modules/.bin if pnpm scripts re-run install.
./node_modules/.bin/tsc --noEmit
./node_modules/.bin/oxlint src
node scripts/scan-secrets.mjs --all
./node_modules/.bin/tsc
node dist/index.js version
node dist/index.js help
node dist/index.js extensions
pnpm test                         # vitest.config.ts includes src/** only

# Hooks
git config --get core.hooksPath    # expect .githooks
test -x .githooks/pre-commit && test -x .githooks/pre-push

# Skills visibility
test -d skills/.hubs/skillhub
test -f skills/solana-dev/SKILL.md
test -f skills/cheshire-terminal/SKILL.md

# Subpackages (install each as needed)
cd tui && npm install && npx tsc --noEmit
cd ../ui && npm install && npm run build
cd ../openclawd-framework && pnpm install && pnpm build && node dist/index.js --help
cd ../membrain && make build

pnpm typecheck / pnpm lint re-run pnpm install first. On pnpm 10+, that can exit 1 until native builds are allowed (esbuild, bufferutil, utf-8-validate, @openrouter/sdk in pnpm.onlyBuiltDependencies).

node dist/index.js extensions lists 31 packages. None load until each extension's own deps are installed (openclawd, @sinclair/typebox, …). Expect skipped (no index entry) or missing-package failures in a root-only install.


License

MIT — see LICENSE.

About

OpenClawd is a full-stack autonomous AI agent platform built for Solana DeFi. It combines a multi-channel gateway runtime, 31 channel extensions, a Go-based memory substrate, and ClawdBot — a 24/7 autonomous trading agent on X and Telegram.

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages