| name | claw |
| description | Install the claw CLI tool — run NinjaClaw agent containers from the command line without opening a chat app. |
claw — NinjaClaw CLI
claw is a Python CLI that sends prompts directly to a NinjaClaw agent container from the terminal. It reads registered groups from the NinjaClaw database, picks up secrets from .env, and pipes a JSON payload into a container run — no chat app required.
What it does
- Send a prompt to any registered group by name, folder, or JID
- Default target is the main group (no
-g needed for most use)
- Resume a previous session with
-s <session-id>
- Read prompts from stdin (
--pipe) for scripting and piping
- List all registered groups with
--list-groups
- Auto-detects
container or docker runtime (or override with --runtime)
- Prints the agent's response to stdout; session ID to stderr
- Verbose mode (
-v) shows the command, redacted payload, and exit code
Prerequisites
- Python 3.8 or later
- NinjaClaw installed with a built and tagged container image (
NinjaClaw-agent:latest)
- Either
container (Apple Container, macOS 15+) or docker available in PATH
Install
Run this skill from within the NinjaClaw directory. The script auto-detects its location, so the symlink always points to the right place.
1. Copy the script
mkdir -p scripts
cp "${COPILOT_SKILL_DIR}/scripts/claw" scripts/claw
chmod +x scripts/claw
2. Symlink into PATH
mkdir -p ~/bin
ln -sf "$(pwd)/scripts/claw" ~/bin/claw
Make sure ~/bin is in PATH. Add this to ~/.zshrc or ~/.bashrc if needed:
export PATH="$HOME/bin:$PATH"
Then reload the shell:
source ~/.zshrc
3. Verify
claw --list-groups
You should see registered groups. If NinjaClaw isn't running or the database doesn't exist yet, the list will be empty — that's fine.
Usage Examples
claw "What's on my calendar today?"
claw -g "family" "Remind everyone about dinner at 7"
claw -j "120363336345536173@g.us" "Hello"
claw -s abc123 "Continue where we left off"
echo "Summarize this" | claw --pipe -g dev
cat report.txt | claw --pipe "Summarize this report"
claw --list-groups
claw --runtime docker "Hello"
claw --image NinjaClaw-agent:dev "Hello"
claw -v "Hello"
claw --timeout 600 "Run the full analysis"
Troubleshooting
"neither 'container' nor 'docker' found"
Install Docker Desktop or Apple Container (macOS 15+), or pass --runtime explicitly.
"no secrets found in .env"
The script auto-detects your NinjaClaw directory and reads .env from it. Check that the file exists and contains at least one of: GITHUB_TOKEN, GITHUB_TOKEN, GITHUB_TOKEN.
Container times out
The default timeout is 300 seconds. For longer tasks, pass --timeout 600 (or higher). If the container consistently hangs, check that your NinjaClaw-agent:latest image is up to date by running ./container/build.sh.
"group not found"
Run claw --list-groups to see what's registered. Group lookup does a fuzzy partial match on name and folder — if your query matches multiple groups, you'll get an error listing the ambiguous matches.
Container crashes mid-stream
Containers run with --rm so they are automatically removed. If the agent crashes before emitting the output sentinel, claw falls back to printing raw stdout. Use -v to see what the container produced. Rebuild the image with ./container/build.sh if crashes are consistent.
Override the NinjaClaw directory
If claw can't find your database or .env, set the NinjaClaw_DIR environment variable:
export NinjaClaw_DIR=/path/to/your/NinjaClaw