pikvm

$npx mdskill add vm0-ai/vm0-skills/pikvm

Control remote servers via PiKVM API for hardware management.

  • Enables agents to execute mouse clicks, typing, and screenshots.
  • Depends on PiKVM API endpoints for HID events and snapshots.
  • Coordinates actions using screen center as the origin point.
  • Delivers direct hardware control through authenticated curl commands.

SKILL.md

.github/skills/pikvmView on GitHub ↗
---
name: pikvm
description: PiKVM API for remote KVM. Use when user mentions "PiKVM", "KVM over IP",
  "remote server", or hardware management.
---

## Coordinate System

**Mouse coordinates use screen center as origin (0,0)**:
- Negative X = left, Positive X = right
- Negative Y = up, Positive Y = down

For 1920x1080 screen:
- Top-left: `(-960, -540)`
- Center: `(0, 0)`
- Bottom-right: `(960, 540)`

## Usage

### Take Screenshot

```bash
curl -k -s -o /tmp/screenshot.jpg -u "$PIKVM_AUTH" "$PIKVM_URL/api/streamer/snapshot"
```

### Type Text

Text must be sent as raw body with `Content-Type: text/plain`:

```bash
curl -k -s -X POST \
  -H "Content-Type: text/plain" \
  -u "$PIKVM_AUTH" \
  -d "Hello World" \
  "$PIKVM_URL/api/hid/print?limit=0"
```

### Move Mouse

Move to absolute position (0,0 = screen center):

```bash
curl -k -s -X POST \
  -u "$PIKVM_AUTH" \
  "$PIKVM_URL/api/hid/events/send_mouse_move?to_x=-500&to_y=-300"
```

### Mouse Click

```bash
# Press
curl -k -s -X POST \
  -u "$PIKVM_AUTH" \
  "$PIKVM_URL/api/hid/events/send_mouse_button?button=left&state=true"

# Release
curl -k -s -X POST \
  -u "$PIKVM_AUTH" \
  "$PIKVM_URL/api/hid/events/send_mouse_button?button=left&state=false"
```

### Press Key

Press and release with `state=true` then `state=false`:

```bash
# Press Enter
curl -k -s -X POST \
  -u "$PIKVM_AUTH" \
  "$PIKVM_URL/api/hid/events/send_key?key=Enter&state=true"

curl -k -s -X POST \
  -u "$PIKVM_AUTH" \
  "$PIKVM_URL/api/hid/events/send_key?key=Enter&state=false"
```

### Key Combo (e.g., Cmd+Space for Spotlight)

Press all keys in order, then release in reverse:

```bash
# Press Cmd
curl -k -s -X POST -u "$PIKVM_AUTH" "$PIKVM_URL/api/hid/events/send_key?key=MetaLeft&state=true"

# Press Space
curl -k -s -X POST -u "$PIKVM_AUTH" "$PIKVM_URL/api/hid/events/send_key?key=Space&state=true"

# Release Space
curl -k -s -X POST -u "$PIKVM_AUTH" "$PIKVM_URL/api/hid/events/send_key?key=Space&state=false"

# Release Cmd
curl -k -s -X POST -u "$PIKVM_AUTH" "$PIKVM_URL/api/hid/events/send_key?key=MetaLeft&state=false"
```

### Mouse Scroll

```bash
curl -k -s -X POST \
  -u "$PIKVM_AUTH" \
  "$PIKVM_URL/api/hid/events/send_mouse_wheel?delta_x=0&delta_y=-50"
```

### Get Device Info

```bash
curl -k -s \
  -u "$PIKVM_AUTH" \
  "$PIKVM_URL/api/info" | jq .
```

### ATX Power Control

```bash
# Power on
curl -k -s -X POST \
  -u "$PIKVM_AUTH" \
  "$PIKVM_URL/api/atx/power?action=on"

# Power off
curl -k -s -X POST -u "$PIKVM_AUTH" "$PIKVM_URL/api/atx/power?action=off"

# Hard reset
curl -k -s -X POST -u "$PIKVM_AUTH" "$PIKVM_URL/api/atx/power?action=reset_hard"
```

## Common Key Names

```
MetaLeft (Cmd), ControlLeft, AltLeft, ShiftLeft
Enter, Space, Escape, Tab, Backspace, Delete
ArrowUp, ArrowDown, ArrowLeft, ArrowRight
KeyA-KeyZ, Digit0-Digit9, F1-F12
PageUp, PageDown, Home, End
Equal (+), Minus (-)
```

## API Endpoints Reference

| Endpoint | Method | Description |
|----------|--------|-------------|
| `/api/streamer/snapshot` | GET | Screenshot (JPEG) |
| `/api/hid/print` | POST | Type text (body: raw text) |
| `/api/hid/events/send_mouse_move` | POST | Move mouse (`to_x`, `to_y`) |
| `/api/hid/events/send_mouse_button` | POST | Click (`button`, `state`) |
| `/api/hid/events/send_mouse_wheel` | POST | Scroll (`delta_x`, `delta_y`) |
| `/api/hid/events/send_key` | POST | Key press (`key`, `state`) |
| `/api/atx/power` | POST | Power control (`action`) |
| `/api/info` | GET | Device info |
| `/api/atx` | GET | ATX status |

## API Reference

- Official docs: https://docs.pikvm.org/api/

More from vm0-ai/vm0-skills

SkillDescription
account-reconciliationPerform account reconciliations comparing general ledger balances against subledgers, bank statements, or external records. Use for bank reconciliation, GL-to-subledger reconciliation, intercompany reconciliation, balance sheet reconciliation, reconciling item analysis, outstanding item aging, or clearing open items.
agentphoneBuild AI phone agents with AgentPhone API. Use when the user wants to make phone calls, send/receive SMS, manage phone numbers, create voice agents, set up webhooks, or check usage — anything related to telephony, phone numbers, or voice AI.
ahrefsAhrefs SEO API for backlink and keyword analysis. Use when user mentions
amplitudeAmplitude product analytics API. Use when user mentions "Amplitude",
analysis-qaQuality-check a data analysis before sharing — verify joins, aggregations, denominators, time ranges, and metric definitions. Detect pitfalls like survivorship bias, average-of-averages, join explosion, timezone mismatches, incomplete periods, and selection bias. Includes documentation templates for reproducible analyses.
anthropic-managed-agentsAnthropic Managed Agents API for programmatically creating, running, and streaming AI agents on Anthropic's cloud infrastructure. Use when the user mentions "Managed Agents", "Anthropic agent sessions", or needs to create/run/stream an Anthropic agent with tool use (bash, git, web), attach GitHub repositories, or inject secrets via Vault. Do NOT use for standard Claude Messages API — use the Claude API skill instead.
apifyApify web scraping platform. Use when user mentions "scrape website",
asanaAsana API for tasks and projects. Use when user mentions "Asana", "asana.com",
atlassianAtlassian API for Confluence and Jira. Use when user mentions "Confluence
attioAttio REST API for AI-native CRM operations — manage companies, people, deals, and custom objects, plus notes, tasks, lists, and comments. Use when the user mentions "Attio", "CRM record", "create company", "add person", "list entry", "CRM note", or "CRM task".