pure POSIX sh  ·  v0  ·  MIT

An LLM agent that runs
on any Linux box.

A single shell script that gives you a full LLM agent — streaming chat, shell tool calls, rolling memory, and mentor mode against OpenAI or Anthropic. No Node. No npm. Just curl + jq.

$ wget -qO /usr/local/bin/claw https://getclaw.site/claw \ && chmod +x /usr/local/bin/claw
▶  Try it now!

runs in your browser — no install needed 🌐 browser Linux


// features

Everything you need. Nothing you don't.

Built to run in Alpine containers, v86 VMs, and cheap VPS boxes. If it has sh + curl + jq, claw runs.

Shell tool calls
The model emits <shell>…</shell> blocks. claw runs them and feeds results back. YOLO by default; pass --confirm to be prompted.
🧠
Rolling memory
Prompts and replies are journaled to JSONL. When windows overflow, an LLM compacts them into durable session rules and a per-session markdown journal.
🔁
Mentor mode
A second assistant pass critiques the first answer against your original request, then revises. Toggle with --mentor or /mentor on.
🔌
Multi-provider
Switch between OpenAI and Anthropic with a single flag. Configurable base URLs let you point at any OpenAI-compatible endpoint.
📦
Zero dependencies
Pure POSIX sh + curl + jq. Runs on busybox ash. No Python, no Node, no package managers. One file. One install.
🗂
Named sessions
Run isolated sessions with claw -s myproject. Each has its own history, compacted rules, and journal — switch instantly with /load.
📚
Skills
Drop any .md file into ~/.config/clawlite/instructions/ and it becomes part of the system prompt — project context, tool guides, domain knowledge. No restart needed.
🪬
Soul
Name a skill file soul.md to define your agent's persona — name, voice, values, tone. Follows the emerging soul.md open standard. Portable, versionable, shareable across any claw session.
⌨️
Full line editing
When rlwrap is installed, claw self-relaunches under it — giving you arrow keys, ↑↓ history, Ctrl+R reverse search, Alt+← → word-jump, Ctrl+A/E/W/K, and persistent history across sessions. Degrades gracefully without it.

// demo

See it in action.

The model uses shell tools to inspect the filesystem and answer in context — all from a single shell script.

claw — session: default  |  model: gpt-5.5  |  tools: on
$ claw
# streaming chat · /help for commands · Ctrl-D to exit

you> show me the 3 largest files in /var/log and their ages

<shell>find /var/log -maxdepth 2 -type f -printf '%s\t%T@\t%p\n' \ | sort -rn | head -3 | awk '{printf "%.0fM\t%s\t%s\n", $1/1048576, $2, $3}'</shell>
128M 1714935621 /var/log/syslog 44M 1714849221 /var/log/auth.log 12M 1714762821 /var/log/kern.log

The three largest log files:

syslog 128 MB — last modified ~1 day ago
auth.log 44 MB — last modified ~2 days ago
kern.log 12 MB — last modified ~3 days ago

Your syslog is growing fast. Want me to gzip entries older than 7 days?


you> yes, do it

<shell>find /var/log -name "syslog.*" -mtime +7 -exec gzip -9 {} \;</shell>
exit=0
Done. All syslog rotations older than 7 days are now gzipped.

// install

Up in 30 seconds.

Three steps. No build system. No package manager.

1 Download

$ wget -qO /usr/local/bin/claw \
  https://getclaw.site/claw \
&& chmod +x /usr/local/bin/claw

2 Set your API key

# add to ~/.profile or ~/.bashrc
export OPENAI_API_KEY=sk-...

# or for Anthropic:
export ANTHROPIC_API_KEY=sk-ant-...

3 Run

$ claw

# one-shot:
$ claw "what is my IP?"

# pipe stdin:
$ cat error.log | claw