Skip to content

Repository files navigation

Dark Clawd — forged from Ralph on Solana

GitHub stars v1.1.1 npm 171 tools 122 core Product hub MIT License

Install (live on npm)

Public package: @x402solana/dark-clawd@1.1.1 · Node ≥18 · Bun not required for consumers

# Preferred — global install from the public registry
npm install -g @x402solana/dark-clawd

# Verify
dark-clawd --help
dark-clawd welcome
dark-clawd status
Package @x402solana/dark-clawd (latest1.1.1)
Bins dark-clawd · clawd · clawd-tui (all → dist/cli.js, Node shebang)
Runtime Node.js ≥18 (no Bun at install or runtime)
Hub cheshireterminal.ai/dark-clawd
GitHub github.com/Solizardking/dark-clawd
npm npmjs.com/package/@x402solana/dark-clawd
Release v1.1.1
Hub handoff darkclawd.md — wire the product client on Cheshire Terminal

Alternate install paths

# One-shot installer (registry first, then GitHub release tarball)
curl -fsSL https://raw.githubusercontent.com/Solizardking/dark-clawd/main/tui/install.sh | bash

# Hub-hosted installer (when proxied by cheshireterminal.ai)
curl -fsSL https://cheshireterminal.ai/api/dark-clawd/install.sh | bash

# Release tarball mirror (works offline from npm registry)
npm install -g https://github.com/Solizardking/dark-clawd/releases/download/v1.1.1/x402solana-dark-clawd-1.1.1.tgz

# One-off without global install
npx @x402solana/dark-clawd --help

First commands after install

dark-clawd welcome          # hub · GitHub · install · next steps
dark-clawd tools            # 171 SOL GPT tools catalog
dark-clawd agent            # OpenRouter multi-turn tool loop (needs OPENROUTER_API_KEY)
dark-clawd run              # Bloomberg-style TUI
dark-clawd setup            # interactive env wizard

Publish surface: package is built and published from tui/ (prepack builds dist/cli.js + Node shebang).
Hub client work: give agents darkclawd.md to implement/support cheshireterminal.ai/dark-clawd.


          ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
        ▐█▌  ░▒▓█  D A R K   C L A W D  █▓▒░   · SOLANA · ONLINE  ▐█▌
          ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀

╔═══════════════════════════════════════════════════════════════════════════════╗
║                                                                               ║
║   ██████╗  █████╗ ██████╗ ██╗  ██╗     ██████╗██╗      █████╗ ██╗    ██╗██████╗ ║
║   ██╔══██╗██╔══██╗██╔══██╗██║ ██╔╝    ██╔════╝██║     ██╔══██╗██║    ██║██╔══██╗║
║   ██║  ██║███████║██████╔╝█████╔╝     ██║     ██║     ███████║██║ █╗ ██║██║  ██║║
║   ██║  ██║██╔══██║██╔══██╗██╔═██╗     ██║     ██║     ██╔══██║██║███╗██║██║  ██║║
║   ██████╔╝██║  ██║██║  ██║██║  ██╗    ╚██████╗███████╗██║  ██║╚███╔███╔╝██████╔╝║
║   ╚═════╝ ╚═╝  ╚═╝╚═╝  ╚═╝╚═╝  ╚═╝     ╚═════╝╚══════╝╚═╝  ╚═╝ ╚══╝╚══╝ ╚═════╝ ║
║                                                                               ║
║                         🦞  T E R M I N A L   I N T E L  🦞                   ║
║                                                                               ║
║              ◈  forged from Ralph on Solana  ·  OpenClawd lineage  ◈          ║
║                                                                               ║
╚═══════════════════════════════════════════════════════════════════════════════╝
  frame 0 ░░░░░░░░░░   frame 1 ▒▒▒▒▒▒▒▒▒▒   frame 2 ▓▓▓▓▓▓▓▓▓▓   frame 3 ██████████
  ░ CLAWD ░            ▒ CLAWD ▒            ▓ CLAWD ▓            █ CLAWD █
  ░●······░            ▒·●·····▒            ▓··●····▓            █···●···█
  ░·······░  boot…     ▒·······▒  link…     ▓·······▓  sync…     █·······█  LIVE

