Ships in claudeclaw. Installing the plugin adds it to Claude Code.
Start the heartbeat daemon for this project. Follow these steps exactly:
Block home-directory starts (CRITICAL, BLOCKER):
pwd and echo "$HOME".pwd equals $HOME, STOP immediately.Runtime checker (Bun + Node):
which bun
which node
bun is missing:
curl -fsSL https://bun.sh/install | bash
bun available in the current session:
source ~/.bashrc 2>/dev/null || source ~/.zshrc 2>/dev/null || true
which bun. If still not found, tell the user installation failed and to install manually from https://bun.sh, then exit.node is missing:
Check existing config: Read .claude/claudeclaw/settings.json (if it exists). Determine which sections are already configured:
heartbeat.enabled is true AND heartbeat.prompt is non-emptytelegram.token is non-emptysecurity.level exists and is not "moderate" (the default), OR security.allowedTools/security.disallowedTools are non-emptyInteractive setup — smart mode (BEFORE launching the daemon):
If ALL three sections are already configured, show a summary of the current config and ask ONE question:
Use AskUserQuestion:
If they choose "Keep current settings", skip to step 6 (first contact question). If they choose "Reconfigure", proceed to step 5 below as if nothing was configured.
If SOME sections are configured and others are not, show the already-configured sections as a summary, then only ask about the unconfigured sections in step 5.
If NOTHING is configured (fresh install), ask about all three sections in step 5.
Ask setup questions:
Use AskUserQuestion to ask all unconfigured sections at once (up to 3 questions in one call):
model is empty/unset): "Which Claude model should ClaudeClaw use?" (header: "Model", options: "opus (default)", "sonnet", "haiku", "glm")Then, based on their answers:
Model: Set model in settings to their choice (e.g. "opus", "sonnet", "haiku", "glm"). Default is "opus" if they don't pick.
If model is glm: Ask in normal free-form text for API token and set top-level api to that value (optional; user can skip). Only ask this token question when the selected model is glm.
Ask whether to set a fallback model. Recommend glm first so fallback uses a different provider path than the primary Claude model. If yes, set fallback.model and optionally fallback.api.
If yes to heartbeat: Use AskUserQuestion again with one question:
heartbeat.enabled to true and heartbeat.interval to their answer.UTC+1, UTC-5, UTC+03:30) and set top-level timezone.If heartbeat is no but timezone is missing: set top-level timezone to UTC+0.
If yes to Telegram: Do NOT use AskUserQuestion for Telegram fields. Ask in normal free-form text for two values (both optional, user can skip either):
@BotFather)@userinfobot to get your numeric ID)telegram.token and telegram.allowedUserIds (as array of numbers) accordingly.Security level mapping — set security.level in settings based on their choice:
"locked""strict""moderate""unrestricted"If security is "Strict" or "Locked": Use AskUserQuestion to ask:
security.allowedTools to the list.Update .claude/claudeclaw/settings.json with their answers.
Launch/start action:
mkdir -p .claude/claudeclaw/logs && nohup bun run ${CLAUDE_PLUGIN_ROOT}/src/index.ts start --web > .claude/claudeclaw/logs/daemon.log 2>&1 & echo $!
Use the description "Starting ClaudeClaw server" for this command.
Wait 1 second, then check cat .claude/claudeclaw/logs/daemon.log. If it contains "Aborted: daemon already running", tell the user and exit.
.claude/claudeclaw/settings.json for web.port (default 4632 if missing) and web.host (default 127.0.0.1).xdg-open http://<HOST>:<PORT>open http://<HOST>:<PORT>Capture session ID: Read .claude/claudeclaw/session.json and extract the sessionId field. This is the shared Claude session used by the daemon for heartbeat, jobs, and Telegram.
Report: Print the ASCII art below then show the PID, session, status info, Telegram bot next step, and the Web UI URL.
CRITICAL: Output the ASCII art block below EXACTLY as-is inside a markdown code block. Do NOT re-indent, re-align, or adjust ANY whitespace. Copy every character verbatim. Only replace <PID> and <WORKING_DIR> with actual values.
🦞 🦞
▐▛███▜▌
▝▜█████▛▘
▘▘ ▝▝
Daemon is running! PID: <PID> | Dir: <WORKING_DIR>
/heartbeat:status - check status
/heartbeat:stop - stop daemon
/heartbeat:clear - back up session & restart fresh
/heartbeat:config - show config
To start chatting on Telegram
Go to your bot, send /start, and start talking.
To talk to your agent directly on Claude Code
cd <WORKING_DIR> && claude --resume <SESSION_ID>
Show this direct Web UI URL:
http://<WEB_HOST>:<WEB_PORT>
Defaults: WEB_HOST=127.0.0.1, WEB_PORT=4632 unless changed via settings or --web-port.
.claude/claudeclaw/settings.json{
"model": "opus",
"api": "",
"fallback": {
"model": "glm",
"api": ""
},
"timezone": "UTC+0",
"heartbeat": {
"enabled": true,
"interval": 15,
"prompt": "Check git status and summarize recent changes."
// OR use a file path:
// "prompt": "prompts/heartbeat.md"
},
"telegram": {
"token": "123456:ABC-DEF...",
"allowedUserIds": [123456789]
},
"security": {
"level": "moderate",
"allowedTools": [],
"disallowedTools": []
}
}
model — Claude model to use (opus, sonnet, haiku, glm, or full model ID). Empty string uses default.api — API token used when model is glm (passed as ANTHROPIC_AUTH_TOKEN for that provider path).fallback.model — backup model used automatically if the primary run returns a rate-limit message. Prefer glm for provider diversity.fallback.api — optional API token to use with fallback.model.timezone — canonical app timezone as UTC offset text (example: UTC+1, UTC-5, UTC+03:30). Heartbeat windows, jobs, and UI all use this timezone.heartbeat.enabled — whether the recurring heartbeat runsheartbeat.interval — minutes between heartbeat runsheartbeat.prompt — the prompt sent to Claude on each heartbeat. Can be an inline string or a file path ending in .md, .txt, or .prompt (relative to project root). File contents are re-read on each tick, so edits take effect without restarting the daemon.telegram.token — Telegram bot token from @BotFathertelegram.allowedUserIds — array of numeric Telegram user IDs allowed to interactsecurity.level — one of: locked, strict, moderate, unrestrictedsecurity.allowedTools — extra tools to allow on top of the level (e.g. ["Bash(git:*)"])security.disallowedTools — tools to block on top of the levelAll levels run without permission prompts (headless). Security is enforced via tool restrictions and project-directory scoping.
| Level | Tools available | Directory scoped |
|---|---|---|
locked | Read, Grep, Glob only | Yes — project dir only |
strict | Everything except Bash, WebSearch, WebFetch | Yes — project dir only |
moderate | All tools | Yes — project dir only |
unrestricted | All tools | No — full system access |
.claude/claudeclaw/jobs/<name>.mdJobs are markdown files with cron schedule frontmatter and a prompt body:
---
schedule: "0 9 * * *"
---
Your prompt here. Claude will run this at the scheduled time.
minute hour day-of-month month day-of-weektimezone. E.g. 0 9 * * * with timezone: "UTC+2" fires at 9:00 AM local time..md) becomes the job name.claude/claudeclaw/jobs/What the command file sets; muted values are Claude Code's defaults
7-day visitors to each command page
Other plugins' commands for the same job
npx claudepluginhub urun-sh/claudeclaw --plugin claudeclaw9 commands in this plugin
/jobsSub-commands