### Clone and Install Dependencies Source: https://github.com/openmaster-ai/clawmaster/blob/main/CONTRIBUTING.md Clone the repository, navigate to the project directory, install dependencies, and start the development server. ```bash git clone https://github.com/openmaster-ai/clawmaster.git cd clawmaster npm install npm run dev:web # Starts backend (port 3001) + frontend (port 3000) npm test # Run all tests ``` -------------------------------- ### UI Flow Testing Setup Source: https://github.com/openmaster-ai/clawmaster/blob/main/AGENTS.md Commands to install and configure the dev-browser tool for end-to-end UI flow verification. ```bash # one-time setup npm install -g dev-browser dev-browser install # installs Playwright + Chromium ``` -------------------------------- ### Install Ollama Source: https://context7.com/openmaster-ai/clawmaster/llms.txt Initiate the installation process for Ollama. ```bash curl -X POST http://localhost:45557/api/ollama/install ``` -------------------------------- ### GET /api/system/info Source: https://context7.com/openmaster-ai/clawmaster/llms.txt Retrieves system information and the installation status of OpenClaw. ```APIDOC ## GET /api/system/info ### Description Retrieves system information and the installation status of OpenClaw. ### Method GET ### Endpoint /api/system/info ### Response #### Success Response (200) - **os** (string) - Operating system - **arch** (string) - System architecture - **hostname** (string) - Hostname of the machine - **openclawInstalled** (boolean) - Whether OpenClaw is installed - **openclawVersion** (string) - Version of OpenClaw installed #### Response Example { "os": "linux", "arch": "x64", "hostname": "workstation", "openclawInstalled": true, "openclawVersion": "0.8.2" } ``` -------------------------------- ### Install OpenClaw Plugin Source: https://context7.com/openmaster-ai/clawmaster/llms.txt Install a new plugin into OpenClaw by its ID. ```bash curl -X POST http://localhost:45557/api/plugins/install \ -H "Content-Type: application/json" \ -d '{"id": "memory-bridge"}' ``` -------------------------------- ### Install OpenClaw Skill Source: https://context7.com/openmaster-ai/clawmaster/llms.txt Install a skill into OpenClaw using its slug. ```bash curl -X POST http://localhost:45557/api/skills/install \ -H "Content-Type: application/json" \ -d '{"slug": "git-helper"}' ``` -------------------------------- ### Start OpenClaw Gateway Source: https://context7.com/openmaster-ai/clawmaster/llms.txt Starts the OpenClaw gateway service. Optionally, a specific profile can be provided to start the gateway with custom configurations. ```bash curl -X POST http://localhost:45557/api/gateway/start ``` -------------------------------- ### Start development environment Source: https://github.com/openmaster-ai/clawmaster/blob/main/AGENTS.md Commands to launch the web application and initiate browser automation. ```bash npm run dev:web # http://localhost:3000 dev-browser --headless <<'EOF' const page = await browser.getPage("main"); await page.goto("http://localhost:3000", { waitUntil: "domcontentloaded" }); await page.screenshot({ path: "screenshot.png" }); console.log(await page.title()); EOF ``` -------------------------------- ### List Installed Ollama Models Source: https://context7.com/openmaster-ai/clawmaster/llms.txt Get a list of all models installed in Ollama. Requires the base URL of the Ollama instance. ```bash curl "http://localhost:45557/api/ollama/models?baseUrl=http://localhost:11434" ``` -------------------------------- ### Run ClawMaster from source Source: https://github.com/openmaster-ai/clawmaster/blob/main/README.md Commands to clone the repository and start the development environment. ```bash git clone https://github.com/openmaster-ai/clawmaster.git cd clawmaster npm install npm run dev:web # web app + backend npm run tauri:dev # desktop app ``` -------------------------------- ### Get System Information Source: https://context7.com/openmaster-ai/clawmaster/llms.txt Retrieves information about the system and OpenClaw installation status. Use this to check if OpenClaw is installed and its version. ```bash curl http://localhost:45557/api/system/info ``` -------------------------------- ### Install and Run ClawMaster Service CLI Source: https://github.com/openmaster-ai/clawmaster/blob/main/README_CN.md Install the ClawMaster service CLI globally and use commands like 'doctor', 'serve', and 'status'. The default service address is http://127.0.0.1:3001. ```bash npm i -g clawmaster clawmaster doctor clawmaster serve --daemon clawmaster status ``` -------------------------------- ### Install WebKitGTK Driver and Xvfb for Linux Source: https://github.com/openmaster-ai/clawmaster/blob/main/tests/desktop/README.md Install necessary drivers and virtual framebuffer for running WebDriver tests on Linux. Xvfb is required for headless browser execution. ```bash sudo apt-get install webkit2gtk-driver xvfb ``` -------------------------------- ### Start Ollama Service Source: https://context7.com/openmaster-ai/clawmaster/llms.txt Start the Ollama service if it is not already running. ```bash curl -X POST http://localhost:45557/api/ollama/start ``` -------------------------------- ### List Installed OpenClaw Plugins Source: https://context7.com/openmaster-ai/clawmaster/llms.txt Retrieve a list of all plugins currently installed in OpenClaw. ```bash curl http://localhost:45557/api/plugins ``` -------------------------------- ### Get ClawProbe Optimization Suggestions Source: https://context7.com/openmaster-ai/clawmaster/llms.txt Request optimization suggestions from the ClawProbe diagnostic tool. ```bash curl http://localhost:45557/api/clawprobe/suggest ``` -------------------------------- ### List Installed OpenClaw Skills Source: https://context7.com/openmaster-ai/clawmaster/llms.txt Retrieve a list of all skills currently installed in OpenClaw. ```bash curl http://localhost:45557/api/skills ``` -------------------------------- ### Run ClawMaster Web Console and Backend Source: https://github.com/openmaster-ai/clawmaster/blob/main/README_CN.md Use this command to run the web console and backend services for ClawMaster. Ensure Node.js 20+ is installed. ```bash git clone https://github.com/openmaster-ai/clawmaster.git cd clawmaster npm install npm run dev:web # Web 控制台 + 后端 ``` -------------------------------- ### Scan Installed Skill for Security Source: https://context7.com/openmaster-ai/clawmaster/llms.txt Perform a security scan on an installed skill using its slug. ```bash curl -X POST http://localhost:45557/api/skills/scan \ -H "Content-Type: application/json" \ -d '{"slug": "custom-skill"}' ``` -------------------------------- ### Detect Ollama Installation Source: https://context7.com/openmaster-ai/clawmaster/llms.txt Check if Ollama is installed on the system. ```bash curl http://localhost:45557/api/ollama/detect ``` -------------------------------- ### Install Tauri Driver for Linux Source: https://github.com/openmaster-ai/clawmaster/blob/main/tests/desktop/README.md Install the tauri-driver for native WebDriver testing on Linux. This is a prerequisite for running WebDriver smoke tests. ```bash cargo install tauri-driver --locked ``` -------------------------------- ### Manage ClawMaster via Service CLI Source: https://github.com/openmaster-ai/clawmaster/blob/main/README.md Commands for installing and managing the ClawMaster service daemon. ```bash npm i -g clawmaster clawmaster doctor clawmaster serve --daemon clawmaster status ``` ```bash clawmaster serve --host 127.0.0.1 --port 3001 --daemon clawmaster serve --host 127.0.0.1 --port 3001 --token your-own-token clawmaster stop clawmaster doctor ``` -------------------------------- ### Get ClawProbe Configuration Source: https://context7.com/openmaster-ai/clawmaster/llms.txt Retrieve the current configuration settings for ClawProbe. ```bash curl http://localhost:45557/api/clawprobe/config ``` -------------------------------- ### Commit Message Convention Example Source: https://github.com/openmaster-ai/clawmaster/blob/main/CONTRIBUTING.md Example of a commit message following the Conventional Commits specification. ```text feat: add token usage chart to observe module ``` -------------------------------- ### List Available Backups Source: https://context7.com/openmaster-ai/clawmaster/llms.txt Lists all available backups for the OpenClaw installation. This helps in managing and identifying previous backup points. ```bash curl http://localhost:45557/api/settings/openclaw-backups ``` -------------------------------- ### Tauri Invoke Start Gateway Source: https://context7.com/openmaster-ai/clawmaster/llms.txt Invokes a Tauri command to start the gateway, optionally specifying a profile. This is used in the desktop application to manage the gateway lifecycle. ```typescript await invoke('start_gateway', { profile: 'dev' }); ``` -------------------------------- ### Create OpenClaw Backup Source: https://context7.com/openmaster-ai/clawmaster/llms.txt Initiates a backup of the OpenClaw installation. You can specify the backup mode (e.g., 'full') and the directory where the backup should be exported. ```bash curl -X POST http://localhost:45557/api/settings/openclaw-backup \ -H "Content-Type: application/json" \ -d '{"mode": "full", "exportDir": "/backups"}' ``` -------------------------------- ### Get OpenClaw Configuration Source: https://context7.com/openmaster-ai/clawmaster/llms.txt Fetches the current OpenClaw configuration. This is useful for understanding the current settings before making changes. ```bash curl http://localhost:45557/api/config ``` -------------------------------- ### List MCP Import Candidates Source: https://context7.com/openmaster-ai/clawmaster/llms.txt Get a list of potential import candidates from other tools like Cursor, VSCode, and Claude. ```bash curl http://localhost:45557/api/mcp/import-candidates ``` -------------------------------- ### Pull New Ollama Model Source: https://context7.com/openmaster-ai/clawmaster/llms.txt Download and install a new model into Ollama. Specify the model name in the request body. ```bash curl -X POST http://localhost:45557/api/ollama/pull \ -H "Content-Type: application/json" \ -d '{"name": "llama3:8b"}' ``` -------------------------------- ### Get Runtime Configuration Source: https://context7.com/openmaster-ai/clawmaster/llms.txt Retrieves the current ClawMaster runtime configuration. This includes settings like operating mode and backend port. ```bash curl http://localhost:45557/api/settings/runtime ``` -------------------------------- ### Get ClawProbe Status Source: https://context7.com/openmaster-ai/clawmaster/llms.txt Retrieve the current status of the ClawProbe diagnostic tool. ```bash curl http://localhost:45557/api/clawprobe/status ``` -------------------------------- ### Ollama Management API Source: https://context7.com/openmaster-ai/clawmaster/llms.txt Endpoints for managing local Ollama LLM installations and models. ```APIDOC ## GET /api/ollama/detect ### Description Detects if Ollama is installed on the system. ### Method GET ### Endpoint /api/ollama/detect ### Response #### Success Response (200) - **installed** (boolean) - Indicates if Ollama is installed. - **version** (string) - The installed Ollama version. - **path** (string) - The path to the Ollama executable. ``` ```APIDOC ## GET /api/ollama/status ### Description Gets the status of the Ollama service. ### Method GET ### Endpoint /api/ollama/status ### Query Parameters - **baseUrl** (string) - Required - The base URL of the Ollama service (e.g., http://localhost:11434). ``` ```APIDOC ## GET /api/ollama/running ### Description Checks if the Ollama service is currently running. ### Method GET ### Endpoint /api/ollama/running ### Query Parameters - **baseUrl** (string) - Required - The base URL of the Ollama service (e.g., http://localhost:11434). ``` ```APIDOC ## GET /api/ollama/models ### Description Lists all installed Ollama models. ### Method GET ### Endpoint /api/ollama/models ### Query Parameters - **baseUrl** (string) - Required - The base URL of the Ollama service (e.g., http://localhost:11434). ### Response #### Success Response (200) - **name** (string) - The name of the model. - **size** (integer) - The size of the model in bytes. - **modified** (string) - The last modified date of the model. ``` ```APIDOC ## POST /api/ollama/pull ### Description Pulls a new Ollama model from the registry. ### Method POST ### Endpoint /api/ollama/pull ### Parameters #### Request Body - **name** (string) - Required - The name of the model to pull (e.g., "llama3:8b"). ``` ```APIDOC ## POST /api/ollama/delete ### Description Deletes an installed Ollama model. ### Method POST ### Endpoint /api/ollama/delete ### Parameters #### Request Body - **name** (string) - Required - The name of the model to delete (e.g., "old-model:latest"). ``` ```APIDOC ## POST /api/ollama/install ### Description Installs the Ollama service. ### Method POST ### Endpoint /api/ollama/install ``` ```APIDOC ## POST /api/ollama/start ### Description Starts the Ollama service. ### Method POST ### Endpoint /api/ollama/start ``` -------------------------------- ### Manage Ollama via Tauri Source: https://context7.com/openmaster-ai/clawmaster/llms.txt Interact with Ollama using Tauri commands. Detect installation, list models, and pull new models. ```typescript // Tauri Ollama commands const installation = await invoke('detect_ollama_installation'); // Returns: { installed: true, version: '0.1.29', path: '/usr/local/bin/ollama' } const models = await invoke('list_ollama_models', { baseUrl: 'http://localhost:11434' }); // Returns: [{ name: 'llama3:8b', size: 4700000000, modified: '2024-01-10' }] await invoke('pull_ollama_model', { name: 'mistral:7b' }); ``` -------------------------------- ### Get ClawProbe Cost Analysis Source: https://context7.com/openmaster-ai/clawmaster/llms.txt Obtain cost analysis data from ClawProbe for a specified period (day, week, month). ```bash curl "http://localhost:45557/api/clawprobe/cost?period=week" ``` -------------------------------- ### Web Adapter Get Configuration Source: https://context7.com/openmaster-ai/clawmaster/llms.txt Uses the web adapter to retrieve the current OpenClaw configuration. This is typically used within a web-based frontend. ```typescript import { useAdapterCall } from '@clawmaster/web/adapters/useAdapterCall'; const { data, loading, error } = useAdapterCall('getConfig'); ``` -------------------------------- ### Get Ollama Status Source: https://context7.com/openmaster-ai/clawmaster/llms.txt Retrieve the status of the Ollama service. Requires the base URL of the Ollama instance. ```bash curl "http://localhost:45557/api/ollama/status?baseUrl=http://localhost:11434" ``` -------------------------------- ### Delete Ollama Model Source: https://context7.com/openmaster-ai/clawmaster/llms.txt Remove a model from your Ollama installation. Specify the model name in the request body. ```bash curl -X POST http://localhost:45557/api/ollama/delete \ -H "Content-Type: application/json" \ -d '{"name": "old-model:latest"}' ``` -------------------------------- ### Get Memory System Status Source: https://context7.com/openmaster-ai/clawmaster/llms.txt Retrieves the status of the OpenClaw memory system. This helps in understanding if the memory components are operational. ```bash curl http://localhost:45557/api/memory/status ``` -------------------------------- ### Get Memory File Content Source: https://context7.com/openmaster-ai/clawmaster/llms.txt Retrieves the content of a specific memory file. This allows direct access to stored data for inspection or processing. ```bash curl http://localhost:45557/api/memory/file/memories.json ``` -------------------------------- ### Tauri Invoke Get Memory Search Capability Source: https://context7.com/openmaster-ai/clawmaster/llms.txt Invokes a Tauri command to check the availability and engine of the OpenClaw memory search capability. Useful for determining if search functionality is ready. ```typescript const searchCapability = await invoke('get_openclaw_memory_search_capability'); // Returns: { available: true, engine: 'seekdb' } ``` -------------------------------- ### Tauri Invoke Gateway Status Source: https://context7.com/openmaster-ai/clawmaster/llms.txt Invokes a Tauri command to get the gateway status within a desktop application. Returns the running state, process ID, and uptime. ```typescript import { invoke } from '@tauri-apps/api/core'; // Get gateway status const status = await invoke('get_gateway_status'); // Returns: { running: true, pid: 12345, uptime: 3600 } ``` -------------------------------- ### Local Testing and Building Source: https://github.com/openmaster-ai/clawmaster/blob/main/CONTRIBUTING.md Run tests and build the project locally before pushing changes. For UI changes, also verify with dev-browser. ```bash npm test && npm run build ``` -------------------------------- ### Common Development Commands Source: https://github.com/openmaster-ai/clawmaster/blob/main/AGENTS.md Standard npm scripts for managing dependencies, running development servers, building the application, and executing tests. ```bash npm install # install dependencies npm run dev # web frontend only (port 3000) npm run dev:web # backend (port 3001) + frontend npm run dev:backend # Express backend only npm run tauri:dev # desktop app (Tauri) npm run build # production build + TypeScript check npm run tauri:build # desktop build (platform-specific) npm test # run all Vitest tests # Tauri build on Linux requires: export PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/share/pkgconfig export PKG_CONFIG_PATH_x86_64_unknown_linux_gnu=$PKG_CONFIG_PATH ``` -------------------------------- ### Bootstrap ClawProbe Source: https://context7.com/openmaster-ai/clawmaster/llms.txt Initiate the bootstrapping process for the ClawProbe diagnostic tool. ```bash curl -X POST http://localhost:45557/api/clawprobe/bootstrap ``` -------------------------------- ### Run tests and automation Source: https://github.com/openmaster-ai/clawmaster/blob/main/AGENTS.md Commands for executing the test suite and UI automation. ```bash npm test # full suite npx vitest run src/path/to/test # single file, from packages/web/ dev-browser --help # full UI automation API reference ``` -------------------------------- ### Development environment commands Source: https://github.com/openmaster-ai/clawmaster/blob/main/README.md Standard npm scripts for running different parts of the development stack. ```bash npm install npm run dev:web # frontend + backend npm run dev # frontend only (port 3000) npm run dev:backend # backend only (port 3001) npm run tauri:dev # desktop app ``` -------------------------------- ### Testing and CI commands Source: https://github.com/openmaster-ai/clawmaster/blob/main/README.md Commands for running unit tests, production builds, and desktop smoke tests. ```bash npm test # unit tests (Vitest) npm run build # type check + production build npm run test:desktop # desktop smoke (macOS: real Tauri build; Linux/Win: WebDriver) ``` -------------------------------- ### Run ClawMaster Desktop Application Source: https://github.com/openmaster-ai/clawmaster/blob/main/README_CN.md Use this command to run the desktop application for ClawMaster. Node.js 20+ and Rust are required for building the desktop version. ```bash git clone https://github.com/openmaster-ai/clawmaster.git cd clawmaster npm install npm run tauri:dev # 桌面应用 ``` -------------------------------- ### List Configured MCP Servers Source: https://context7.com/openmaster-ai/clawmaster/llms.txt Retrieve a list of all configured Model Context Protocol (MCP) servers. ```bash curl http://localhost:45557/api/mcp/servers ``` -------------------------------- ### Configure ClawMaster Service CLI Host, Port, and Token Source: https://github.com/openmaster-ai/clawmaster/blob/main/README_CN.md Customize the host, port, and token for the ClawMaster service. The --daemon flag runs the service in the background. ```bash clawmaster serve --host 127.0.0.1 --port 3001 --daemon clawmaster serve --host 127.0.0.1 --port 3001 --token your-own-token ``` -------------------------------- ### Project directory structure Source: https://github.com/openmaster-ai/clawmaster/blob/main/README.md Overview of the repository layout for ClawMaster. ```text clawmaster/ ├── packages/web/ React + Vite frontend ├── packages/backend/ Express backend for web mode ├── src-tauri/ Tauri desktop host ├── tests/ui/ YAML-based manual UI flow specs └── bin/clawmaster.mjs CLI entry point ``` -------------------------------- ### Run Desktop Smoke Tests Source: https://github.com/openmaster-ai/clawmaster/blob/main/tests/desktop/README.md Execute the default desktop smoke tests. This command initiates the testing process for the ClawMaster desktop application. ```bash npm run test:desktop ``` -------------------------------- ### Settings Routes Source: https://context7.com/openmaster-ai/clawmaster/llms.txt Endpoints for managing ClawMaster runtime settings, profiles, and backups. ```APIDOC ## GET /api/settings/runtime ### Description Gets current runtime configuration. ### Method GET ### Endpoint /api/settings/runtime ## POST /api/settings/runtime ### Description Updates runtime settings. ### Method POST ### Endpoint /api/settings/runtime ## POST /api/settings/openclaw-backup ### Description Creates an OpenClaw backup. ### Method POST ### Endpoint /api/settings/openclaw-backup ## GET /api/settings/openclaw-backups ### Description Lists available backups. ### Method GET ### Endpoint /api/settings/openclaw-backups ``` -------------------------------- ### Submit a pull request Source: https://github.com/openmaster-ai/clawmaster/blob/main/AGENTS.md Push your branch and create a PR using the GitHub CLI. ```bash git push -u origin feat/my-feature gh pr create --fill # opens the PR template ``` -------------------------------- ### Create a new feature branch Source: https://github.com/openmaster-ai/clawmaster/blob/main/AGENTS.md Use this command to initialize a new branch for your feature or fix. ```bash git checkout -b feat/short-description main # or fix/, docs/, test/, chore/ ``` -------------------------------- ### Launch Mode for Desktop Smoke Tests Source: https://github.com/openmaster-ai/clawmaster/blob/main/tests/desktop/README.md Execute desktop smoke tests in launch mode only. This is useful for testing the application's startup behavior without running full WebDriver tests. ```bash CLAWMASTER_DESKTOP_SMOKE_MODE=launch npm run test:desktop ``` -------------------------------- ### Connect to existing Chrome instance Source: https://github.com/openmaster-ai/clawmaster/blob/main/AGENTS.md Connects to a running Chrome instance with remote debugging enabled instead of launching a new headless browser. ```bash # launch Chrome with remote debugging enabled first # macOS: open -a "Google Chrome" --args --remote-debugging-port=9222 dev-browser --connect <<'EOF' const page = await browser.getPage("main"); // interact with the live app EOF ``` -------------------------------- ### List Memory Files Source: https://context7.com/openmaster-ai/clawmaster/llms.txt Lists all available memory files within the OpenClaw system. This is useful for managing stored data and understanding what information is available. ```bash curl http://localhost:45557/api/memory/files ``` -------------------------------- ### Restore OpenClaw from Backup Source: https://context7.com/openmaster-ai/clawmaster/llms.txt Use this endpoint to restore OpenClaw from a backup file. Requires dangerous authentication token. ```bash curl -X POST http://localhost:45557/api/settings/openclaw-restore \ -H "Content-Type: application/json" \ -H "X-Dangerous-Service-Auth: " \ -d '{"tarPath": "/backups/openclaw-backup-2024-01-15.tar.gz"}' ``` -------------------------------- ### Skip Build for Desktop Smoke Tests Source: https://github.com/openmaster-ai/clawmaster/blob/main/tests/desktop/README.md Run desktop smoke tests without rebuilding the application. Use this when you only need to test the application logic and not the build process. ```bash CLAWMASTER_DESKTOP_SKIP_BUILD=1 npm run test:desktop ``` -------------------------------- ### Implement an adapter Source: https://github.com/openmaster-ai/clawmaster/blob/main/AGENTS.md Define adapters in shared/adapters/ to wrap asynchronous commands. ```typescript import { ok, fail, wrapAsync } from '@/shared/adapters/types' export const myAdapter = { getSomething: () => wrapAsync(async () => { const raw = await execCommandJson('openclaw', ['my-feature', '--json']) return ok(raw) }), } ``` -------------------------------- ### Search for Skills in ClawhubRegistry Source: https://context7.com/openmaster-ai/clawmaster/llms.txt Search for skills available in the ClawhubRegistry using a query. ```bash curl "http://localhost:45557/api/skills/search?q=git" ``` -------------------------------- ### OpenClaw Settings API Source: https://context7.com/openmaster-ai/clawmaster/llms.txt Endpoints for managing OpenClaw settings, including restoring from backup. ```APIDOC ## POST /api/settings/openclaw-restore ### Description Restores OpenClaw from a backup file. Requires dangerous authentication. ### Method POST ### Endpoint /api/settings/openclaw-restore ### Parameters #### Request Body - **tarPath** (string) - Required - The path to the backup tar.gz file. ### Request Example ```json { "tarPath": "/backups/openclaw-backup-2024-01-15.tar.gz" } ``` ### Headers - **X-Dangerous-Service-Auth** (string) - Required - Authentication token. - **Content-Type** (string) - Required - application/json ``` -------------------------------- ### Configuration Routes Source: https://context7.com/openmaster-ai/clawmaster/llms.txt Endpoints for reading and updating the OpenClaw configuration. ```APIDOC ## GET /api/config ### Description Retrieves the current OpenClaw configuration. ### Method GET ### Endpoint /api/config ## PUT /api/config ### Description Updates the OpenClaw configuration. ### Method PUT ### Endpoint /api/config ### Request Body - **llm** (object) - LLM configuration settings ``` -------------------------------- ### Read MCP Config File Source: https://context7.com/openmaster-ai/clawmaster/llms.txt Read the content of an MCP configuration file from a specified path. ```bash curl -X POST http://localhost:45557/api/mcp/read-text \ -H "Content-Type: application/json" \ -d '{"path": "/home/user/.cursor/mcp.json"}' ``` -------------------------------- ### Execute PaddleOCR parsing scripts Source: https://github.com/openmaster-ai/clawmaster/blob/main/bundled-skills/paddleocr-doc-parsing/SKILL.md Use these commands to verify OCR configurations or parse documents from local files and remote URLs. ```bash # Verify the saved OCR config against the default sample image node ${SKILL_DIR}/scripts/test-connection.mjs # Parse a local PDF with the clean PDF preset node ${SKILL_DIR}/scripts/parse-document.mjs ./invoice.pdf --preset clean-pdf --markdown-out /tmp/invoice.md # Parse an image URL with mobile scan settings node ${SKILL_DIR}/scripts/parse-document.mjs https://example.com/photo.jpg --preset mobile-scan ``` -------------------------------- ### Check if Ollama is Running Source: https://context7.com/openmaster-ai/clawmaster/llms.txt Verify if the Ollama service is currently running. Requires the base URL of the Ollama instance. ```bash curl "http://localhost:45557/api/ollama/running?baseUrl=http://localhost:11434" ``` -------------------------------- ### ERNIE-Image Generation Default Configuration Source: https://github.com/openmaster-ai/clawmaster/blob/main/bundled-skills/ernie-image/SKILL.md Use this structure as a baseline for generating images with the ERNIE-Image API, including standard parameter defaults. ```python client.images.generate( model="ernie-image-turbo", prompt="...", n=1, response_format="b64_json", size="1024x1024", extra_body={ "seed": 42, "use_pe": True, "num_inference_steps": 8, "guidance_scale": 1.0, }, ) ``` -------------------------------- ### Memory Routes Source: https://context7.com/openmaster-ai/clawmaster/llms.txt Endpoints for managing OpenClaw memory files and performing searches. ```APIDOC ## GET /api/memory/status ### Description Gets the memory system status. ### Method GET ### Endpoint /api/memory/status ## GET /api/memory/files ### Description Lists all memory files. ### Method GET ### Endpoint /api/memory/files ## GET /api/memory/search ### Description Searches memory content. ### Method GET ### Endpoint /api/memory/search ### Parameters #### Query Parameters - **q** (string) - Search query - **limit** (integer) - Limit of results ## GET /api/memory/file/{filename} ### Description Gets content of a specific memory file. ### Method GET ### Endpoint /api/memory/file/{filename} ## DELETE /api/memory/file/{filename} ### Description Deletes a memory file. ### Method DELETE ### Endpoint /api/memory/file/{filename} ``` -------------------------------- ### Tauri Invoke List Memory Files Source: https://context7.com/openmaster-ai/clawmaster/llms.txt Invokes a Tauri command to list OpenClaw memory files. Returns an array of file objects with name, size, and modification date. ```typescript const memoryFiles = await invoke('list_openclaw_memory_files'); // Returns: [{ name: 'memories.json', size: 2048, modified: '2024-01-15T10:30:00Z' }] ``` -------------------------------- ### MCP (Model Context Protocol) Routes API Source: https://context7.com/openmaster-ai/clawmaster/llms.txt Endpoints for managing Model Context Protocol server configurations. ```APIDOC ## GET /api/mcp/servers ### Description Lists configured MCP servers. ### Method GET ### Endpoint /api/mcp/servers ``` ```APIDOC ## PUT /api/mcp/servers ### Description Updates MCP server configurations. ### Method PUT ### Endpoint /api/mcp/servers ### Parameters #### Request Body - **filesystem** (object) - Configuration for the filesystem transport. - **transport** (string) - "stdio" - **command** (string) - "npx" - **args** (array) - Array of strings for command arguments. - **enabled** (boolean) - Whether the filesystem transport is enabled. - **web-search** (object) - Configuration for the web search transport. - **transport** (string) - "http" - **url** (string) - The URL for the web search endpoint. - **headers** (object) - Headers for the HTTP request. - **enabled** (boolean) - Whether the web search transport is enabled. ``` ```APIDOC ## GET /api/mcp/import-candidates ### Description Lists import candidates from other tools (Cursor, VSCode, Claude). ### Method GET ### Endpoint /api/mcp/import-candidates ``` ```APIDOC ## POST /api/mcp/read-text ### Description Reads an MCP configuration file for import. ### Method POST ### Endpoint /api/mcp/read-text ### Parameters #### Request Body - **path** (string) - Required - The path to the MCP config file. ``` -------------------------------- ### Use i18n for UI strings Source: https://github.com/openmaster-ai/clawmaster/blob/main/AGENTS.md Always use the translation hook for visible text to support localization. ```typescript const { t } = useTranslation() // ✓ correct