DARK CLAWD — Autonomous Solana Terminal Intelligence
Bloomberg TUI · 171 SOL GPT tools · OpenRouter agent harness
Forged from Ralph on Solana · OpenClawd terminal layer

"The chain never sleeps. Neither does the claw."

Dark Clawd is the OpenClawd terminal intelligence layer — a Bloomberg-style TUI, 171 non-custodial SOL GPT tools, and an OpenRouter multi-turn agent harness for Solana market surveillance, wallet context, Phoenix/Imperial perps, AI analysis, and holder operations.

npm @x402solana/dark-clawd@1.1.1
Bins dark-clawd · clawd · clawd-tui
Hub cheshireterminal.ai/dark-clawd
Repo github.com/Solizardking/dark-clawd
Release v1.1.1

Lineage: forged from Ralph on Solana — same recursive OODA heart, darker shell, claw-forward identity. Workspace lineage path: dark-ralph → Dark Clawd; OODA prompt: agent/RALPH.md.

┌──────────────────────────────────────────────────────────────────────────────┐
│  ████████████████████████████████████████████████████████████████████████████ │
│  █ █████ DARK CLAWD ● OPERATIONAL ████ Uptime: 00:04:35 ████ 8:36 AM ██████ │
│  ████████████████████████████████████████████████████████████████████████████ │
│  SOL $150.25 +2.34% │ BONK $0.00002345 +5.67% │ WIF $2.85 -1.20% │ JUP +3.80│
│ ┌────────────────────────────────────────┐ ┌────────────────────────────────┐ │
│ │ SOL/USDC │ 1H           $132.97        │ │ ORDER BOOK        SOL/USDC    │ │
│ │ 152.42 ▒██▒▒││││                    █  │ │ DEPTH  PRICE      SIZE       │ │
│ │       ▒█▒█▒▒││ │   ·                 ██│ │ ██████ 150.288   260.26      │ │
│ │         │▒│ ▒█▒▒▒││ ││██▒▒·│         ██│ │ ██████ 150.278   960.39      │ │
│ │ VOL▁▃▄▄▃▂▂▃▃▃▁▃▃▄▃▂▃▂▄▂▃▃▃▂▂▃▂▂▄▃▁▂▂▃▁│ │ ── SPREAD: 0.0405 ──          │ │
│ └────────────────────────────────────────┘ └────────────────────────────────┘ │
│ [1] MARKET [2] TRADING [3] PORTFOLIO [4] ANALYTICS [5] AGENT                │
└──────────────────────────────────────────────────────────────────────────────┘

🦞 SYSTEM ARCHITECTURE

┌─────────────────────────────────────────────────────────────────────────────┐
│                        DARK CLAWD ECOSYSTEM  v1.1.1                         │
│         cheshireterminal.ai/dark-clawd  ·  @x402solana/dark-clawd           │
├─────────────────────────────────────────────────────────────────────────────┤
│                                                                             │
│  ┌──────────────────┐  ┌──────────────────┐  ┌──────────────────────────┐   │
│  │  BLOOMBERG TUI   │  │  OPENROUTER      │  │  SOL GPT TOOL CATALOG    │   │
│  │  dark-clawd run  │  │  AGENT HARNESS   │  │  171 tools (122 core)    │   │
│  │  Ink + React     │  │  dark-clawd agent│  │  dark-clawd tools        │   │
│  │  Market/Perps/   │  │  multi-turn loop │  │  Phoenix 23 · Imperial 32│   │
│  │  Automaton views │  │  core tools on   │  │  Tracker 60 · Helius 8   │   │
│  └────────┬─────────┘  │  every turn      │  │  + market/wallet/trade   │   │
│           │            └────────┬─────────┘  └────────────┬─────────────┘   │
│           └─────────────────────┼──────────────────────────┘                │
│                                 ▼                                           │
│  ┌──────────────────────────────────────────────────────────────────────┐   │
│  │  SERVICES  Birdeye · Helius · Phoenix · Imperial · Solana Tracker    │   │
│  │            OpenRouter · Grok · Perplexity · DFlow · Browser Use      │   │
│  │  CUSTODY   prepare_* = user-signed only · server never holds keys    │   │
│  └──────────────────────────────────────────────────────────────────────┘   │
│                                                                             │
│  SUBSYSTEMS  automaton/ · agent/ (Ralph OODA) · mpp/ · llm-wiki-tang/       │
└─────────────────────────────────────────────────────────────────────────────┘

