### Start Development Server Source: https://github.com/aliramw/lalaclaw/blob/main/docs/en/documentation-api-troubleshooting.md For development, follow the Quick Start guide and run both Vite and the Node.js server. ```bash npm start ``` -------------------------------- ### Build and Start Production Mode Source: https://github.com/aliramw/lalaclaw/blob/main/docs/en/documentation-quick-start.md Commands to build the application and start the production server. ```bash npm run build npm run lalaclaw:start ``` -------------------------------- ### Start Frontend Development Server Source: https://github.com/aliramw/lalaclaw/blob/main/AGENTS.md Run this command in the project root to start the frontend development server. ```bash npm run dev -- --host 127.0.0.1 --port 5173 --strictPort ``` -------------------------------- ### Install via npm Source: https://github.com/aliramw/lalaclaw/blob/main/docs/pt/documentation-quick-start.md Standard installation using npm for global access. ```bash npm install -g lalaclaw@latest lalaclaw init ``` ```powershell npm install -g lalaclaw@latest lalaclaw init ``` -------------------------------- ### Start Development Server Source: https://github.com/aliramw/lalaclaw/blob/main/CONTRIBUTING.md Run the main development workflow to start all services. The frontend development entry point is provided. ```bash npm run dev:all ``` -------------------------------- ### Setup and Run End-to-End Tests Source: https://github.com/aliramw/lalaclaw/blob/main/CONTRIBUTING.md Install Playwright browsers and run end-to-end tests. Use `test:e2e:headed` to observe the browser during local development. ```bash npm run test:e2e:install npm run test:e2e ``` -------------------------------- ### Start Backend Development Server Source: https://github.com/aliramw/lalaclaw/blob/main/AGENTS.md Run this command in the project root to start the backend server. Use the forced mock mode variant for testing without real dependencies. ```bash PORT=3000 HOST=127.0.0.1 node server.js ``` ```bash COMMANDCENTER_FORCE_MOCK=1 PORT=3000 HOST=127.0.0.1 node server.js ``` -------------------------------- ### Start Development Server Source: https://github.com/aliramw/lalaclaw/blob/main/docs/zh/documentation-api-troubleshooting.md For development, start both the Vite frontend and the Node.js backend. Ensure the frontend runs on the specified port. ```bash npm run dev ``` -------------------------------- ### Start Development Backend Source: https://github.com/aliramw/lalaclaw/blob/main/plan/2026-04-01-project-visual-refresh-implementation-plan.md Starts the development server for the backend, specifying the port and host. This allows the frontend to use the `/api/*` proxy. ```bash PORT=3000 HOST=127.0.0.1 node server.js ``` -------------------------------- ### Start Production Server Source: https://github.com/aliramw/lalaclaw/blob/main/docs/en/documentation-api-troubleshooting.md For production mode, ensure the build is run before starting the server. This command builds the application for production. ```bash npm run build npm start ``` -------------------------------- ### Load the Service Source: https://github.com/aliramw/lalaclaw/blob/main/deploy/macos/README.md Register and start the LalaClaw service with launchctl. ```bash launchctl bootstrap gui/$(id -u) ~/Library/LaunchAgents/ai.lalaclaw.app.plist launchctl enable gui/$(id -u)/ai.lalaclaw.app launchctl kickstart -k gui/$(id -u)/ai.lalaclaw.app ``` -------------------------------- ### Instructing OpenClaw to Install LalaClaw Source: https://github.com/aliramw/lalaclaw/blob/main/README.md Provide this command to OpenClaw to instruct it to clone the repository, install dependencies, and start LalaClaw on a remote machine. ```text Install https://github.com/aliramw/lalaclaw ``` -------------------------------- ### Run Development Mode Source: https://github.com/aliramw/lalaclaw/blob/main/docs/en/documentation-quick-start.md Commands to start frontend and backend development servers. ```bash npm run dev -- --host 127.0.0.1 --port 5173 --strictPort npm run dev:backend -- --host 127.0.0.1 --port 3000 ``` ```bash npm run dev:all ``` -------------------------------- ### Start Backend with Custom OpenClaw Path Source: https://github.com/aliramw/lalaclaw/blob/main/docs/en/documentation-api-troubleshooting.md If OpenClaw CLI is installed in a custom location, specify its absolute path when starting the backend server. ```bash OPENCLAW_BIN=/absolute/path/to/openclaw PORT=3000 HOST=127.0.0.1 node server.js ``` -------------------------------- ### Install Dependencies and Run Linters Source: https://github.com/aliramw/lalaclaw/blob/main/CONTRIBUTING.md Use these commands to install project dependencies, lint the code, run unit tests, and build the project. Ensure your environment is set up correctly before proceeding. ```bash npm ci npm run lint npm test npm run build ``` -------------------------------- ### Start LalaClaw Development Server from Source Source: https://github.com/aliramw/lalaclaw/blob/main/docs/README.es.md If you have a source code checkout, use `lalaclaw dev` after initializing with `--no-background` to start the development server and Vite Dev Server. ```bash lalaclaw doctor lalaclaw dev ``` -------------------------------- ### Start LalaClaw Services Source: https://github.com/aliramw/lalaclaw/blob/main/docs/fr/documentation-quick-start.md Start LalaClaw services using `lalaclaw start` or `npm run lalaclaw:start`. These commands perform a pre-check using the doctor command and will stop immediately if blocking errors are found. ```bash lalaclaw start npm run lalaclaw:start ``` -------------------------------- ### Install via OpenClaw Source: https://github.com/aliramw/lalaclaw/blob/main/docs/zh-hk/documentation-quick-start.md Use OpenClaw to install the project on a remote machine and forward the port to your local environment. ```text 安裝這個 https://github.com/aliramw/lalaclaw ``` ```bash ssh -N -L 3000:127.0.0.1:5678 root@your-remote-server-ip ``` ```text http://127.0.0.1:3000 ``` -------------------------------- ### Start LalaClaw Services after Manual Initialization Source: https://github.com/aliramw/lalaclaw/blob/main/docs/README.es.md After initializing with `--no-background`, run `lalaclaw doctor` to check the environment and then `lalaclaw start` to launch the packaged application services. ```bash lalaclaw doctor lalaclaw start ``` -------------------------------- ### Install LalaClaw from GitHub Source Source: https://github.com/aliramw/lalaclaw/blob/main/README.md Clones the LalaClaw repository, installs dependencies, and initializes the development environment. Use this for development or local modifications. ```bash git clone https://github.com/aliramw/lalaclaw.git lalaclaw cd lalaclaw npm ci npm run doctor npm run lalaclaw:init ``` -------------------------------- ### Install via OpenClaw Source: https://github.com/aliramw/lalaclaw/blob/main/docs/pt/documentation-quick-start.md Use OpenClaw to install on a remote machine and access it locally via SSH forwarding. ```text Install https://github.com/aliramw/lalaclaw ``` ```bash ssh -N -L 3000:127.0.0.1:5678 root@your-remote-server-ip ``` ```text http://127.0.0.1:3000 ``` -------------------------------- ### Install Playwright Browsers Source: https://github.com/aliramw/lalaclaw/blob/main/docs/en/testing-e2e.md Installs the necessary browser binaries required for running E2E tests. ```bash npm run test:e2e:install ``` -------------------------------- ### Initialize LalaClaw after npm install Source: https://github.com/aliramw/lalaclaw/blob/main/README.md After installing LalaClaw globally with npm, run this command to initialize the application. ```bash lalaclaw init ``` -------------------------------- ### Run Production Server Source: https://context7.com/aliramw/lalaclaw/llms.txt Commands to start the production server, including options for host, port, and configuration file overrides. ```bash # Start production server lalaclaw start # Start with custom host and port lalaclaw start --host 0.0.0.0 --port 5678 # Start with specific config file lalaclaw start --config-file ~/.config/lalaclaw/.env.local ``` -------------------------------- ### Install and Initialize LalaClaw Globally Source: https://github.com/aliramw/lalaclaw/blob/main/docs/README.es.md Use these commands to install the latest version of LalaClaw globally and then initialize a new project. After initialization, access the application at http://127.0.0.1:5678. ```bash npm install -g lalaclaw@latest lalaclaw init ``` -------------------------------- ### Install LibreOffice Dependencies Source: https://github.com/aliramw/lalaclaw/blob/main/deploy/macos/README.md Use these commands to resolve missing LibreOffice-backed preview support. ```bash lalaclaw doctor --fix ./deploy/macos/install-libreoffice.sh ``` -------------------------------- ### Build Application for macOS Source: https://github.com/aliramw/lalaclaw/blob/main/docs/en/documentation-quick-start.md Install dependencies and build the application before generating the launchd configuration. ```bash npm ci npm run doctor npm run lalaclaw:init npm run build ``` -------------------------------- ### Install LibreOffice for File Previews on macOS Source: https://github.com/aliramw/lalaclaw/blob/main/docs/README.es.md To enable previews for document types like 'doc', 'ppt', and 'pptx', LibreOffice is required. On macOS, you can install it using Homebrew with `brew install --cask libreoffice` or attempt to fix issues with `lalaclaw doctor --fix`. ```bash brew install --cask libreoffice ``` -------------------------------- ### Run Backend Server Only Source: https://github.com/aliramw/lalaclaw/blob/main/CONTRIBUTING.md Start only the backend server if you do not need the frontend during development. ```bash node server.js ``` -------------------------------- ### Development Server Commands Source: https://github.com/aliramw/lalaclaw/blob/main/README.md Commands to start the Vite development server and backend services. ```bash npm run dev ``` ```bash npm run dev:all ``` ```bash npm run dev:frontend ``` ```bash npm run dev:backend ``` ```bash npm run dev:backend -- --host 127.0.0.1 --port 3000 ``` -------------------------------- ### OpenClaw management Source: https://context7.com/aliramw/lalaclaw/llms.txt Executes system-level management actions like starting or stopping the gateway. ```bash curl -X POST "http://127.0.0.1:5678/api/openclaw/management" \ -H "Content-Type: application/json" \ -d '{"action": "gateway.start"}' ``` ```bash curl -X POST "http://127.0.0.1:5678/api/openclaw/management" \ -H "Content-Type: application/json" \ -d '{"action": "gateway.stop"}' ``` -------------------------------- ### Install LalaClaw via npm Source: https://github.com/aliramw/lalaclaw/blob/main/README.md Install LalaClaw globally using npm for a simple end-user setup. This command installs the latest version. ```bash npm install -g lalaclaw@latest ``` -------------------------------- ### Initialize Configuration Source: https://github.com/aliramw/lalaclaw/blob/main/docs/en/documentation-quick-start.md Initialize the application configuration and run diagnostic checks. ```bash npm run lalaclaw:init npm run doctor ``` -------------------------------- ### Run Development Server Source: https://context7.com/aliramw/lalaclaw/llms.txt Commands to launch the frontend and backend services for development purposes. ```bash # Start both frontend and backend in development mode lalaclaw dev # Start with custom ports lalaclaw dev --host 127.0.0.1 --port 3000 --frontend-port 5173 # Start from source checkout npm run dev:all ``` -------------------------------- ### Update Existing LalaClaw Installation Source: https://github.com/aliramw/lalaclaw/blob/main/docs/en/documentation-quick-start.md Commands to update LalaClaw depending on whether it was installed via npm or cloned from GitHub. ```bash npm install -g lalaclaw@latest lalaclaw init ``` ```bash npm install -g lalaclaw@2026.4.6 lalaclaw init ``` ```bash cd /path/to/lalaclaw git pull npm ci npm run build npm run lalaclaw:start ``` ```bash cd /path/to/lalaclaw git fetch --tags git checkout 2026.4.6 npm ci npm run build npm run lalaclaw:start ``` -------------------------------- ### Diagnostic and Initialization Commands Source: https://github.com/aliramw/lalaclaw/blob/main/README.md Tools for system health checks, configuration initialization, and access token management. ```bash npm run doctor ``` ```bash npm run doctor -- --fix ``` ```bash npm run doctor -- --json ``` ```bash lalaclaw access token ``` ```bash lalaclaw access token --rotate ``` ```bash npm run lalaclaw:init ``` ```bash npm run lalaclaw:init -- --write-example ``` -------------------------------- ### Build and Verify Release Artifact Source: https://github.com/aliramw/lalaclaw/blob/main/CONTRIBUTING.md Build the release artifact and verify its startup path by packing it and running a smoke test against the generated tarball in a clean environment. ```bash npm run build npm run pack:release npm run test:release:smoke -- --tarball ./artifacts/lalaclaw-.tgz ``` -------------------------------- ### CLI Help and Version Commands Source: https://github.com/aliramw/lalaclaw/blob/main/README.md Standard CLI commands for displaying help information and version details. ```bash lalaclaw -h ``` ```bash lalaclaw --help ``` ```bash lalaclaw -v ``` ```bash lalaclaw --version ``` -------------------------------- ### Initialize LalaClaw Configuration Source: https://context7.com/aliramw/lalaclaw/llms.txt Use these commands to set up the local environment, manage configuration files, and control background services. ```bash # Install globally and initialize npm install -g lalaclaw@latest lalaclaw init # Initialize with default settings (non-interactive) lalaclaw init --defaults # Initialize without starting background services lalaclaw init --no-background # Write example config file lalaclaw init --write-example # Custom config file location lalaclaw init --config-file /path/to/.env.local ``` -------------------------------- ### GET /api/file-preview Source: https://context7.com/aliramw/lalaclaw/llms.txt Loads preview metadata and content for a file. ```APIDOC ## GET /api/file-preview ### Description Loads preview metadata and content for a file based on the provided path. ### Method GET ### Endpoint /api/file-preview ### Parameters #### Query Parameters - **path** (string) - Required - The file system path to the file. ### Response #### Success Response (200) - **ok** (boolean) - Status of the request. - **name** (string) - File name. - **kind** (string) - File type category (e.g., markdown, image, spreadsheet). ``` -------------------------------- ### Generate the launchd Plist Source: https://github.com/aliramw/lalaclaw/blob/main/deploy/macos/README.md Run these commands from the project root to prepare and generate the configuration file. ```bash npm ci npm run doctor npm run lalaclaw:init npm run build ./deploy/macos/generate-launchd-plist.sh ``` -------------------------------- ### GET /api/workspace-tree Source: https://context7.com/aliramw/lalaclaw/llms.txt Lists directory contents within the agent workspace. ```APIDOC ## GET /api/workspace-tree ### Description Lists directory contents within the agent workspace, with optional filtering. ### Method GET ### Endpoint /api/workspace-tree ### Parameters #### Query Parameters - **sessionUser** (string) - Required - Identifier for the user session. - **path** (string) - Optional - Specific directory path to list. - **filter** (string) - Optional - File pattern filter (e.g., *.js). ``` -------------------------------- ### Build and Release Commands Source: https://github.com/aliramw/lalaclaw/blob/main/README.md Commands for creating production bundles and packaging releases. ```bash npm run lalaclaw:start ``` ```bash npm run build ``` ```bash npm run pack:release ``` -------------------------------- ### Environment Configuration Source: https://context7.com/aliramw/lalaclaw/llms.txt Settings for server host/port, remote gateway connections, and authentication modes. ```bash # .env.local example HOST=127.0.0.1 PORT=5678 FRONTEND_HOST=127.0.0.1 FRONTEND_PORT=4321 # Force mock mode for UI development COMMANDCENTER_FORCE_MOCK=1 # Specify OpenClaw binary path OPENCLAW_BIN=/usr/local/bin/openclaw ``` ```bash # Remote gateway settings OPENCLAW_BASE_URL=https://your-openclaw-gateway.example.com OPENCLAW_API_KEY=sk-your-api-key-here OPENCLAW_MODEL=openclaw OPENCLAW_AGENT_ID=main OPENCLAW_API_STYLE=chat OPENCLAW_API_PATH=/v1/chat/completions # For OpenAI Responses API style OPENCLAW_API_STYLE=responses OPENCLAW_API_PATH=/v1/responses ``` ```bash # Enable token access mode HOST=0.0.0.0 PORT=5678 COMMANDCENTER_ACCESS_MODE=token COMMANDCENTER_ACCESS_TOKENS=replace-with-a-long-random-token # Or use a token file (newline-separated) COMMANDCENTER_ACCESS_TOKENS_FILE=./tokens.txt ```