### Extension Setup Wizard Source: https://github.com/nearai/ironclaw/blob/main/src/channels/web/CLAUDE.md Initiates the setup wizard for an extension. Can be accessed via GET or POST. ```APIDOC ## GET/POST /api/extensions/{name}/setup ### Description Initiates the setup wizard for an extension. ### Method GET, POST ### Endpoint /api/extensions/{name}/setup ### Parameters #### Path Parameters - **name** (string) - Required - The name of the extension to set up. ``` -------------------------------- ### Manual Quick Start for WebUI Source: https://github.com/nearai/ironclaw/blob/main/docs/reborn-binary.md Step-by-step guide to setting up and running the Reborn WebUI manually. This involves setting the Reborn home directory, configuring a model provider, and setting authentication environment variables. ```bash # 1. For serve/run/repl the Reborn home must live OUTSIDE your current working # directory: these commands use the cwd as the local-dev workspace root and # reject overlap with it (see gotchas). Other commands have no such rule. export IRONCLAW_REBORN_HOME="$HOME/.ironclaw-reborn-demo" # 2. Configure a model route. NEAR AI shown here; swap the provider id and key # env var for any row in the table below. set-provider records the credential # env-var NAME in config.toml; the secret VALUE stays in the environment. cargo run -q -p ironclaw_reborn_cli --features webui-v2-beta --bin ironclaw-reborn -- \ models set-provider nearai export NEARAI_API_KEY="your-key-here" # 3. WebUI auth. serve REQUIRES both values or it refuses to start. The variable # NAMES below are the defaults; override them via [webui].env_token_var and # [webui].env_user_id_var in config.toml if you prefer different names. export IRONCLAW_REBORN_WEBUI_TOKEN="$(openssl rand -hex 32)" # bearer token you log in with export IRONCLAW_REBORN_WEBUI_USER_ID="reborn-cli" # must match [identity].default_owner ``` -------------------------------- ### Setup Virtual Environment and Install Dependencies Source: https://github.com/nearai/ironclaw/blob/main/tests/e2e/CLAUDE.md Commands to set up a Python virtual environment, activate it, and install project dependencies using pip. Also includes installing browser binaries for Playwright. ```bash cd tests/e2e # Create virtualenv (one-time) python -m venv .venv source .venv/bin/activate # or .venv\Scripts\activate on Windows # Install dependencies pip install -e . # Install browser binaries (one-time) playwright install chromium ``` -------------------------------- ### Setup Live Canary Configuration Source: https://github.com/nearai/ironclaw/blob/main/scripts/auth_live_canary/README.md Copy the example configuration file and source it to load environment variables for the live canary tests. Ensure all necessary provider credentials are set. ```bash cd scripts/auth_live_canary cp config.example.env config.env set -a && source config.env && set +a ``` -------------------------------- ### Mark CEO Setup Complete Source: https://github.com/nearai/ironclaw/blob/main/skills/ceo-setup/SKILL.md Writes a marker file to indicate that the CEO setup process is complete. This file includes details about installed missions and widgets. Deleting this file can re-trigger setup. ```shell memory_write( target: "projects/commitments/.ceo-setup-complete", content: "# CEO Setup Complete\n\nCompleted: \n\nMissions installed: commitment-triage, commitment-digest\nWidgets installed: commitments-this-week, delegations-waiting\n", append: false ) ``` -------------------------------- ### Clone Repository and Setup Development Environment Source: https://github.com/nearai/ironclaw/blob/main/CONTRIBUTING.md Clone the Ironclaw repository and run the setup script to install necessary tools and dependencies. ```bash git clone https://github.com/nearai/ironclaw.git cd ironclaw ./scripts/dev-setup.sh ``` -------------------------------- ### Mark Content Creator Setup Complete Source: https://github.com/nearai/ironclaw/blob/main/skills/content-creator-setup/SKILL.md Writes a completion marker to prevent re-triggering setup. Delete this file to re-initiate setup. ```python memory_write( target: "projects/commitments/.content-creator-setup-complete", content: "# Content Creator Setup Complete\n\nCompleted: \n\nMissions installed: creator-triage, creator-digest, creator-idea-resurface" ) ``` -------------------------------- ### Install Rust and Build IronClaw from Source Source: https://github.com/nearai/ironclaw/blob/main/docs/drafts/platforms/macos.mdx Install Rust using the official script and then build and install IronClaw using Cargo. ```bash # Install Rust if needed curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh # Build and install cargo install ironclaw ``` -------------------------------- ### Local Coding Agent Startup Output Source: https://github.com/nearai/ironclaw/blob/main/docs/reborn/contracts/runtime-profiles.md Example output displayed when the local coding agent starts, indicating the active trust boundary and profile settings. ```text IronClaw Local Coding Agent Profile: local-dev Filesystem: direct workspace writes under /repo Shell: local host shell; approval for dangerous commands Network: direct/logged Secrets: inherited env limited by profile Audit: enabled ``` -------------------------------- ### Local Setup for Live Canary Tests Source: https://github.com/nearai/ironclaw/blob/main/scripts/live-canary/ACCOUNTS.md Sets up the local environment for live canary tests by copying an example configuration file, sourcing environment variables, and listing available test cases for seeded and browser modes. ```bash cd scripts/auth_live_canary cp config.example.env config.env set -a && source config.env && set +a cd ../.. # List seeded cases: python3 scripts/auth_live_canary/run_live_canary.py --mode seeded --list-cases # List browser cases: python3 scripts/auth_live_canary/run_live_canary.py --mode browser --list-cases ``` -------------------------------- ### Install Cloudflared as a Service Source: https://github.com/nearai/ironclaw/blob/main/docs/drafts/install/vps.mdx Installs cloudflared as a systemd service, enables it to start on boot, and starts the service immediately. ```bash sudo cloudflared service install sudo systemctl enable --now cloudflared ``` -------------------------------- ### Get Installed Extensions Source: https://github.com/nearai/ironclaw/blob/main/src/channels/web/CLAUDE.md Retrieves a list of all currently installed extensions. ```APIDOC ## GET /api/extensions ### Description Retrieves a list of all currently installed extensions. ### Method GET ### Endpoint /api/extensions ### Response #### Success Response (200) - extensions (array) - A list of installed extensions. ``` -------------------------------- ### Quick Mode Database Setup Source: https://github.com/nearai/ironclaw/blob/main/src/setup/README.md Demonstrates the auto_setup_database() function in quick mode. It defaults to libsql at ~/.ironclaw/ironclaw.db if no existing env vars are set. ```rust auto_setup_database() → libsql at ~/.ironclaw/ironclaw.db (zero prompts) ``` -------------------------------- ### Install Service (macOS Homebrew) Source: https://github.com/nearai/ironclaw/blob/main/docs/drafts/install/local.mdx Installs and starts the IronClaw service using Homebrew services. ```bash ironclaw service install brew services start ironclaw ``` -------------------------------- ### Install and Enable Service (Linux) Source: https://github.com/nearai/ironclaw/blob/main/docs/drafts/install/local.mdx Installs the IronClaw service and enables it to start automatically on boot. ```bash ironclaw service install sudo systemctl enable --now ironclaw ``` -------------------------------- ### Basic WebUI Service Startup with Environment Variables Source: https://github.com/nearai/ironclaw/blob/main/README.md Starts the Reborn WebUI service using environment variables for configuration. Sets up the home directory, API key, bearer token, and user ID. ```bash export IRONCLAW_REBORN_HOME="$PWD/.reborn-home" export OPENAI_API_KEY="sk-..." # or the required env var for your configured provider export IRONCLAW_REBORN_WEBUI_TOKEN="$(openssl rand -hex 32)" export IRONCLAW_REBORN_WEBUI_USER_ID="reborn-cli" cargo run -q -p ironclaw_reborn_cli --features webui-v2-beta --bin ironclaw-reborn -- serve ``` -------------------------------- ### POST /api/reborn/product-auth/oauth/google/start Source: https://github.com/nearai/ironclaw/blob/main/docs/reborn/contracts/auth-product.md Initiates a Google product-auth setup flow using configured Reborn Google OAuth client metadata. Returns a Google authorization URL with PKCE/offline consent and the invocation scope. ```APIDOC ## POST /api/reborn/product-auth/oauth/google/start ### Description Open a Google product-auth setup flow from configured Reborn Google OAuth client metadata; returns a Google authorization URL with PKCE/offline consent and invocation scope. ### Method POST ### Endpoint /api/reborn/product-auth/oauth/google/start ### Parameters #### Request Body - **(Implicit)**: The request body is processed with `LocalGateway` + `BearerToken` + per-caller body and rate-limit posture. ### Response #### Success Response (200) - **authorization_url** (string) - The Google authorization URL with PKCE/offline consent. - **invocation_scope** (object) - The invocation scope derived from the authenticated caller. ``` -------------------------------- ### Install GNOME Keyring in WSL2 Source: https://github.com/nearai/ironclaw/blob/main/docs/drafts/platforms/windows-wsl2.mdx Installs the GNOME Keyring daemon and starts it for managing secrets within WSL2. ```bash sudo apt install gnome-keyring # Start the keyring daemon in your shell session eval $(gnome-keyring-daemon --start --components=secrets) export GNOME_KEYRING_CONTROL ``` -------------------------------- ### Skipping Setup Steps with `--channels-only` Source: https://github.com/nearai/ironclaw/blob/main/src/setup/README.md Demonstrates how to run only Step 6 (Channel Configuration) by using the `--channels-only` mode. ```text --channels-only ``` -------------------------------- ### Install PostgreSQL and pgvector on macOS with Homebrew Source: https://github.com/nearai/ironclaw/blob/main/docs/capabilities/database.mdx Install PostgreSQL and the pgvector extension on macOS using Homebrew. Starts the PostgreSQL service. ```bash brew install postgresql brew install pgvector brew services start postgresql ``` -------------------------------- ### Full SKILL.md Example Source: https://github.com/nearai/ironclaw/blob/main/docs/drafts/agents/skills-format.mdx A comprehensive example demonstrating the YAML frontmatter for skill activation and a markdown body with instructions and common commands. ```yaml --- name: kubernetes-deploy version: 0.2.0 description: Kubernetes deployment and operations guidance activation: patterns: - "deploy to.*production" - "rollback.*deployment" - "kubectl.*error" keywords: - deployment - kubernetes - kubectl - k8s - pod - namespace max_context_tokens: 2000 metadata: ironclaw: requires: bins: - kubectl - docker env: - KUBECONFIG --- # Kubernetes Deployment Skill You are operating in a Kubernetes environment. Follow these guidelines: ## Deployment Checklist Before deploying to production: 1. Verify the image tag is pinned (never use `latest`) 2. Check resource limits are set on all containers 3. Confirm readiness and liveness probes are defined 4. Review the rollout strategy (RollingUpdate recommended) ## Common Commands ```bash # Check rollout status kubectl rollout status deployment/ -n # Rollback to previous version kubectl rollout undo deployment/ -n # View pod logs kubectl logs -l app= -n --tail=100 ``` ## Error Patterns - `ImagePullBackOff` → Check image name, tag, and registry credentials - `CrashLoopBackOff` → Check container logs and resource limits - `Pending` → Check node resources and PVC availability ``` -------------------------------- ### Install Dependencies Source: https://github.com/nearai/ironclaw/blob/main/docs/architecture-video/README.md Run this command once to install all necessary project dependencies. ```console npm ci ``` -------------------------------- ### GET /api/extensions/tools Source: https://github.com/nearai/ironclaw/blob/main/docs/drafts/ops/api.mdx Lists the tools provided by installed extensions. ```APIDOC ## GET /api/extensions/tools ### Description Lists the tools provided by installed extensions. ### Method GET ### Endpoint /api/extensions/tools ``` -------------------------------- ### webui.v2.setup_extension Source: https://github.com/nearai/ironclaw/blob/main/crates/ironclaw_webui_v2/CLAUDE.md Sets up or updates the configuration for a specific extension. ```APIDOC ## POST /api/webchat/v2/extensions/{package_id}/setup ### Description Sets up or updates the configuration for a specific extension. ### Method POST ### Endpoint /api/webchat/v2/extensions/{package_id}/setup ### Parameters #### Path Parameters - **package_id** (string) - Required - The ID of the package to set up. #### Request Body - (type) - Required - The setup configuration for the extension. ### Request Example { "example": "request body" } ### Response #### Success Response (200) - (type) - Description #### Response Example { "example": "response body" } ``` -------------------------------- ### Ironclaw Setup Steps Overview Source: https://github.com/nearai/ironclaw/blob/main/src/setup/README.md This outlines the sequential steps involved in setting up the Ironclaw project. Some steps can be skipped based on command-line flags. ```text Step 1: Database Connection Step 2: Security (master key) Step 3: Inference Provider ← skipped if --skip-auth Step 4: Model Selection Step 5: Embeddings Step 6: Channel Configuration Step 7: Extensions (tools) Step 8: Docker Sandbox Step 9: Background Tasks (heartbeat) ↓ save_and_summarize() ``` -------------------------------- ### Install and Enable Fail2Ban Source: https://github.com/nearai/ironclaw/blob/main/docs/infrastructure/droplet.mdx Install Fail2Ban to protect your Droplet from brute-force attacks by monitoring logs and banning malicious IPs. Enable and start the service. ```bash apt install fail2ban -y systemctl enable fail2ban systemctl start fail2ban ``` -------------------------------- ### Install Google Sheets Extension Source: https://github.com/nearai/ironclaw/blob/main/docs/extensions/google/sheets.md Install the Google Sheets extension using the IronClaw CLI. Ensure you have completed the Google OAuth setup beforehand. ```bash ironclaw registry install google-sheets ``` -------------------------------- ### Run Setup and Bootstrap Tests Source: https://github.com/nearai/ironclaw/blob/main/src/setup/README.md Execute tests specifically for the setup and bootstrap modules within the library. ```bash cargo test --lib -- setup cargo test --lib -- bootstrap ``` -------------------------------- ### Develop and Preview Documentation Locally Source: https://github.com/nearai/ironclaw/blob/main/CONTRIBUTING.md Navigate to the docs directory and run this command to start a local development server for previewing documentation changes. ```bash cd docs mint dev ``` -------------------------------- ### Install and Configure PostgreSQL with pgvector Source: https://github.com/nearai/ironclaw/blob/main/docs/drafts/install/vps.mdx Install PostgreSQL and the pgvector extension, then create a dedicated user and database for IronClaw. This setup is recommended for production environments. ```bash # Install PostgreSQL sudo apt install postgresql postgresql-contrib # Start PostgreSQL sudo systemctl enable --now postgresql # Create database and user sudo -u postgres psql <\n\nRepos: \nMaintainers: \nMissions installed: wf-issue-plan, wf-maintainer-gate, wf-pr-monitor, wf-ci-fix, wf-learning, plus 6 personal productivity missions (commitment-triage, commitment-digest, dev-stale-pr-check, dev-weekly-retro, dev-tech-debt-resurface, dev-decision-outcome-check)" ) ``` -------------------------------- ### POST /api/reborn/product-auth/oauth/start Source: https://github.com/nearai/ironclaw/blob/main/docs/reborn/contracts/auth-product.md Initiates an OAuth setup flow. It returns a redacted authorization URL and the invocation scope for the authenticated caller. ```APIDOC ## POST /api/reborn/product-auth/oauth/start ### Description Open an OAuth setup flow; returns redacted authorization URL + invocation scope. ### Method POST ### Endpoint /api/reborn/product-auth/oauth/start ### Parameters #### Request Body - **(Implicit)**: The request body is processed with `LocalGateway` + `BearerToken` + per-caller body and rate-limit posture. ### Response #### Success Response (200) - **authorization_url** (string) - Redacted authorization URL. - **invocation_scope** (object) - The invocation scope derived from the authenticated caller. ``` -------------------------------- ### Setup E2E Tests Environment Source: https://github.com/nearai/ironclaw/blob/main/docs/plans/2026-02-24-e2e-infrastructure.md Install necessary Python dependencies and Playwright browsers for running E2E tests. ```bash cd tests/e2e pip install -e . playwright install chromium ``` -------------------------------- ### Build Configurations for Database Module Source: https://github.com/nearai/ironclaw/blob/main/src/db/CLAUDE.md Commands to build the project with different backend configurations. Use `--features libsql` for libSQL/Turso support, or `--features "postgres,libsql"` for both. ```bash cargo build cargo build --no-default-features --features libsql cargo build --features "postgres,libsql" cargo check cargo check --no-default-features --features libsql cargo check --all-features ``` -------------------------------- ### Manage Homebrew Services Source: https://github.com/nearai/ironclaw/blob/main/docs/drafts/platforms/macos.mdx Use these commands to start, stop, restart, or check the status of IronClaw when installed via Homebrew. ```bash # Start now and on login brew services start ironclaw ``` ```bash # Stop brew services stop ironclaw ``` ```bash # Restart brew services restart ironclaw ``` ```bash # View status brew services list | grep ironclaw ``` -------------------------------- ### Mock LLM Server Manual Start Source: https://github.com/nearai/ironclaw/blob/main/tests/e2e/CLAUDE.md Starts the mock LLM server manually. The port is auto-selected and printed to standard output. ```bash python mock_llm.py --port 0 ``` -------------------------------- ### Setup E2E Python Environment Source: https://github.com/nearai/ironclaw/blob/main/scripts/telegram_smoke/README.md Installs the necessary Python dependencies for the end-to-end tests, including the Telegram specific components. ```bash cd tests/e2e python -m venv .venv source .venv/bin/activate pip install -e '.[telegram]' ``` -------------------------------- ### Install Slack Tool (Database Storage) Source: https://github.com/nearai/ironclaw/blob/main/tools-src/slack/README.md Install the Slack tool using the agent CLI, storing the WASM and capabilities in the database. ```bash ironclaw tool install \ --name slack \ --wasm target/wasm32-wasip2/release/slack_tool.wasm \ --capabilities slack.capabilities.json ``` -------------------------------- ### Get Slack User Info Source: https://github.com/nearai/ironclaw/blob/main/tools-src/slack/README.md Example JSON payload for retrieving information about a specific Slack user. Requires 'user_id'. ```json { "action": "get_user_info", "user_id": "U1234567890" } ``` -------------------------------- ### Setup IFrame with Options Source: https://github.com/nearai/ironclaw/blob/main/tests/test-pages/cnn/source.html Initializes an iframe with specified options, including setting size limits, ensuring an ID, and configuring scrolling behavior. ```javascript function setupIFrame(options) { function setLimits() { function addStyle(style) { if ((Infinity !== settings[iframeId][style]) && (0 !== settings[iframeId][style])) { iframe.style[style] = settings[iframeId][style] + 'px'; log(' Set ' + style + ' = ' + settings[iframeId][style] + 'px'); } } addStyle('maxHeight'); addStyle('minHeight'); addStyle('maxWidth'); addStyle('minWidth'); } function ensureHasId(iframeId) { if ('' === iframeId) { iframe.id = iframeId = 'iFrameResizer' + count++; logEnabled = (options || {}).log; log(' Added missing iframe ID: ' + iframeId + ' (' + iframe.src + ')'); } return iframeId; } function setScrolling() { log(' IFrame scrolling ' + (settings[iframeId].scrolling ? 'enabled' : 'disabled') + ' for ' + iframeId); iframe.style.overflow = false === settings[iframeId].scrolling ? 'hidden' : 'auto'; iframe.scrolling = false === settings[iframeId].scrolling ? 'no' : 'yes'; } function setupBodyMarginValues() { if (('number' === typeof(settings[iframeId].bodyMargin)) || ('0' === settings[iframeId].bodyMargin)) { settings[iframeId].bodyMarginV1 = settings[iframeId].bodyMargin; settings[iframeId].bodyMargin = '' + settings[iframeId].bodyMargin + 'px'; } } function createOutgoingMsg() { return iframeId + ':' + settings[iframeId].bodyMarginV1 + ':' + settings[iframeId].sizeWidth + ':' + settings[iframeId].log + ':' + settings[iframeId].interval + ':' + settings[ifr } ``` -------------------------------- ### Get Slack Channel History Source: https://github.com/nearai/ironclaw/blob/main/tools-src/slack/README.md Example JSON payload for retrieving recent messages from a Slack channel. Requires 'channel' and an optional 'limit'. ```json { "action": "get_channel_history", "channel": "C1234567890", "limit": 10 } ``` -------------------------------- ### Environment File Example Source: https://github.com/nearai/ironclaw/blob/main/docs/capabilities/configuration.mdx Example of a .env file for configuring IronClaw settings, including database, LLM, gateway, sandbox, and heartbeat. ```bash # Database DATABASE_BACKEND=libsql LIBSQL_PATH=/home/user/.ironclaw/ironclaw.db # LLM (NEAR AI) LLM_BACKEND=nearai # Web Gateway GATEWAY_ENABLED=true GATEWAY_HOST=127.0.0.1 GATEWAY_PORT=3000 # Optional: Persistent auth token GATEWAY_AUTH_TOKEN=your-secure-token-here # Sandbox SANDBOX_ENABLED=true SANDBOX_POLICY=workspace_write # Heartbeat HEARTBEAT_ENABLED=true HEARTBEAT_INTERVAL_SECS=1800 ``` -------------------------------- ### Bootstrap Environment Variables (PostgreSQL) Source: https://github.com/nearai/ironclaw/blob/main/src/setup/README.md Example of bootstrap environment variables stored in '~/.ironclaw/.env' for PostgreSQL backend. These are essential for initial setup before database connection. ```env IRONCLAW_PROFILE="local" DATABASE_BACKEND="postgres" DATABASE_URL="postgres://user:pass@localhost/ironclaw" SECRETS_MASTER_KEY="..." ONBOARD_COMPLETED="true" ``` -------------------------------- ### Onboard IronClaw Setup Source: https://github.com/nearai/ironclaw/blob/main/docs/drafts/reference/cli.mdx Launches the interactive setup wizard for configuring database, LLM, channels, and security settings. Use `--skip-auth` to bypass authentication or `--channels-only` to configure only channels. ```bash ironclaw onboard [OPTIONS] ``` ```bash ironclaw onboard ``` ```bash ironclaw onboard --skip-auth ``` ```bash ironclaw onboard --channels-only ```