### macOS/Linux Setup Script Example Source: https://kilo.ai/docs/automate/agent-manager This script installs npm dependencies and conditionally copies a local environment file. It utilizes WORKTREE_PATH and REPO_PATH environment variables. ```shell #!/bin/sh set -e cd "$WORKTREE_PATH" npm install # Copy a nested env file that Kilo does not auto-copy. if [ -f "$REPO_PATH/apps/web/.env.local" ] && [ ! -f "$WORKTREE_PATH/apps/web/.env.local" ]; then cp "$REPO_PATH/apps/web/.env.local" "$WORKTREE_PATH/apps/web/.env.local" fi ``` -------------------------------- ### Quick Local Qdrant Setup with Docker Source: https://kilo.ai/docs/customize/context/codebase-indexing Use this Docker command for a quick local setup of a Qdrant server. Ensure Docker is installed and running on your system. ```bash docker run -p 6333:6333 qdrant/qdrant ``` -------------------------------- ### macOS/Linux Run Script Example Source: https://kilo.ai/docs/automate/agent-manager A basic script to start a development server using npm. This script is executed from the Agent Manager toolbar. ```shell #!/bin/sh npm run dev ``` -------------------------------- ### Start Ollama Server Source: https://kilo.ai/docs/ai-providers/ollama Run this command in your terminal to start the Ollama server. Ensure Ollama is installed and running before proceeding. ```bash ollama serve ``` -------------------------------- ### Install Dependencies Source: https://kilo.ai/docs/gateway/quickstart Install the required AI SDK and OpenAI provider packages. ```bash npm install ai @ai-sdk/openai dotenv ``` -------------------------------- ### Install AgentCard CLI and Sign Up Source: https://kilo.ai/docs/kiloclaw/tools/agentcard Use this command to install the AgentCard CLI and create a new account. ```bash agent-cards signup ``` -------------------------------- ### Start Local Backend Source: https://kilo.ai/docs/contributing/development-environment Start the local backend for API validation. Use the root TESTING.md guide for detailed instructions on validating behavior with `curl` requests. ```bash bun dev serve ``` -------------------------------- ### Install Kilo CLI Source: https://kilo.ai/docs Install the Kilo CLI globally using npm. ```bash # Or install via CLI $ npm install -g @kilocode/cli ``` -------------------------------- ### Install OpenAI SDK (Python) Source: https://kilo.ai/docs/gateway/sdks-and-frameworks Install the OpenAI SDK using pip. This is a prerequisite for using the SDK. ```bash pip install openai ``` -------------------------------- ### Install Project Dependencies Source: https://kilo.ai/docs/contributing/development-environment Install all necessary dependencies for the project's workspace packages using Bun. ```bash bun install ``` -------------------------------- ### Install OpenAI SDK (TypeScript/JavaScript) Source: https://kilo.ai/docs/gateway/sdks-and-frameworks Install the OpenAI SDK using npm. This is a prerequisite for using the SDK. ```bash npm install openai ``` -------------------------------- ### Install Dependencies and Run Repo-Level Checks Source: https://kilo.ai/docs/contributing/development-environment Install project dependencies and run linting and type checking from the repo root. ```bash bun install bun run lint bun run typecheck ``` -------------------------------- ### Example: Download qwen3-coder:30b Model Source: https://kilo.ai/docs/ai-providers/ollama This is an example of downloading the recommended 'qwen3-coder:30b' model using the `ollama pull` command. Ensure the Ollama server is running. ```bash ollama pull qwen3-coder:30b ``` -------------------------------- ### Install Additional Tools at Runtime Source: https://kilo.ai/docs/kiloclaw/pre-installed-software Agents can install additional tools at runtime using language-specific package managers. ```bash go install github.com/example/tool@latest ``` ```bash npm install -g ``` ```bash pip install ``` -------------------------------- ### Install Git on macOS using Xcode Command Line Tools Source: https://kilo.ai/docs/code-with-ai/features/checkpoints Installs Git on macOS by installing the Xcode Command Line Tools. This is an alternative method to Homebrew. ```bash xcode-select --install ``` -------------------------------- ### Install Git on Fedora Source: https://kilo.ai/docs/code-with-ai/features/checkpoints Installs Git on Fedora Linux using the dnf package manager. ```bash sudo dnf install git ``` -------------------------------- ### Install a Plugin Globally Source: https://kilo.ai/docs/automate/extending/plugins Installs a plugin into the global configuration. This makes the plugin available across all projects. ```bash kilo plugin my-plugin --global ``` -------------------------------- ### Install Git on Arch Linux Source: https://kilo.ai/docs/code-with-ai/features/checkpoints Installs Git on Arch Linux using the pacman package manager. ```bash sudo pacman -S git ``` -------------------------------- ### Install Vercel AI SDK and OpenAI integration Source: https://kilo.ai/docs/gateway/sdks-and-frameworks Install the necessary packages for using the Vercel AI SDK with OpenAI compatibility. ```bash npm install ai @ai-sdk/openai ``` -------------------------------- ### Install FFmpeg on Linux (Ubuntu/Debian) Source: https://kilo.ai/docs/code-with-ai/features/speech-to-text Use apt to install FFmpeg on Ubuntu/Debian-based Linux systems. This is required for audio capture and processing for voice input. ```bash sudo apt update sudo apt install ffmpeg ``` -------------------------------- ### Install Kilo Code VS Code Extension Source: https://kilo.ai/docs Install the Kilo Code VS Code Extension using the 'code' command. ```bash # Install Kilo Code VS Code Extension $ code --install-extension kilocode.kilo-code ``` -------------------------------- ### Install a Plugin Locally Source: https://kilo.ai/docs/automate/extending/plugins Installs a plugin into the current project's configuration. The command resolves the package and updates the local config file. ```bash kilo plugin my-plugin ``` -------------------------------- ### Install Kilo Code CLI via npm Source: https://kilo.ai/docs/code-with-ai/platforms/cli Install the Kilo Code CLI globally using npm. This command makes the 'kilo' executable available system-wide. ```bash npm install -g @kilocode/cli ``` -------------------------------- ### First-Time Setup with /connect Source: https://kilo.ai/docs/code-with-ai/platforms/cli Use the /connect command within the Kilo TUI to add your first provider credentials and configure API keys for model providers. ```bash kilo /connect ``` -------------------------------- ### Initialize Project Source: https://kilo.ai/docs/gateway/quickstart Create a new directory and initialize a Node.js project. ```bash mkdir my-ai-app cd my-ai-app npm init -y ``` -------------------------------- ### Fly-Provider Topology Example Flowchart Source: https://kilo.ai/docs/contributing/architecture/cloud-platform Visualizes the topology of a Fly-provider setup for KiloClaw, showing the interaction between Cloudflare Workers, Fly proxy, Fly instances, and persistent storage. It highlights the flow of authentication and traffic routing. ```flowchart flowchart TB subgraph worker ["Cloudflare Worker"] direction LR auth["JWT auth
tied to Kilo user"] instanceDO["Per-instance Durable Object"] dbConnection["Kilo database connection"] end db["Kilo database
Instances
Short-lived access codes
Image catalog
Billing and user preferences"] proxy["Fly proxy
Per-user Fly app
Per-user encryption
Routes to pinned instance"] subgraph flyInstance ["Fly instance: owner-scoped runtime"] direction TB subgraph container ["KiloClaw container"] direction TB controller["KiloClaw controller
Supervises OpenClaw gateway
Exposes control endpoints
Proxies HTTP and WebSocket traffic"] openclaw["OpenClaw
Gateway and Control UI"] tools["Pre-installed tools and skills"] controller --> openclaw tools --> openclaw end volume["Persistent Fly volume
/root/.openclaw config
/root/clawd workspace"] volume --> openclaw end dbConnection <--> db worker <--> proxy proxy <--> controller ``` -------------------------------- ### Verify Kilo Code CLI Installation Source: https://kilo.ai/docs/code-with-ai/platforms/cli After installation, verify that the Kilo Code CLI is installed correctly by checking its version. This command should output the installed version number. ```bash kilo --version ``` -------------------------------- ### Install Debian Packages via APT Source: https://kilo.ai/docs/kiloclaw/pre-installed-software Use apt to install additional system packages. Note that these installations do not persist across redeploys. ```bash apt update && apt install -y ``` -------------------------------- ### Build and Test Documentation Locally Source: https://kilo.ai/docs/contributing Commands to test, build, and develop the Kilo documentation site locally from the repository root. Ensure you have Bun installed. ```bash bun run --filter @kilocode/kilo-docs test bun run --filter @kilocode/kilo-docs build bun run --filter @kilocode/kilo-docs dev ``` -------------------------------- ### Initialize OpenAI Client with ZenMux Source: https://kilo.ai/docs/ai-providers/zenmux Use the standard OpenAI SDK by setting the `baseURL` to ZenMux's OpenAI compatible endpoint. Ensure your ZenMux API key is provided. ```javascript import OpenAI from "openai" const openai = new OpenAI({ baseURL: "https://zenmux.ai/api/v1", apiKey: "", }) async function main() { const completion = await openai.chat.completions.create({ model: "openai/gpt-5", messages: [ { role: "user", content: "What is the meaning of life?", }, ], }) console.log(completion.choices[0].message) } main() ``` -------------------------------- ### Run Documentation Site Commands Source: https://kilo.ai/docs/contributing/development-environment Execute these commands from the repo root to build, test, or run the documentation site locally. These are useful for development and previewing changes. ```bash bun run --filter @kilocode/kilo-docs test bun run --filter @kilocode/kilo-docs build bun run --filter @kilocode/kilo-docs dev ``` -------------------------------- ### Plugin Directory Structure Example Source: https://kilo.ai/docs/automate/extending/plugins Place TypeScript or JavaScript plugin files directly into a `plugin/` or `plugins/` folder within your Kilo configuration directories. These files are automatically registered at startup. ```tree my-project/ ├── kilo.json └── .kilo/ └── plugin/ ├── env-guard.ts └── notifications.ts ``` -------------------------------- ### Example Fix Commit Message Source: https://kilo.ai/docs/code-with-ai/features/git-commit-generation An example of a generated commit message for a bug fix, detailing the resolution. ```gitcommit fix(api): resolve race condition in user data fetching Add proper error handling and retry logic to prevent concurrent requests from causing data inconsistency ``` -------------------------------- ### Initialize Google GenAI Client with ZenMux Source: https://kilo.ai/docs/ai-providers/zenmux Set up the Google GenAI client for use with ZenMux by providing your API key, setting `vertexai: true`, and configuring the `httpOptions` with the ZenMux Vertex AI base URL and API version. ```javascript const genai = require("@google/genai") const client = new genai.GoogleGenAI({ apiKey: "$ZENMUX_API_KEY", vertexai: true, httpOptions: { baseUrl: "https://zenmux.ai/api/vertex-ai", apiVersion: "v1", }, }) const response = await client.models.generateContent({ model: "google/gemini-2.5-pro", contents: "How does AI work?", }) console.log(response) ``` -------------------------------- ### Cron Expression Examples Source: https://kilo.ai/docs/kiloclaw/triggers/scheduled Illustrative examples of cron expressions and their corresponding meanings, demonstrating various scheduling patterns. ```text */15 * * * * | Every 15 minutes ``` ```text 0 9 * * 1-5 | 9:00 AM on weekdays ``` ```text 0 0 1 * * | Midnight on the first of each month ``` ```text 30 14 * * 3 | 2:30 PM every Wednesday ``` -------------------------------- ### MCP Server Configuration with Environment Variable Source: https://kilo.ai/docs/automate/mcp/using-in-cli Example demonstrating how to use environment variables within MCP server configurations, such as for API keys in headers. ```json { "mcp": { "my-server": { "type": "remote", "url": "https://mcp.example.com/mcp", "headers": { "Authorization": "Bearer {env:MY_API_KEY}" } } } } ``` -------------------------------- ### Example Docs Commit Message Source: https://kilo.ai/docs/code-with-ai/features/git-commit-generation An example of a generated commit message for documentation updates, specifying the changes made. ```gitcommit docs(readme): update installation instructions Add missing dependency requirements and clarify setup steps for new contributors ``` -------------------------------- ### Custom LSP Server Configuration Source: https://kilo.ai/docs/code-with-ai/platforms/cli Example of configuring a custom Language Server Protocol (LSP) server. This includes the command to run the server and an 'extensions' array specifying file types it should handle, unless disabling a built-in server. ```json { "lsp": { "my-language-server": { "command": ["my-lsp", "--stdio"], "extensions": [".foo"], }, }, } ``` -------------------------------- ### Get Kilo CLI Help Source: https://kilo.ai/docs/code-with-ai/platforms/cli Opens the help documentation for the Kilo CLI, listing available commands and options. ```bash kilo --help ``` -------------------------------- ### Install Git on Debian/Ubuntu Source: https://kilo.ai/docs/code-with-ai/features/checkpoints Installs Git on Debian-based Linux distributions like Ubuntu using the apt package manager. ```bash sudo apt update sudo apt install git ``` -------------------------------- ### Local Qdrant Setup with Docker Compose Source: https://kilo.ai/docs/customize/context/codebase-indexing Configure a local Qdrant server using Docker Compose. This method allows for more configuration options and persistent storage for the Qdrant data. ```yaml version: "3.8" services: qdrant: image: qdrant/qdrant ports: - "6333:6333" volumes: - qdrant_storage:/qdrant/storage volumes: qdrant_storage: ``` -------------------------------- ### Install Git on macOS using Homebrew Source: https://kilo.ai/docs/code-with-ai/features/checkpoints Installs Git on macOS using the Homebrew package manager. This is the recommended method. ```bash brew install git ``` -------------------------------- ### Install FFmpeg on macOS Source: https://kilo.ai/docs/code-with-ai/features/speech-to-text Use Homebrew to install FFmpeg on macOS. This is required for audio capture and processing for voice input. ```bash brew install ffmpeg ```