{t('myFeature.title')}

// ✗ never — hardcoded strings are rejected in review

My Feature

``` -------------------------------- ### Create a Feature Branch Source: https://github.com/openmaster-ai/clawmaster/blob/main/CONTRIBUTING.md Create a new feature branch from the main branch to isolate your changes. ```bash git checkout -b feat/my-feature main ``` -------------------------------- ### Update Runtime Settings Source: https://context7.com/openmaster-ai/clawmaster/llms.txt Updates ClawMaster runtime settings. This allows changing the operating mode (e.g., 'wsl2'), specifying the WSL distribution, and configuring the backend port. ```bash curl -X POST http://localhost:45557/api/settings/runtime \ -H "Content-Type: application/json" \ -d '{"mode": "wsl2", "wslDistro": "Ubuntu", "backendPort": 45557}' ``` -------------------------------- ### Enable or Disable OpenClaw Plugin Source: https://context7.com/openmaster-ai/clawmaster/llms.txt Set the enabled status for a specific plugin by its ID. ```bash curl -X POST http://localhost:45557/api/plugins/set-enabled \ -H "Content-Type: application/json" \ -d '{"id": "memory-bridge", "enabled": true}' ``` -------------------------------- ### Web Adapter Save Configuration Source: https://context7.com/openmaster-ai/clawmaster/llms.txt Saves configuration changes using the web adapter. This function allows updating settings like LLM provider and model. ```typescript await adapter.saveConfig({ llm: { provider: 'anthropic', model: 'claude-3' } }); ``` -------------------------------- ### Plugins Management API Source: https://context7.com/openmaster-ai/clawmaster/llms.txt Endpoints for managing OpenClaw plugins and skills. ```APIDOC ## GET /api/plugins ### Description Lists installed plugins. ### Method GET ### Endpoint /api/plugins ``` ```APIDOC ## POST /api/plugins/install ### Description Installs a plugin. ### Method POST ### Endpoint /api/plugins/install ### Parameters #### Request Body - **id** (string) - Required - The ID of the plugin to install (e.g., "memory-bridge"). ``` ```APIDOC ## POST /api/plugins/set-enabled ### Description Enables or disables a plugin. ### Method POST ### Endpoint /api/plugins/set-enabled ### Parameters #### Request Body - **id** (string) - Required - The ID of the plugin. - **enabled** (boolean) - Required - Whether to enable the plugin. ``` ```APIDOC ## POST /api/plugins/uninstall ### Description Uninstalls a plugin. ### Method POST ### Endpoint /api/plugins/uninstall ### Parameters #### Request Body - **id** (string) - Required - The ID of the plugin to uninstall. - **keepFiles** (boolean) - Optional - Whether to keep the plugin files. ``` -------------------------------- ### Skills Management API Source: https://context7.com/openmaster-ai/clawmaster/llms.txt Endpoints for managing OpenClaw skills. ```APIDOC ## GET /api/skills ### Description Lists installed skills. ### Method GET ### Endpoint /api/skills ``` ```APIDOC ## GET /api/skills/search ### Description Searches for skills in the ClawhubRegistry. ### Method GET ### Endpoint /api/skills/search ### Query Parameters - **q** (string) - Required - The search query (e.g., "git"). ``` ```APIDOC ## POST /api/skills/install ### Description Installs a skill. ### Method POST ### Endpoint /api/skills/install ### Parameters #### Request Body - **slug** (string) - Required - The slug of the skill to install (e.g., "git-helper"). ``` ```APIDOC ## POST /api/skills/uninstall ### Description Uninstalls a skill. ### Method POST ### Endpoint /api/skills/uninstall ### Parameters #### Request Body - **slug** (string) - Required - The slug of the skill to uninstall (e.g., "git-helper"). ``` ```APIDOC ## POST /api/skills/scan ### Description Scans an installed skill for security vulnerabilities. ### Method POST ### Endpoint /api/skills/scan ### Parameters #### Request Body - **slug** (string) - Required - The slug of the skill to scan (e.g., "custom-skill"). ``` -------------------------------- ### Ensure MS Edge Driver on PATH for Windows Source: https://github.com/openmaster-ai/clawmaster/blob/main/tests/desktop/README.md Verify that the Microsoft Edge WebDriver (msedgedriver) is accessible via the system's PATH environment variable. This is crucial for WebDriver to control the Edge browser. ```bash matching `msedgedriver` on `PATH` ``` -------------------------------- ### Run OpenClaw CLI Command via API Source: https://context7.com/openmaster-ai/clawmaster/llms.txt Use this cURL command to execute an OpenClaw CLI command, such as checking the version, through the ClawMaster REST API. Ensure ClawMaster is running on localhost:45557. ```bash curl -X POST http://localhost:45557/api/exec \ -H "Content-Type: application/json" \ -d '{"command": "openclaw", "args": ["--version"]}' ``` -------------------------------- ### Fetch data with useAdapterCall Source: https://github.com/openmaster-ai/clawmaster/blob/main/AGENTS.md Use the useAdapterCall hook for data fetching to ensure proper state management. ```typescript import { useAdapterCall } from '@/shared/hooks/useAdapterCall' const { data, loading, error } = useAdapterCall(myAdapter.getSomething, { pollMs: 5000 }) ``` -------------------------------- ### Stop ClawMaster Service and Run Doctor Source: https://github.com/openmaster-ai/clawmaster/blob/main/README_CN.md Commands to stop the ClawMaster service and run the doctor command for diagnostics. ```bash clawmaster stop clawmaster doctor ``` -------------------------------- ### Update OpenClaw Configuration Source: https://context7.com/openmaster-ai/clawmaster/llms.txt Updates the OpenClaw configuration. Ensure the request body is valid JSON and specifies the desired configuration parameters, such as LLM provider and model. ```bash curl -X PUT http://localhost:45557/api/config \ -H "Content-Type: application/json" \ -d '{"llm": {"provider": "openai", "model": "gpt-4"}}' ``` -------------------------------- ### WebDriver Mode for Desktop Smoke Tests Source: https://github.com/openmaster-ai/clawmaster/blob/main/tests/desktop/README.md Execute desktop smoke tests specifically in WebDriver mode. This ensures the WebDriver integration is functioning correctly. ```bash CLAWMASTER_DESKTOP_SMOKE_MODE=webdriver npm run test:desktop ``` -------------------------------- ### Search Memory Content Source: https://context7.com/openmaster-ai/clawmaster/llms.txt Searches the OpenClaw memory content for specific queries. You can specify a search term and a limit for the number of results returned. ```bash curl "http://localhost:45557/api/memory/search?q=authentication&limit=10" ``` -------------------------------- ### ClawProbe Routes API Source: https://context7.com/openmaster-ai/clawmaster/llms.txt Diagnostic and monitoring endpoints for OpenClaw health and costs. ```APIDOC ## GET /api/clawprobe/status ### Description Gets the current status of ClawProbe. ### Method GET ### Endpoint /api/clawprobe/status ``` ```APIDOC ## GET /api/clawprobe/cost ### Description Retrieves cost analysis data. ### Method GET ### Endpoint /api/clawprobe/cost ### Query Parameters - **period** (string) - Optional - The period for cost analysis (e.g., "day", "week", "month"). Defaults to "week". ``` ```APIDOC ## GET /api/clawprobe/suggest ### Description Gets optimization suggestions from ClawProbe. ### Method GET ### Endpoint /api/clawprobe/suggest ``` ```APIDOC ## GET /api/clawprobe/config ### Description Retrieves the ClawProbe configuration. ### Method GET ### Endpoint /api/clawprobe/config ``` ```APIDOC ## POST /api/clawprobe/bootstrap ### Description Initializes or bootstraps the ClawProbe service. ### Method POST ### Endpoint /api/clawprobe/bootstrap ``` -------------------------------- ### Uninstall OpenClaw Plugin Source: https://context7.com/openmaster-ai/clawmaster/llms.txt Remove a plugin from OpenClaw. Optionally keep plugin files. ```bash curl -X POST http://localhost:45557/api/plugins/uninstall \ -H "Content-Type: application/json" \ -d '{"id": "memory-bridge", "keepFiles": false}' ``` -------------------------------- ### Manage OpenClaw Profiles via Tauri Source: https://context7.com/openmaster-ai/clawmaster/llms.txt Invoke Tauri commands to manage OpenClaw profiles. Use 'save_openclaw_profile' to save a named profile or 'clear_openclaw_profile' to reset to default. Backup operations are also available. ```typescript // Profile management via Tauri await invoke('save_openclaw_profile', { profile: { kind: 'named', name: 'production' }, seed: { mode: 'clone-current' } }); // Clear profile (reset to default) await invoke('clear_openclaw_profile'); // Backup operations const backup = await invoke('create_openclaw_backup', { mode: 'full', exportDir: '/home/user/backups' }); // Returns: { path: '/home/user/backups/openclaw-2024-01-15.tar.gz', size: 1048576 } ``` -------------------------------- ### Gateway Routes Source: https://context7.com/openmaster-ai/clawmaster/llms.txt Endpoints to control the OpenClaw gateway service lifecycle. ```APIDOC ## GET /api/gateway/status ### Description Checks the current status of the OpenClaw gateway. ### Method GET ### Endpoint /api/gateway/status ## POST /api/gateway/start ### Description Starts the OpenClaw gateway. ### Method POST ### Endpoint /api/gateway/start ## POST /api/gateway/stop ### Description Stops the OpenClaw gateway. ### Method POST ### Endpoint /api/gateway/stop ## POST /api/gateway/restart ### Description Restarts the OpenClaw gateway. ### Method POST ### Endpoint /api/gateway/restart ``` -------------------------------- ### Restart OpenClaw Gateway Source: https://context7.com/openmaster-ai/clawmaster/llms.txt Restarts the OpenClaw gateway service. This is useful for applying configuration changes or recovering from potential issues. ```bash curl -X POST http://localhost:45557/api/gateway/restart ``` -------------------------------- ### Update MCP Server Configuration Source: https://context7.com/openmaster-ai/clawmaster/llms.txt Modify the configuration for MCP servers. Supports 'stdio' and 'http' transports with various options. ```bash curl -X PUT http://localhost:45557/api/mcp/servers \ -H "Content-Type: application/json" \ -d '{ "filesystem": { "transport": "stdio", "command": "npx", "args": ["-y", "@modelcontextprotocol/server-filesystem", "/home/user"], "enabled": true }, "web-search": { "transport": "http", "url": "http://localhost:8080/mcp", "headers": {"Authorization": "Bearer token"}, "enabled": true } }' ``` -------------------------------- ### Tauri Invoke Search Memory Source: https://context7.com/openmaster-ai/clawmaster/llms.txt Invokes a Tauri command to search OpenClaw memory. Allows specifying a query and a limit for results, used within the desktop application. ```typescript const searchResults = await invoke('search_openclaw_memory', { query: 'user preferences', limit: 20 }); ``` -------------------------------- ### Stop OpenClaw Gateway Source: https://context7.com/openmaster-ai/clawmaster/llms.txt Stops the OpenClaw gateway service. Use this command to gracefully shut down the gateway. ```bash curl -X POST http://localhost:45557/api/gateway/stop ``` -------------------------------- ### Uninstall OpenClaw Skill Source: https://context7.com/openmaster-ai/clawmaster/llms.txt Remove a skill from OpenClaw using its slug. ```bash curl -X POST http://localhost:45557/api/skills/uninstall \ -H "Content-Type: application/json" \ -d '{"slug": "git-helper"}' ``` -------------------------------- ### Define a ClawModule Source: https://github.com/openmaster-ai/clawmaster/blob/main/AGENTS.md Export a ClawModule object in index.ts to register a new feature module. ```typescript import { lazy } from 'react' import type { ClawModule } from '@/app/modules/types' export default { id: 'my-feature', name: 'myFeature.title', // i18n key — never a raw string icon: 'lucide-icon-name', route: { path: '/my-feature', component: lazy(() => import('./MyFeaturePage')) }, navOrder: 50, } satisfies ClawModule ``` -------------------------------- ### Check Gateway Status Source: https://context7.com/openmaster-ai/clawmaster/llms.txt Checks the current status of the OpenClaw gateway service. This endpoint is useful for monitoring the gateway's operational state. ```bash curl http://localhost:45557/api/gateway/status ``` -------------------------------- ### Tauri Invoke Stop Gateway Source: https://context7.com/openmaster-ai/clawmaster/llms.txt Invokes a Tauri command to stop the gateway within the desktop application. This provides a way to shut down the service from the UI. ```typescript await invoke('stop_gateway'); ``` -------------------------------- ### Delete Memory File Source: https://context7.com/openmaster-ai/clawmaster/llms.txt Deletes a specified memory file from the OpenClaw system. Use this to remove old or unnecessary data files. ```bash curl -X DELETE http://localhost:45557/api/memory/file/old-memories.json ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.