plexctl — Plex Media Server Control

> Standalone CLI for controlling Plex Media Server and clients via the Plex API

3,891 stars

Best use case

plexctl — Plex Media Server Control is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

> Standalone CLI for controlling Plex Media Server and clients via the Plex API

Teams using plexctl — Plex Media Server Control should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/plex-ctl/SKILL.md --create-dirs "https://raw.githubusercontent.com/openclaw/skills/main/skills/akivasolutions/plex-ctl/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/plex-ctl/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How plexctl — Plex Media Server Control Compares

Feature / Agentplexctl — Plex Media Server ControlStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

> Standalone CLI for controlling Plex Media Server and clients via the Plex API

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# plexctl — Plex Media Server Control

> Standalone CLI for controlling Plex Media Server and clients via the Plex API

## When to Use

**Trigger phrases:**
- "play [title] on Plex"
- "search Plex for [query]"
- "what's playing on Plex"
- "pause/resume Plex"
- "show me what's on deck"
- "what's new on Plex"
- "list Plex clients"
- "tell me about [movie/show]"

**Use this skill when:**
- User wants to play specific content on Plex
- User wants to search their Plex library
- User wants to control playback (pause, resume, stop, next, prev)
- User wants to see what's currently playing
- User wants to browse recently added content
- User wants to see continue watching (on-deck)
- User wants detailed info about a title

**Don't use this skill when:**
- User wants Apple TV-specific navigation (use ClawTV instead)
- User wants vision-based automation (use ClawTV instead)
- User wants to manage Plex server settings (use Plex web UI)

## Commands