🚀 QUICK START

Install is at the top of this README — package is live on npm as @x402solana/dark-clawd@1.1.1.
Hub client handoff for Cheshire: darkclawd.md.

Surface URL
Product hub cheshireterminal.ai/dark-clawd
GitHub github.com/Solizardking/dark-clawd
npm @x402solana/dark-clawd
Release v1.1.1
Tools docs docs/SOL_GPT_TOOLS.md
Hub handoff darkclawd.md

First commands (after npm install -g @x402solana/dark-clawd)

# bins: dark-clawd · clawd · clawd-tui
dark-clawd welcome
dark-clawd --help
dark-clawd status
dark-clawd setup

# 171 SOL GPT tools
dark-clawd tools
dark-clawd tools list --group phoenix
dark-clawd tools search wallet
dark-clawd tools run get_price --arg mint=<MINT>
dark-clawd tools run search_tools --arg query=imperial

# OpenRouter agent harness (multi-turn tool loop)
export OPENROUTER_API_KEY=sk-or-…          # https://openrouter.ai/settings/keys
dark-clawd agent
dark-clawd agent -m poolside/laguna-s-2.1:free -p "What is trending on Solana?"
dark-clawd agent --wallet <addr> --max-steps 12

# Bloomberg TUI
dark-clawd run
dark-clawd run --auto
dark-clawd run --wallet <addr>

Local development

git clone https://github.com/Solizardking/dark-clawd.git
cd dark-clawd
bun install
# optional: copy keys into .env / tui/.env
bun run run

# preferred package surface (what ships to npm)
cd tui && bun install && bun run build && node dist/cli.js tools

Python OODA loop (Ralph core)

python3 agent/loop.py --ticks 50 --sleep 0.0
python3 agent/loop.py --ticks 200 --sleep 0.4 --tui | python3 agent/tui.py
python3 agent/loop.py --ticks 50 --strategy llm --sleep 0.5

🧰 SOL GPT TOOL CATALOG (171)

Full non-custodial Solana tool surface (research + user-signed prepare) — same catalog the OpenRouter agent harness uses.

Group Id Tools Blurb
Phoenix Eternal phoenix 23 Perps research + user-signed trade prep
Imperial router imperial 32 Multi-venue perps (Jupiter / Flash / Phoenix / GMTrade)
Market data market 18 Prices, search, trending, memes, security
OHLCV & live tape ohlcv 10 Candles, live price, trades
Wallet & portfolio wallet 4 Net worth, PnL, assets, balances
Helius Wallet API helius 8 Identity, history, transfers, activity
Solana Tracker solanatracker 60 Portfolio, PnL, trending, DAS + RPC
Swaps & sends trading 5 Quotes + user-signed swap/transfer prep
Prediction markets prediction 3 DFlow / Kalshi read-only
Cloud browser browser 4 Browser Use research
Agents & DAS agents 2 Metaplex / agent discovery
Platform platform 2 search_tools, sponge status
Total 171 122 core · 49 specialty

Execution model

