### Quick start installation flow Source: https://github.com/qwibitai/nanoclaw/blob/main/docs/skills-as-branches.md Updated command-line instructions for cloning and initializing the NanoClaw project. ```bash 1. Fork qwibitai/nanoclaw on GitHub 2. git clone https://github.com//nanoclaw.git 3. cd nanoclaw 4. claude 5. /setup ``` -------------------------------- ### NanoClaw Setup Script Source: https://context7.com/qwibitai/nanoclaw/llms.txt A bash script to automate the initial setup of NanoClaw, including installing dependencies, configuring credentials, building the agent container, and pairing channels. It also includes examples of how to interact with the assistant using trigger words and manage tasks. ```bash # Clone and run the setup script git clone https://github.com/qwibitai/nanoclaw.git nanoclaw-v2 cd nanoclaw-v2 bash nanoclaw.sh # The setup script: # - Installs Node, pnpm, Docker if missing # - Registers Anthropic credentials with OneCLI # - Builds the agent container # - Pairs your first channel (Telegram, Discord, WhatsApp, or CLI) # - If a step fails, Claude Code is invoked to diagnose # Talk to your assistant with the trigger word (default: @Andy) @Andy send an overview of the sales pipeline every weekday morning at 9am @Andy review the git history for the past week each Friday @Andy every Monday at 8am, compile AI news from Hacker News and message me a briefing # Manage groups and tasks @Andy list all scheduled tasks across groups @Andy pause the Monday briefing task @Andy join the Family Chat group # Customize by telling Claude Code what you want # (no config files - just code changes) # "Change the trigger word to @Bob" # "Remember to make responses shorter" # "Add a custom greeting when I say good morning" ``` -------------------------------- ### Progression Log Step Entry Example Source: https://github.com/qwibitai/nanoclaw/blob/main/docs/setup-flow.md This format is used in `logs/setup.log` to record the status and details of each setup step. It includes a timestamp, step name, duration, status, and a pointer to the raw log file. ```text === [2026-04-22T22:14:12Z] bootstrap [45.1s] → success === platform: linux is_wsl: false node_version: 22.22.2 deps_ok: true native_ok: true raw: logs/setup-steps/01-bootstrap.log === [2026-04-22T22:14:57Z] environment [2.3s] → success === docker: running apple_container: not_found raw: logs/setup-steps/02-environment.log === [2026-04-22T22:15:00Z] container [92.4s] → success === runtime: docker image: nanoclaw-agent:latest build_ok: true raw: logs/setup-steps/03-container.log ``` -------------------------------- ### Clone and Run NanoClaw Setup Script Source: https://github.com/qwibitai/nanoclaw/blob/main/README.md Use this bash script to clone the NanoClaw repository and initiate the setup process. It handles installing dependencies like Node.js, pnpm, and Docker, and configures your Anthropic credentials. ```bash git clone https://github.com/qwibitai/nanoclaw.git nanoclaw-v2 cd nanoclaw-v2 bash nanoclaw.sh ``` -------------------------------- ### Progression Log User Input Entry Example Source: https://github.com/qwibitai/nanoclaw/blob/main/docs/setup-flow.md User choices are logged as separate entries in `logs/setup.log` to track decisions that affect the setup flow. These are not nested within step entries. ```text === [2026-04-22T22:17:44Z] user-input → display_name === value: gav === [2026-04-22T22:17:51Z] user-input → channel_choice === value: telegram ``` -------------------------------- ### Start NanoClaw Project Source: https://github.com/qwibitai/nanoclaw/blob/main/docs/docker-sandboxes.md Run the main start command for the NanoClaw project. The sandbox proxy automatically manages API keys. ```bash pnpm start ``` -------------------------------- ### Start Development Server and Background Process Source: https://github.com/qwibitai/nanoclaw/blob/main/container/skills/frontend-engineer/SKILL.md Start the development server in the background and capture its process ID. This is part of the visual verification setup. ```bash pnpm run dev & DEV_PID=$! sleep 3 ``` -------------------------------- ### Install Packages and Tools Source: https://github.com/qwibitai/nanoclaw/blob/main/groups/global/CLAUDE.md Use `install_packages` to request system or global npm packages, followed by `request_rebuild` to apply the changes to the container image. Admin approval is required for package installation. ```python install_packages({ apt: ["ffmpeg"], npm: ["@xenova/transformers"], reason: "Audio transcription" }) # → Admin gets an approval card → approves request_rebuild({ reason: "Apply ffmpeg + transformers" }) ``` -------------------------------- ### Install System Packages Source: https://github.com/qwibitai/nanoclaw/blob/main/container/skills/self-customize/SKILL.md Use this function to request the installation of system packages like ffmpeg or npm modules. Approval is required before the image is rebuilt and the container restarted. ```javascript install_packages({ apt: ["ffmpeg"], npm: ["@xenova/transformers"], reason: "Audio transcription for voice messages" }) ``` -------------------------------- ### Install Sandbox Prerequisites and npm Config Source: https://github.com/qwibitai/nanoclaw/blob/main/docs/docker-sandboxes.md Inside the sandbox, update package lists, install build essentials and Python, and configure npm to disable strict SSL verification. ```bash sudo apt-get update && sudo apt-get install -y build-essential python3 npm config set strict-ssl false ``` -------------------------------- ### Progression Log Header and Completion Blocks Source: https://github.com/qwibitai/nanoclaw/blob/main/docs/setup-flow.md The `logs/setup.log` file begins with a header block detailing the setup run environment and ends with a completion block indicating success or failure. ```text ## 2026-04-22T22:14:12Z · setup:auto started user: exedev cwd: /home/exedev/nanoclaw branch: branded-setup commit: 6e0d742 … (step entries) … ## 2026-04-22T22:18:54Z · completed (total 4m42s) ``` ```text ## 2026-04-22T22:16:40Z · aborted at container (err=cache_miss) ``` -------------------------------- ### Install Community Plugins Source: https://github.com/qwibitai/nanoclaw/blob/main/docs/skills-as-branches.md CLI command to install specific community-provided plugins into the project scope. This enables hot-loading of skills without requiring a service restart. ```bash claude plugin install alice-skills@alice-nanoclaw-skills --scope project ``` -------------------------------- ### Example: Add RSS Tool MCP Server Source: https://github.com/qwibitai/nanoclaw/blob/main/container/skills/self-customize/SKILL.md Illustrates the process of adding a new MCP tool, including checking for existing servers and delegating to a builder agent if necessary. ```python create_agent({ name: "RSS Tool Builder", instructions: "" }) ``` ```python send_to_agent({ agentGroupId, text: "Add an MCP tool 'read_rss' to container/agent-runner/src/mcp-tools/. It should fetch an RSS URL and return the latest N items. Register it in mcp-tools/index.ts. Target: <200 new lines." }) ``` -------------------------------- ### Clone NanoClaw and Install Dependencies Source: https://github.com/qwibitai/nanoclaw/blob/main/docs/docker-sandboxes.md Clone the NanoClaw repository into your host's workspace directory and then install its Node.js dependencies using pnpm. Ensure you move the cloned repository into the mounted workspace path before installing. ```bash # Clone to home first (virtiofs can corrupt git pack files during clone) cd ~ git clone https://github.com/qwibitai/nanoclaw.git # Replace with YOUR workspace path (the host path you passed to `docker sandbox create`) WORKSPACE=/Users/you/nanoclaw-workspace # Move into workspace so DinD mounts work mv nanoclaw "$WORKSPACE/nanoclaw" cd "$WORKSPACE/nanoclaw" # Install dependencies pnpm install pnpm install https-proxy-agent ``` -------------------------------- ### Enter the Docker Sandbox Source: https://github.com/qwibitai/nanoclaw/blob/main/docs/docker-sandboxes.md Access the created Docker sandbox environment to proceed with the NanoClaw setup. ```bash docker sandbox run shell-nanoclaw-workspace ``` -------------------------------- ### Schedule Task - Once Example Source: https://github.com/qwibitai/nanoclaw/blob/main/docs/SPEC.md Schedules a one-time task to run at a specific ISO timestamp. This example sets a task for 5 PM today. ```json { "prompt": "Search for today's emails, summarize the important ones, and send the summary to the group.", "schedule_type": "once", "schedule_value": "2024-01-31T17:00:00Z" } ``` -------------------------------- ### Verifying Setup Registration Source: https://github.com/qwibitai/nanoclaw/blob/main/docs/setup-wiring.md This script verifies the setup registration by checking the central database for agent group wiring. It counts agent groups with established connections to ensure the registration process was successful. ```typescript async function verifySetup() { const count = await db.get('SELECT COUNT(*) FROM agent_groups WHERE wired = 1'); console.log(`Verified ${count} agent groups with wiring.`); } ``` -------------------------------- ### Check for Available Tools Source: https://github.com/qwibitai/nanoclaw/blob/main/container/skills/self-customize/SKILL.md Before installing, check if a tool like ffmpeg is already available in the system using the 'which' command. ```bash which ffmpeg ``` -------------------------------- ### NanoClaw Service Management Commands Source: https://github.com/qwibitai/nanoclaw/blob/main/docs/SPEC.md These bash commands are used to manage the NanoClaw service using `launchctl`. Use these to install, start, stop, check the status, and view logs for the NanoClaw service. ```bash # Install service cp launchd/com.nanoclaw.plist ~/Library/LaunchAgents/ # Start service launchctl load ~/Library/LaunchAgents/com.nanoclaw.plist # Stop service launchctl unload ~/Library/LaunchAgents/com.nanoclaw.plist # Check status launchctl list | grep nanoclaw # View logs tail -f logs/nanoclaw.log ``` -------------------------------- ### Setup Registration: Creating Entities Source: https://github.com/qwibitai/nanoclaw/blob/main/docs/setup-wiring.md This script handles the creation of essential entities like agent groups, messaging groups, and their associations in the `data/v2.db` database. It supports platform-specific registration via a flag. ```typescript async function registerSetup(platformId: string) { await createAgentGroup(platformId); await createMessagingGroup(platformId); await wireAgentToGroup(platformId); } ``` -------------------------------- ### Install Persistent Packages Source: https://github.com/qwibitai/nanoclaw/blob/main/container/agent-runner/src/mcp-tools/self-mod.instructions.md Use `install_packages` to request system (apt) or global npm packages that persist across turns. Requires admin approval. Use this instead of `pnpm install` for permanent capabilities. ```javascript install_packages({ apt: ["ffmpeg"], npm: ["@xenova/transformers"], reason: "Audio transcription" }) # → Admin gets an approval card → approves ``` -------------------------------- ### WhatsApp Channel Registration Example Source: https://github.com/qwibitai/nanoclaw/blob/main/docs/SPEC.md Example of how a specific channel, like WhatsApp, registers itself with the channel registry. The factory function checks for credentials and returns a `WhatsAppChannel` instance or null. ```typescript // src/channels/whatsapp.ts import { registerChannel, ChannelOpts } from './registry.js'; export class WhatsAppChannel implements Channel { /* ... */ } registerChannel('whatsapp', (opts: ChannelOpts) => { // Return null if credentials are missing if (!existsSync(authPath)) return null; return new WhatsAppChannel(opts); }); ``` -------------------------------- ### Example Workflows Source: https://github.com/qwibitai/nanoclaw/blob/main/container/skills/agent-browser/SKILL.md Illustrates practical usage scenarios for the agent-browser tool, including form submission, data extraction, and authentication. ```APIDOC ## Example Workflows ### Description These examples demonstrate common use cases for the agent-browser tool, showcasing how to combine commands for complex tasks. ### Example 1: Form Submission ```bash # Navigate to the form page agent-browser open https://example.com/form # Take a snapshot to identify elements and their refs agent-browser snapshot -i # Expected output might include: textbox "Email" [ref=e1], textbox "Password" [ref=e2], button "Submit" [ref=e3] # Fill in the form fields using their refs agent-browser fill @e1 "user@example.com" agent-browser fill @e2 "password123" # Click the submit button agent-browser click @e3 # Wait for the page to finish loading after submission agent-browser wait --load networkidle # Optionally, take another snapshot to verify the result agent-browser snapshot -i ``` ### Example 2: Data Extraction ```bash # Navigate to a page with product listings agent-browser open https://example.com/products # Take a snapshot to identify elements agent-browser snapshot -i # Assume product title is @e1 and product link is @e2 # Extract the text of the product title agent-browser get text @e1 # Extract the href attribute of the product link agent-browser get attr @e2 href # Take a screenshot of the products page agent-browser screenshot products.png ``` ### Example 3: Authentication and State Management ```bash # --- Initial Login and State Saving --- # Navigate to the login page agent-browser open https://app.example.com/login # Identify login form elements agent-browser snapshot -i # Assume email field is @e1, password field is @e2, login button is @e3 # Fill credentials and log in agent-browser fill @e1 "your_username" agent-browser fill @e2 "your_password" agent-browser click @e3 # Wait until the dashboard page loads agent-browser wait --url "**/dashboard" # Save the authentication state to a file agent-browser state save auth.json # --- Subsequent Login using Saved State --- # Load the saved authentication state agent-browser state load auth.json # Open a page that requires authentication agent-browser open https://app.example.com/dashboard # The browser should now be logged in automatically. ``` ``` -------------------------------- ### Register Group Configuration Example Source: https://github.com/qwibitai/nanoclaw/blob/main/groups/main/CLAUDE.md Defines the structure for registering a group, including its name, folder, trigger word, and registration timestamp. The key is the chat JID. ```json { "1234567890-1234567890@g.us": { "name": "Family Chat", "folder": "whatsapp_family-chat", "trigger": "@Andy", "added_at": "2024-01-31T12:00:00.000Z" } } ``` -------------------------------- ### Install Packages with MCP Tools Source: https://context7.com/qwibitai/nanoclaw/llms.txt Use `installPackages` to add apt and npm packages to your container. Requires admin approval. Package names are validated before submission. ```typescript // container/agent-runner/src/mcp-tools/self-mod.ts // install_packages - Install apt/npm packages (rebuilds container image) export const installPackages: McpToolDefinition = { tool: { name: 'install_packages', description: 'Install apt and/or npm packages into your container image. Requires admin approval.', inputSchema: { type: 'object', properties: { apt: { type: 'array', items: { type: 'string' }, description: 'apt packages (names only)' }, npm: { type: 'array', items: { type: 'string' }, description: 'npm packages (names only)' }, reason: { type: 'string', description: 'Why these packages are needed' }, }, }, }, async handler(args) { const apt = args.apt || []; const npm = args.npm || []; // Validate package names const invalidApt = apt.find(p => !/^[a-z0-9][a-z0-9._+-]*$/.test(p)); if (invalidApt) return err(`Invalid apt package: "${invalidApt}"`); const invalidNpm = npm.find(p => !/^(@[a-z0-9][a-z0-9._-]*\/)?[a-z0-9][a-z0-9._-]*$/.test(p)); if (invalidNpm) return err(`Invalid npm package: "${invalidNpm}"`); writeMessageOut({ id: generateId(), kind: 'system', content: JSON.stringify({ action: 'install_packages', apt, npm, reason: args.reason || '', }), }); return ok('Package install request submitted. You will be notified when admin approves.'); }, }; ``` -------------------------------- ### Manage Nanoclaw Service with systemd (Linux) Source: https://github.com/qwibitai/nanoclaw/blob/main/CLAUDE.md Commands to start, stop, and restart the Nanoclaw service using systemd on Linux. ```bash # Linux (systemd) systemctl --user start|stop|restart nanoclaw ``` -------------------------------- ### Initialize NanoClaw Host Process Source: https://context7.com/qwibitai/nanoclaw/llms.txt Main entry point for the NanoClaw host process. Initializes the database, sets up container runtime, registers channel adapters, and starts delivery and host sweep polls. ```typescript // src/index.ts - Main entry point import { DATA_DIR } from './config.js'; import { initDb } from './db/connection.js'; import { runMigrations } from './db/migrations/index.js'; import { ensureContainerRuntimeRunning, cleanupOrphans } from './container-runtime.js'; import { startActiveDeliveryPoll, startSweepDeliveryPoll, setDeliveryAdapter } from './delivery.js'; import { startHostSweep } from './host-sweep.js'; import { routeInbound } from './router.js'; import { initChannelAdapters, getChannelAdapter } from './channels/channel-registry.js'; async function main(): Promise { // 1. Init central DB const dbPath = path.join(DATA_DIR, 'v2.db'); const db = initDb(dbPath); runMigrations(db); // 2. Container runtime ensureContainerRuntimeRunning(); cleanupOrphans(); // 3. Channel adapters await initChannelAdapters((adapter) => ({ onInbound(platformId, threadId, message) { routeInbound({ channelType: adapter.channelType, platformId, threadId, message: { id: message.id, kind: message.kind, content: JSON.stringify(message.content), timestamp: message.timestamp, isMention: message.isMention, isGroup: message.isGroup, }, }); }, onAction(questionId, selectedOption, userId) { // Handle interactive card responses }, })); // 4. Start delivery polls (1s for active, 60s for sweep) startActiveDeliveryPoll(); startSweepDeliveryPoll(); // 5. Start host sweep (60s interval) startHostSweep(); } ``` -------------------------------- ### Applying Multiple Skills with Git Source: https://github.com/qwibitai/nanoclaw/blob/main/docs/skills-as-branches.md This example shows how to apply multiple skills by merging their respective branches. Git handles the composition, and any overlapping changes between skills will result in a merge conflict that Claude can resolve. ```bash git merge upstream/skill/discord git merge upstream/skill/telegram ``` -------------------------------- ### Example Trigger Word Matching Source: https://github.com/qwibitai/nanoclaw/blob/main/docs/SPEC.md Messages must start with the trigger pattern (default: '@Andy') to be processed. Matching is case-insensitive. ```text @Andy what's the weather? → ✅ Triggers Claude @andy help me → ✅ Triggers (case insensitive) Hey @Andy → ❌ Ignored (trigger not at start) What's up? → ❌ Ignored (no trigger) ``` -------------------------------- ### Manage NanoClaw flavor git remotes Source: https://github.com/qwibitai/nanoclaw/blob/main/docs/skills-as-branches.md Commands to add a flavor repository as a git remote and synchronize it with the local installation. This is used during initial setup or when updating an existing flavor. ```bash git remote add https://github.com/alice/nanoclaw.git git fetch main git merge /main ``` -------------------------------- ### Change Assistant Name using Environment Variable Source: https://github.com/qwibitai/nanoclaw/blob/main/docs/SPEC.md Set the ASSISTANT_NAME environment variable to customize the assistant's name, which affects message triggers and response prefixes. This example uses pnpm to start the application. ```bash ASSISTANT_NAME=Bot pnpm start ``` -------------------------------- ### Apply WhatsApp Skill and Configure Environment Source: https://github.com/qwibitai/nanoclaw/blob/main/docs/docker-sandboxes.md Applies the WhatsApp skill, rebuilds the project, and configures the .env file. It then proceeds to authenticate the WhatsApp connection using either a QR code or a pairing code and registers the chat. ```bash # Apply the WhatsApp skill pnpm exec tsx scripts/apply-skill.ts .claude/skills/add-whatsapp # Rebuild pnpm run build # Configure .env cat > .env << EOF ASSISTANT_NAME=nanoclaw ANTHROPIC_API_KEY=proxy-managed EOF mkdir -p data/env && cp .env data/env/env # Authenticate (choose one): # QR code — scan with WhatsApp camera: pnpm exec tsx src/whatsapp-auth.ts # OR pairing code — enter code in WhatsApp > Linked Devices > Link with phone number: pnpm exec tsx src/whatsapp-auth.ts --pairing-code --phone # Register your chat (JID = your phone number + @s.whatsapp.net) pnpm exec tsx setup/index.ts --step register \ --jid "@s.whatsapp.net" \ --name "My Chat" \ --trigger "@nanoclaw" \ --folder "whatsapp_main" \ --channel whatsapp \ --assistant-name "nanoclaw" \ --is-main \ --no-trigger-required ``` -------------------------------- ### Schedule Task - Cron Example Source: https://github.com/qwibitai/nanoclaw/blob/main/docs/SPEC.md Schedules a task to run on a cron expression. This example sets a reminder every Monday at 9 AM. ```json { "prompt": "Send a reminder to review weekly metrics. Be encouraging!", "schedule_type": "cron", "schedule_value": "0 9 * * 1" } ``` -------------------------------- ### Cloning Nanoclaw Repository Source: https://github.com/qwibitai/nanoclaw/blob/main/docs/skills-as-branches.md This bash script demonstrates the initial steps for setting up the Nanoclaw project locally. It involves forking the repository on GitHub, cloning the user's fork, and then navigating into the project directory. ```bash git clone https://github.com//nanoclaw.git cd nanoclaw ``` -------------------------------- ### Add Domain to Project Source: https://github.com/qwibitai/nanoclaw/blob/main/container/skills/vercel-cli/SKILL.md Add a new domain to your current Vercel project. Replace `example.com` with the desired domain. Authentication is required via `--token placeholder`. ```bash vercel domains add example.com --token placeholder ``` -------------------------------- ### Preview Deployment Source: https://github.com/qwibitai/nanoclaw/blob/main/container/skills/vercel-cli/SKILL.md Create a preview deployment (not for production) by omitting the `--prod` flag. Use `--yes` for non-interactive deployment and `--token placeholder` for authentication. ```bash vercel deploy --yes --token placeholder ``` -------------------------------- ### Deploy Web Application to Production Source: https://github.com/qwibitai/nanoclaw/blob/main/container/skills/vercel-cli/SKILL.md Deploy your web application to production using `vercel deploy`. Use `--yes` to skip prompts and `--prod` for production deployment. Always include `--token placeholder` for authentication. ```bash vercel deploy --yes --prod --token placeholder ``` -------------------------------- ### Install Packages Source: https://github.com/qwibitai/nanoclaw/blob/main/src/modules/self-mod/agent.md Use `install_packages` to add apt or npm packages. This function rebuilds the image and restarts the container. Strict package name validation is enforced, and a maximum of 20 packages can be requested per call. ```javascript install_packages({ apt?: string[], npm?: string[], reason?: string }) ``` -------------------------------- ### Slack mrkdwn Example Message Source: https://github.com/qwibitai/nanoclaw/blob/main/container/skills/slack-formatting/SKILL.md An example of a Slack message formatted using mrkdwn syntax, demonstrating the use of bold text, italics, bullet points, block quotes, links, and emoji. ```mrkdwn *Daily Standup Summary* _March 21, 2026_ • *Completed:* Fixed authentication bug in login flow • *In Progress:* Building new dashboard widgets • *Blocked:* Waiting on API access from DevOps > Next sync: Monday 10am :white_check_mark: All tests passing | ``` -------------------------------- ### Install CJK Fonts and Rebuild Container Source: https://github.com/qwibitai/nanoclaw/blob/main/CLAUDE.md This script ensures the CJK font installation flag is set in the .env file, then rebuilds the container and restarts the agent service. Use this when the user needs to process Chinese, Japanese, or Korean content. ```bash # Ensure .env has INSTALL_CJK_FONTS=true (overwrite or append) grep -q '^INSTALL_CJK_FONTS=' .env && sed -i.bak 's/^INSTALL_CJK_FONTS=.*/INSTALL_CJK_FONTS=true/' .env && rm -f .env.bak || echo 'INSTALL_CJK_FONTS=true' >> .env # Rebuild and restart so new sessions pick up the new image ./container/build.sh launchctl kickstart -k gui/$(id -u)/com.nanoclaw # macOS ``` -------------------------------- ### Migrate to NanoClaw v2 Source: https://github.com/qwibitai/nanoclaw/blob/main/CLAUDE.md This script is used to migrate an existing installation to NanoClaw v2. It should be run by the user, not the developer. ```bash bash migrate-v2.sh ``` -------------------------------- ### Open URL and Take Screenshot Source: https://github.com/qwibitai/nanoclaw/blob/main/container/skills/frontend-engineer/SKILL.md Use agent-browser to open a deployed URL and capture a screenshot for production verification. Ensure the URL is live before executing. ```bash agent-browser open ``` ```bash agent-browser screenshot production.png ``` -------------------------------- ### Outbound Message Content Example Source: https://github.com/qwibitai/nanoclaw/blob/main/docs/architecture.md Illustrates the JSON structure for outbound messages, referencing filenames within the associated directory. ```json { "text": "Here's the chart", "files": ["chart.png", "report.pdf"] } ``` -------------------------------- ### Marketplace Configuration (`.claude/settings.json`) Source: https://github.com/qwibitai/nanoclaw/blob/main/docs/skills-as-branches.md This JSON configuration file sets up the official marketplace for automatic registration. It specifies the source repository for the 'nanoclaw-skills' marketplace. ```json { "extraKnownMarketplaces": { "nanoclaw-skills": { "source": { "source": "github", "repo": "qwibitai/nanoclaw-skills" } } } } ``` -------------------------------- ### Manage Agent Runner Dependencies and Tests Source: https://github.com/qwibitai/nanoclaw/blob/main/CLAUDE.md Commands to install dependencies and run tests for the agent-runner package, which is separate from the main host. ```bash # Agent-runner (Bun — separate package tree under container/agent-runner/) cd container/agent-runner && bun install # After editing agent-runner deps cd container/agent-runner && bun test # Container tests (bun:test) ``` -------------------------------- ### Run NanoClaw in Development Mode Source: https://github.com/qwibitai/nanoclaw/blob/main/docs/SPEC.md Execute this command to run NanoClaw manually with verbose output, useful for debugging. Ensure you have pnpm installed. ```bash pnpm run dev ``` -------------------------------- ### Build Project and Container Source: https://github.com/qwibitai/nanoclaw/blob/main/docs/docker-sandboxes.md Commands to build the project using pnpm and then build the container using a bash script. ```bash pnpm run build bash container/build.sh ``` -------------------------------- ### Set Strict SSL to True in Dockerfile Source: https://github.com/qwibitai/nanoclaw/blob/main/docs/docker-sandboxes.md Ensure that after the `RUN pnpm install` command in the `container/Dockerfile`, Node.js is configured to use strict SSL verification. ```dockerfile RUN npm config set strict-ssl true ``` -------------------------------- ### Conflict Resolution for `pnpm-lock.yaml` Source: https://github.com/qwibitai/nanoclaw/blob/main/docs/BRANCH-FORK-MAINTENANCE.md Specific command to resolve conflicts in the `pnpm-lock.yaml` file during a merge. It checks out the version from the main branch and then runs `pnpm install`. ```bash git checkout main -- pnpm-lock.yaml && pnpm install ``` -------------------------------- ### Adding New Communication Channels Source: https://github.com/qwibitai/nanoclaw/blob/main/README.md To add a new communication channel, use the `/add-` command. This example shows how to add Signal as a channel. ```bash /add-signal — Add Signal as a channel ``` -------------------------------- ### Initialize Mermaid with Custom Theme Source: https://github.com/qwibitai/nanoclaw/blob/main/docs/architecture-diagram.html Use this configuration to set up Mermaid with a dark theme, loose security level, and custom theme variables for styling. ```javascript mermaid.initialize({ startOnLoad: true, theme: "dark", securityLevel: "loose", flowchart: { curve: "basis", padding: 18 }, themeVariables: { background: "#141821", primaryColor: "#1c2230", primaryTextColor: "#e7ecf3", primaryBorderColor: "#3a465e", lineColor: "#6b7893", secondaryColor: "#222a3a", tertiaryColor: "#1a2030", fontSize: "14px" } }); ``` -------------------------------- ### Configure npm to Bypass SSL Certificate Errors Source: https://github.com/qwibitai/nanoclaw/blob/main/docs/docker-sandboxes.md Use this command if `pnpm install` fails with a `SELF_SIGNED_CERT_IN_CHAIN` error. This disables strict SSL verification for npm. ```bash npm config set strict-ssl false ``` -------------------------------- ### Group Configuration with Additional Mounts Source: https://github.com/qwibitai/nanoclaw/blob/main/groups/main/CLAUDE.md Shows how to configure a group with additional directories mounted into its container using `containerConfig` and `additionalMounts`. ```json { "1234567890@g.us": { "name": "Dev Team", "folder": "dev-team", "trigger": "@Andy", "added_at": "2026-01-31T12:00:00Z", "containerConfig": { "additionalMounts": [ { "hostPath": "~/projects/webapp", "containerPath": "webapp", "readonly": false } ] } } } ``` -------------------------------- ### Build Project with PNPM Source: https://github.com/qwibitai/nanoclaw/blob/main/container/skills/frontend-engineer/SKILL.md Run the project build process using PNPM. Ensure all build errors are fixed before proceeding to deployment. ```bash pnpm run build 2>&1 ``` -------------------------------- ### Configure Community Marketplaces Source: https://github.com/qwibitai/nanoclaw/blob/main/docs/skills-as-branches.md JSON configuration schema for adding external community marketplaces to NanoClaw. This allows users to discover and install skills from trusted third-party repositories. ```json { "extraKnownMarketplaces": { "nanoclaw-skills": { "source": { "source": "github", "repo": "qwibitai/nanoclaw-skills" } }, "alice-nanoclaw-skills": { "source": { "source": "github", "repo": "alice/nanoclaw-skills" } } } } ``` -------------------------------- ### Install Packages in Container Image Source: https://github.com/qwibitai/nanoclaw/blob/main/src/modules/approvals/agent.md Use this to add apt and/or npm packages to your container image. Approval triggers an automatic image rebuild and container restart. Max 20 packages per request. ```javascript install_packages({ apt: ["ripgrep", "jq"], // names only, no version specs or flags npm: ["@anthropic-ai/sdk"], // global install reason: "need rg for fast code search" }) ```