KamoX - Web Extension Dev Server

March 15, 2026 · View on GitHub

npm version License: MIT

English | 日本語

KamoX is a plugin-based HTTP API server designed for AI Coding Agents (like Windsurf, Cursor, Devin) to live-preview, debug, and develop Chrome Extensions (Manifest V3), Electron apps, and VSCode extensions.

It bridges the gap between AI agents and local development environments by providing a structured API for building, verifying UI, and retrieving logs.

npm install -g kamox

Quick Start

# Start KamoX server (with auto-build enabled)
kamox chrome --auto-build

For Electron Projects

# Go to your Electron project directory
cd /path/to/electron-app

# Start KamoX server for Electron
kamox electron --entryPoint main.js

See docs/electron.md for details.

For VSCode Extensions

# Go to your VSCode extension project directory
cd /path/to/vscode-extension

# Start KamoX server for VSCode
kamox vscode --project-path .

See packages/plugin-vscode/README.md for details.

Note: If you want to run from source code as a contributor, please refer to CONTRIBUTING.md.

Usage

Basic Commands

# Show help
kamox --help

# Start Chrome Extension development server
kamox chrome [options]

# Start Electron app development server
kamox electron [options]

# Start VSCode Extension development server
kamox vscode [options]

# Show AI agent API guide
kamox guide --mode chrome|electron|vscode|all

Options

Common Options

OptionDescriptionDefault
-p, --port <number>Server port number3000
-b, --build-command <cmd>Build commandnpm run build
-c, --config <path>Config file pathkamox.config.json
--verboseShow detailed logs and configfalse

Chrome-specific Options

OptionDescriptionDefault
-o, --output <path>Build output directorydist
--auto-buildAutomatically build if output directory is missingfalse

Electron-specific Options

OptionDescriptionDefault
--entryPoint <file>Electron main scriptmain.js

VSCode-specific Options

OptionDescriptionDefault
--project-path <path>Extension project path.
--vscode-path <path>Path to VSCode executableAuto-detect
-w, --workspace <path>Workspace folder to openNone

Configuration File (kamox.config.json)

Creating a kamox.config.json in your project root saves you from specifying options every time.

{
  "mode": "chrome",
  "output": "./dist",
  "buildCommand": "npm run build",
  "port": 3000
}

For VSCode extensions:

{
  "mode": "vscode",
  "projectPath": ".",
  "buildCommand": "npm run compile",
  "port": 3000
}

API Endpoints

Common (All Modes)

MethodEndpointDescription
GET/statusCheck server status
POST/rebuildRebuild project
GET/scenariosList available test scenarios
POST/check-uiVerify UI / take screenshot
POST/check-scriptVerify Content Script injection
GET/logsGet logs
POST/playwright/mouseMouse Action (click, move, drag)
POST/playwright/keyboardKeyboard Action (type, press)
POST/playwright/elementElement Action (click, fill, check)
POST/playwright/waitWait Action (timeout)
POST/playwright/reloadReload Page/Window
GET/Development Dashboard

VSCode-specific

MethodEndpointDescription
POST/vscode/commandExecute a VSCode command by ID
GET/vscode/outputRead an Output Channel
POST/vscode/openOpen a file in the editor
GET/vscode/notificationsGet notification toasts
POST/vscode/notifications/dismissDismiss a notification
GET/vscode/statusbarRead a status bar item
POST/vscode/activity-barSwitch Activity Bar view
GET/vscode/tree-view/:viewIdList tree view items
POST/vscode/quick-pickSelect from a Quick Pick
GET/vscode/problemsGet Problems panel markers

For the full LLM-friendly API reference, run:

kamox guide --mode vscode

Interactive Testing (Playwright API)

KamoX allows AI agents to interact with the extension using Playwright-compatible APIs.

Example: Click a button

curl -X POST http://localhost:3000/playwright/element \
  -H "Content-Type: application/json" \
  -d '{"selector": "#submit-btn", "action": "click"}'

Example: Type text

curl -X POST http://localhost:3000/playwright/keyboard \
  -H "Content-Type: application/json" \
  -d '{"action": "type", "text": "Hello World"}'

Scenario Testing

You can define reusable test scenarios in .kamox/scenarios/*.scenario.js to automate complex setup (e.g., opening specific tabs, setting storage) before verifying the UI.

List Scenarios:

curl http://localhost:3000/scenarios

Run Scenario & Check UI:

curl -X POST http://localhost:3000/check-ui \
  -H "Content-Type: application/json" \
  -d '{"scenario": "basic-test"}'

For full reference on scenario file structure and API, see docs/scenarios.md.

Troubleshooting

"Output directory not found" Error

Occurs when the build output directory (default dist) is not found.

Solution:

  1. Build your project: npm run build
  2. Or use --auto-build option
  3. Specify output directory with --output option if different

Extension not loaded

Solution:

  1. Check if manifest.json is included in the output directory
  2. Check error logs on the dashboard (http://localhost:3000)
  3. Run with --verbose option to see detailed logs

License

MIT