Mode Behavior
Research Tools return JSON (HTTP / RPC). No keys leave the host.
Live spends prepare_user_* / prepare_phoenix_*unsigned plans; your wallet signs. Server never holds private keys.
Agent loop dark-clawd agent loads 122 core tools every turn; specialty via search_tools then exact name. Stop: --max-steps (default 8).
Broadcast st_rpc_send_transaction only accepts already-signed txs.
dark-clawd tools catalog
dark-clawd tools list --core
dark-clawd tools list --group solanatracker
dark-clawd tools run list_phoenix_markets
dark-clawd tools run prepare_user_swap --arg inputMint=… --arg outputMint=… --arg amount=…
dark-clawd agent -p "Show Phoenix SOL-PERP mark and funding"

Full reference: docs/SOL_GPT_TOOLS.md


🤖 OPENROUTER AGENT HARNESS

dark-clawd agent is a create-agent-tui–style harness: model call → tool execution → stop conditions, wired to the SOL GPT catalog over OpenRouter Chat Completions (no private keys in the loop).

Flag Purpose
-m, --model <id> OpenRouter model (default poolside/laguna-s-2.1:free or env)
-p, --prompt <text> One-shot non-interactive turn
--max-steps <n> Max model↔tool steps per turn (default 8)
--wallet <addr> Default wallet for portfolio / perps tools
-q, --quiet Less step/usage noise
export OPENROUTER_API_KEY=sk-or-…
export OPENROUTER_DEFAULT_MODEL=poolside/laguna-s-2.1:free   # optional
dark-clawd agent
# REPL: type naturally · /tools · /exit

Requires OPENROUTER_API_KEYopenrouter.ai/settings/keys.


🎮 COMMAND MATRIX

CLI

╔══════════════════════════════════════════════════════════════════════════╗
║  dark-clawd / clawd / clawd-tui                            v1.1.1        ║
║  ──────────────────────────────────────────────────────────────────────  ║
║  welcome · --help · info · status · setup · wallet                       ║
║  run [--auto|--interactive|--wallet|--headless]              Bloomberg   ║
║  tools · tools list|search|run|catalog                       171 tools   ║
║  agent [-m model] [-p prompt] [--max-steps] [--wallet]       OpenRouter  ║
║  trade · automate · sandbox · kit                            automation  ║
║  automaton status|constitution|paths                         bridge      ║
╚══════════════════════════════════════════════════════════════════════════╝

TUI Keyboard Shortcuts

Key Action
1 Market view
2 Trading view
3 Portfolio view
4 Analytics view
5 Agent view
6 Perps view
7 Automaton view (sovereign runtime bridge)
Tab Cycle display mode
H Help overlay
R Refresh all data
A Jump to Automaton view
Q / Esc Quit

Agent Commands

Command Description
/help Show command matrix
/analyze Run market analysis
/trending Show trending Solana tokens
/wallet Display wallet context
/price <addr> Get token price
/news Fetch crypto news
/search <query> Search through Grok
/research <topic> Deep research via Perplexity
/perps List Phoenix perpetual markets
/perp <sym> Inspect one perp market
/prophecy Generate Dark Clawd prediction
/think Trigger recursive thought spiral
/stats Display system statistics
/automaton Automaton bridge status (sovereign runtime)
/automaton constitution Clawd Automaton constitution excerpt
/tools SOL GPT catalog summary (171 tools)
/tools search <q> Search catalog
/tools run <name> k=v Run one tool (non-custodial)
/mode <type> Switch auto / interactive
/clear Clear message history

🤖 AUTOMATON (SOVEREIGN RUNTIME)

Dark Clawd vendors Automaton under automaton/ — the self-improving, survival-pressured agent loop (heartbeat, Conway, replication, immutable Clawd constitution).

# Bridge status (no Conway provision required)
bun run automaton:status
bun run automaton:constitution
bun run automaton:paths

