Claw CLI
Send prompts directly to NanoClaw agent containers from the terminal without a chat app.
What it does
- Send prompts to agent containers from the command line
- Target specific groups by name, folder, or JID
- Resume previous agent sessions
- Pipe input from stdin for scripting and automation
- Auto-detects container runtime (Docker or Apple Container)
What you'll need
- NanoClaw installed and running
- Python 3
- At least one registered group
Install
/claw How it works
The /claw skill installs a Python CLI tool that lets you interact with NanoClaw agent containers directly from your terminal. Instead of sending a message through WhatsApp, Telegram, or another channel, you type a prompt in your shell and get the response back in the same terminal session.
This is useful for scripting, automation, quick one-off questions, and situations where you don’t want to context-switch to a chat app. The tool communicates with the same agent containers that handle your messaging channels, so the agent has the same capabilities and tools regardless of how you reach it.
Setup
The skill copies the claw script to scripts/claw and creates a symlink in ~/bin so it’s available on your PATH. After installation, verify with:
claw --list-groups
This should show all registered groups in your NanoClaw instance.
Usage
Send a prompt to your default (main) group:
claw "What's on my schedule today?"
Target a specific group by name:
claw -g work "Summarize the latest PR comments"
Resume a previous session (the agent picks up where it left off):
claw -r "Continue with the refactoring"
Pipe input from stdin:
cat error.log | claw "What's causing these failures?"
List all available groups:
claw --list-groups
Tips
- The CLI auto-detects whether you’re using Docker or Apple Container as your runtime. No configuration needed.
- Use
-v(verbose mode) to see the full container interaction, including tool calls and intermediate steps. Helpful for debugging. - Piping from stdin is powerful for automation. You can wire
clawinto shell scripts, cron jobs, or CI pipelines to have the agent process output from other commands. - The agent session started by
clawis isolated from your messaging channel sessions by default. Use-rto resume if you want continuity across invocations. - Set a custom timeout with
-tif you’re sending prompts that require longer processing (e.g., large code reviews).