### Setup
```bash
plexctl setup
```
Interactive first-time setup:
- Plex server URL (e.g., http://192.168.86.86:32400)
- Plex token
- Default client selection

### Playback
```bash
# Play a movie (fuzzy search)
plexctl play "Fight Club"
plexctl play "inception"

# Play specific TV episode
plexctl play "The Office" -s 3 -e 10
plexctl play "Westworld" --season 2 --episode 6

# Play on specific client (overrides default)
plexctl play "Matrix" -c "Living Room TV"
```

### Playback Control
```bash
plexctl pause              # Pause current playback
plexctl resume             # Resume playback
plexctl stop               # Stop playback
plexctl next               # Skip to next track/episode
plexctl prev               # Go to previous track/episode
```

### Search & Discovery
```bash
# Search across all libraries
plexctl search "matrix"
plexctl search "breaking bad"

# Recently added content
plexctl recent             # Last 10 items
plexctl recent -n 20       # Last 20 items

# Continue watching (on-deck)
plexctl on-deck

# What's currently playing
plexctl now-playing

# Detailed info about a title
plexctl info "Inception"
plexctl info "The Office"
```

### Library Management
```bash
# List all libraries
plexctl libraries

# List available clients
plexctl clients
```

## Setup Instructions

### 1. Install Dependencies
```bash
pip install plexapi
```

### 2. Run Setup
```bash
plexctl setup
```

You'll need:
- **Plex server URL**: Usually `http://[local-ip]:32400`
- **Plex token**: Get from Settings → Account → Authorized Devices
  - Or from browser URL when logged into Plex Web
  - Look for `X-Plex-Token` parameter
- **Default client**: The tool will discover available clients

### 3. Verify
```bash
plexctl clients            # Should list your devices
plexctl libraries          # Should list your libraries
plexctl search "test"      # Should return results
```

## Required Credentials

Config stored in `~/.plexctl/config.json`:

```json
{
  "plex_url": "http://192.168.86.86:32400",
  "plex_token": "your-plex-token-here",
  "default_client": "Apple TV"
}
```

### Getting Your Plex Token

**Method 1: Settings Page**
1. Log into Plex Web (app.plex.tv)
2. Settings → Account → Authorized Devices
3. Look for your token in the page source or URL

**Method 2: Browser URL**
1. Open any Plex Web page while logged in
2. Check the URL for `X-Plex-Token=...`
3. Copy the token value

**Method 3: XML Direct Method**
1. Navigate to: `http://[your-plex-ip]:32400/?X-Plex-Token=`
2. View page source
3. Look for `authToken` attribute

## Privacy & Data

- **Local only**: Connects directly to your Plex Media Server on your local network
- **No cloud APIs**: All communication is local (unless using Plex cloud discovery as fallback)
- **No external services**: No data sent to third parties
- **No telemetry**: No usage tracking or analytics
- **Config storage**: Only stores Plex URL, token, and default client locally

**Note**: Plex cloud discovery (MyPlex) is only used as a fallback when local GDM discovery fails. All media playback is direct to your local server.

## Common Use Cases

### 1. Quick Movie Playback
```bash
plexctl play "Fight Club"
```
Searches library, finds best match, starts playing on default client.

### 2. Binge Watching TV Shows
```bash
plexctl play "Breaking Bad" -s 1 -e 1
# ... watch episode ...
plexctl next                    # Next episode
plexctl next                    # Next episode
```

### 3. Continue Watching
```bash
plexctl on-deck                 # See what's in progress
plexctl play "Show Name"        # Resume from where you left off
```

### 4. Browse New Content
```bash
plexctl recent                  # See what's new
plexctl info "Movie Title"      # Get details
plexctl play "Movie Title"      # Watch it
```

### 5. Multi-Client Control
```bash
plexctl clients                           # List all clients
plexctl play "Movie" -c "Bedroom TV"      # Play on specific client
plexctl pause -c "Living Room TV"         # Pause specific client
```

### 6. Library Search
```bash
plexctl search "christopher nolan"        # Find all Nolan films
plexctl search "breaking"                 # Fuzzy search
plexctl info "Inception"                  # Get details before watching
```

## Fuzzy Matching

The `play` and `info` commands use fuzzy search:
- "fight club" → "Fight Club (1999)"
- "inception" → "Inception"
- "office" → "The Office (U.S.)"

Exact matches are prioritized over partial matches.

## Error Handling

**Client not found:**
```
Error: Client 'Apple TV' not found

Available clients:
  Local:
    • Living Room TV (Plex for Apple TV)
    • Bedroom (Plex Web)
```

**No results:**
```
No results found for: xyz123
```

**Connection failed:**
```
Error connecting to Plex server: [Errno 61] Connection refused
URL: http://192.168.86.86:32400
Check your plex_url and plex_token in config
```

## Integration with OpenClaw

When a user asks to play something on Plex:

1. **Parse the request** — extract title, season, episode
2. **Choose command:**
   - Movie: `plexctl play "Title"`
   - TV show specific episode: `plexctl play "Show" -s N -e N`
   - Search first: `plexctl search "query"` then `plexctl play "Title"`
3. **Execute and report** — run command, share output with user

**Example agent flow:**
```
User: "Play Fight Club on Plex"
Agent: [exec] plexctl play "Fight Club"
Output: Found: Fight Club (1999) (movie)
        ✓ Playing on Apple TV
Agent: "Now playing Fight Club on your Apple TV"
```

## Troubleshooting

**Can't connect to Plex:**
- Verify server is running
- Check URL (should be http://IP:32400, not https)
- Verify token is correct
- Check firewall settings

**Client not found:**
- Make sure Plex app is open on the client device
- Run `plexctl clients` to see available clients
- Try cloud discovery (automatic fallback)
- Restart Plex app on client device

**Playback fails:**
- Verify client can play the content type
- Check client is still active (`plexctl clients`)
- Try playing manually in Plex app first
- Check Plex server logs

**Search returns no results:**
- Verify content exists in your library
- Try broader search terms
- Check library is scanned and up-to-date
- Run `plexctl libraries` to verify library access

## Performance

- **Local GDM discovery**: ~100ms
- **Cloud fallback discovery**: ~500-1000ms
- **Search**: ~200-500ms depending on library size
- **Playback start**: ~500ms
- **Control commands**: ~100ms

All operations are direct Plex API calls — no vision, no screenshots, no AI inference needed.

## Differences from ClawTV

| Feature | plexctl | ClawTV |
|---------|---------|--------|
| Plex control | ✅ Direct API | ✅ API + Vision |
| Apple TV remote | ❌ | ✅ |
| Vision-based navigation | ❌ | ✅ |
| Any streaming app | ❌ | ✅ |
| Speed | ⚡ Instant | 🐢 Slower (screenshots) |
| Dependencies | plexapi only | pyatv, Anthropic API, QuickTime |
| Use case | Plex-only control | Universal TV automation |

**When to use plexctl**: Fast, direct Plex control  
**When to use ClawTV**: Complex navigation, non-Plex apps, vision-based automation

Related Skills

openclaw-media-gen

3891
from openclaw/skills

Generate images & videos with AIsa. Gemini 3 Pro Image (image) + Qwen Wan 2.6 (video) via one API key.

Content & Documentation

Pest Control Operations Agent

3891
from openclaw/skills

You are an expert pest control business operations advisor. Help operators with licensing, EPA/FIFRA compliance, pricing, route optimization, seasonal planning, technician management, and growth strategy.

Business Management

Export Compliance & Trade Controls

3891
from openclaw/skills

Analyze products, destinations, and end-users against US export control regulations (EAR, ITAR, OFAC sanctions). Generate classification recommendations, license requirements, and compliance checklists.

Regulatory Compliance

media-compress

3891
from openclaw/skills

Compress and convert images and videos using ffmpeg. Use when the user wants to reduce file size, change format, resize, or optimize media files. Handles common formats like JPG, PNG, WebP, MP4, MOV, WebM. Triggers on phrases like "compress image", "compress video", "reduce file size", "convert to webp/mp4", "resize image", "make image smaller", "batch compress", "optimize media".

General Utilities

ecovacs-robot-control

3891
from openclaw/skills

Control Ecovacs/DEEBOT robot vacuums via the Ecovacs IoT API. Use when the user wants to control a robot vacuum, check battery, start/stop/pause cleaning, return to dock, check clean status, set suction/water level, manage schedules, check consumables, or control auto-empty station. Covers all mainstream Ecovacs protocols including clean_V2, charge, getBattery, getCleanInfo_V2, getStats, getSpeed/setSpeed, getWaterInfo/setWaterInfo, getWorkMode/setWorkMode, getLifeSpan, getAutoEmpty/setAutoEmpty, getCachedMapInfo, getMapSet, getSched_V2/setSched_V2.

Smart Home & IoT

agentic-mcp-server-builder

3891
from openclaw/skills

Scaffold MCP server projects and baseline tool contract checks. Use for defining tool schemas, generating starter server layouts, and validating MCP-ready structure.

Coding & Development

opencode-acp-control

3891
from openclaw/skills

Control OpenCode directly via the Agent Client Protocol (ACP). Start sessions, send prompts, resume conversations, and manage OpenCode updates.

cliproxy-media

3891
from openclaw/skills

Analyze images (jpg, png, gif, webp) and PDFs via CLIProxyAPI — a Claude Max proxy that routes requests through your subscription at zero extra cost. Use this skill whenever you need to analyze, describe, or extract information from an image or photo ("analyze image", "describe photo", "what is in this picture"), read or summarize a PDF document ("read PDF", "summary of this document"), or process any media file via a CLIProxy-compatible endpoint ("process media via proxy", "cliproxy vision", "cliproxy media"). NEVER use the built-in `image` or `pdf` tools when using CLIProxyAPI — they fall back to direct Anthropic API which requires separate credits. Use this skill instead for all vision and document analysis tasks.

clawphone-wechat-control

3891
from openclaw/skills

处理微信会话列表、进入聊天、发送消息、处理微信内弹窗与聊天页失败排查。适用于用户要求查看微信消息、回复联系人、转发、处理聊天输入框或发送失败时。执行时必须先确认当前在微信的哪个页面,再按聊天场景一步一验。

clawphone-phone-control

3891
from openclaw/skills

使用手机控制 MCP 完成手机界面感知与操作。适用于读取当前手机状态、打开 App、处理弹窗、点击控件、输入文本、排查手机自动化失败等场景。执行时优先读取界面状态,涉及坐标点击时必须基于当前截图临时判定,禁止把历史坐标当成通用规则。

social-media-agent

3891
from openclaw/skills

Automated social media manager — plan, write, schedule, and analyze content across X/Twitter, LinkedIn, Instagram, TikTok, Facebook, and Pinterest. Integrates with Buffer (free) or Postiz (self-hosted) for scheduling.

desktop-control

3891
from openclaw/skills

Advanced desktop automation with mouse, keyboard, and screen control. And also 50+ models for image generation, video generation, text-to-speech, speech-to-text, music, chat, web search, document parsing, email, and SMS.