# Full runtime lifecycle
bun run automaton:install
bun run automaton:build
bun run automaton:test
cd automaton && node dist/index.js --run
Surface Path
Bridge API src/services/automaton-bridge.ts
Runtime automaton/src/
Creator CLI automaton/packages/cli/
Scripts automaton/scripts/
Constitution automaton/constitution.md
Integration guide docs/AUTOMATON_INTEGRATION.md

🧠 AUTONOMOUS AGENT

The Clawd OODA Loop (Observe–Orient–Decide–Act) is the beating heart — forged from Ralph on Solana:

┌─────────────────────────────────────────────────────────────────────┐
│                    DARK CLAWD OODA LOOP                             │
│                 (forged from Ralph on Solana)                       │
│                                                                     │
│   ┌─────────┐     ┌──────────┐     ┌─────────┐     ┌────────┐     │
│   │ OBSERVE │────▶│  ORIENT  │────▶│ DECIDE  │────▶│  ACT   │     │
│   │ Market  │     │ Analyze  │     │ Hold /  │     │ Execute │     │
│   │ Data    │     │ Context  │     │ Open /  │     │ Action  │     │
│   └─────────┘     └──────────┘     │ Close   │     └────────┘     │
│                                     └─────────┘                    │
│                                          │                         │
│                                    ┌─────▼─────┐                   │
│                                    │  Journal   │                   │
│                                    │ ticks.jsonl│                   │
│                                    └───────────┘                   │
│                                                                     │
│   Strategy Modes: rule_based │ llm │ hybrid                         │
│   Safety: kill-switch │ size caps │ paper-only │ devnet-only       │
│   PnL: win rate │ Sharpe │ max drawdown │ equity                   │
└─────────────────────────────────────────────────────────────────────┘
  ░ → ▒ → ▓ → █ → ▓ → ▒ → ░     recursive pulse
  O     O     D     A     …     never idles on mainnet noise

Agent Safety Contract

Guarantee Enforcement
Paper-only mode loop.py rejects non-paper modes
Devnet-only Mainnet RPC URLs rejected
No signing No private key handling in v1
Position caps max_position_size_lamports enforced
One position at a time Second open rejected
Kill-switch Exit on N consecutive losses
Full journaling Append-only journal/ticks.jsonl

🔌 SERVICE INTEGRATIONS

Service Enables
OpenRouter Agent harness + model routing (dark-clawd agent)
Helius Solana RPC, DAS, balances, history
Birdeye Prices, OHLCV, trending, security
Phoenix Perps Eternal markets, funding, user-signed prepare
Imperial Multi-venue perps intel (read-only)
Solana Tracker Portfolio, PnL, trending, DAS + RPC (60 tools)
DFlow Spot quotes / prediction markets
xAI Grok / Perplexity / Moonshot Optional research / chat providers
Browser Use Cloud browser research tools

Configuration

Create .env (or ~/.darkclawd/config.env — also written by install.sh):

# —— Agent harness (OpenRouter) ——
OPENROUTER_API_KEY=
OPENROUTER_DEFAULT_MODEL=poolside/laguna-s-2.1:free
OPENROUTER_MODEL=

# —— Market / chain ——
HELIUS_API_KEY=
HELIUS_RPC_URL=
BIRDEYE_API_KEY=
SOLANA_WALLET=
PHOENIX_API_URL=https://perp-api.phoenix.trade
IMPERIAL_API_BASE=https://api.imperial.space/api/v1

# —— Solana Tracker (60 tools) ——
SOLANA_TRACKER_API_KEY=
SOLANA_TRACKER_RPC_URL=
SOLANA_TRACKER_RPC_API_KEY=

# —— Optional ——
XAI_API_KEY=
PERPLEXITY_API_KEY=
MOONSHOT_API_KEY=
DFLOW_API_URL=
BROWSER_USE_API_KEY=
NEWS_API_KEY=
SERP_API_KEY=
CLAWD_AUTO_MODE=true
CLAWD_SANDBOX_PORT=18790

📁 PROJECT LAYOUT

dark-clawd/                      # github.com/Solizardking/dark-clawd
├── package.json                 # workspace meta (@x402solana/dark-clawd)
├── README.md · CHANGELOG.md · LICENSE
│
├── tui/                         # ★ Preferred npm surface (publish from here)
│   ├── package.json             # @x402solana/dark-clawd@1.1.1
│   ├── install.sh               # one-shot installer
│   ├── CHANGELOG.md · README.md
│   ├── scripts/fix-shebang.mjs  # Node shebang for npm bins
│   └── src/
│       ├── cli.tsx              # dark-clawd CLI entry
│       ├── product.ts           # hub / github / npm identity
│       ├── agent/               # OpenRouter harness
│       ├── tools/               # 171 SOL GPT catalog + runner
│       ├── engine/clawd-agent.ts
│       ├── services/            # birdeye · helius · phoenix · trade · sandbox
│       └── components/          # Bloomberg TUI panels
│
├── src/                         # monorepo root TUI (dev twin)
├── agent/                       # Python OODA (Ralph) loop
├── automaton/                   # Sovereign runtime bridge
├── mpp/ · llm-wiki-tang/
└── docs/
    ├── SOL_GPT_TOOLS.md         # full 171-tool reference
    ├── AUTOMATON_INTEGRATION.md
    ├── BIRDEYE_INTEGRATION.md
    └── OPENCLAWD_ADAPTATION.md

🛠️ BUILT WITH

Layer Stack
CLI / package Node ≥18, Commander, TypeScript, bun build --target node
TUI Bun + Ink + React
Solana @solana/web3.js, Helius, Birdeye, Phoenix Rise SDK
Agent OpenRouter Chat Completions tool loop
OODA Python 3.10+ (stdlib)
Automation Fly sandbox · MPP (HTTP 402)

🔗 LINKS

Surface URL
Product hub https://cheshireterminal.ai/dark-clawd
GitHub https://github.com/Solizardking/dark-clawd
Release v1.1.1 https://github.com/Solizardking/dark-clawd/releases/tag/v1.1.1
npm https://www.npmjs.com/package/@x402solana/dark-clawd
OpenClawd site https://solanaclawd.com
Holder vault https://solanaclawd.com/vault
Chat & voice https://solanaclawd.com/chat
Trading console https://solanaclawd.com/trading
Agent API https://agents.openclawd.biz

📈 PERFORMANCE METRICS

After each Python OODA agent run, a PnL summary is output:

============================================================
  DARK CLAWD v1 — SUMMARY
  (forged from Ralph on Solana)
============================================================
  Strategy:     rule_based
  Mode:         paper
  Ticks:        50
  Total trades: 12
  Win rate:     58.3%
  Gross PnL:    +42,500 lamports
  Equity:       10,042,500 lamports
  Max DD:       125,000 lamports
  Sharpe:       1.234
============================================================

📚 DOCUMENTATION



╔═══════════════════════════════════════════════════════════════════════╗
║                                                                       ║
║   "In recursion, we find infinity. In infinity, we find alpha."       ║
║                                                                       ║
║   "The charts don't lie, but they do speak in riddles."               ║
║                                                                       ║
║   "Between the candlesticks, I see truth."                            ║
║                                                                       ║
║   "Forged from Ralph on Solana — the claw remembers the loop."        ║
║                                                                       ║
╚═══════════════════════════════════════════════════════════════════════╝

  ░▒▓█ CLAWD █▓▒░  ·  pulse ·  scan ·  decide ·  act ·  repeat

License: MIT

Built on Solana · Forged from Ralph · Powered by recursion · solanaclawd.com

About

Dark Clawd is the OpenClawd terminal intelligence layer — a Bloomberg-style TUI, 171 non-custodial SOL GPT tools, and an OpenRouter multi-turn agent harness for Solana market surveillance, wallet context, Phoenix/Imperial perps, AI analysis, and holder operations.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages