amux
Use when you need to interact with the amux system — manage board tasks, check sessions, send emails, automate browsers, or work with CRM contacts
mkdir -p ~/.claude/commands && curl -fsSL https://raw.githubusercontent.com/mixpeek/amux/HEAD/.claude/commands/amux.md -o ~/.claude/commands/amux.mdamux.md
# /amux — amux Session Integration
You are running inside an **amux** managed Claude Code session. amux is a local multiplexer that manages multiple Claude sessions, a shared kanban board, notes, CRM, scheduler, email, browser automation, and per-session memory.
**Base URL:** `$AMUX_URL` (self-signed TLS — always use `curl -sk`)
---
## Board (tasks / issues)
```bash
# List all items
curl -sk $AMUX_URL/api/board | python3 -m json.tool
# Add item
curl -sk -X POST -H 'Content-Type: application/json' \
-d '{"title":"...", "desc":"...", "status":"todo", "session":"SESSION_NAME"}' \
$AMUX_URL/api/board
# Update item
curl -sk -X PATCH -H 'Content-Type: application/json' \
-d '{"status":"doing"}' $AMUX_URL/api/board/ITEM_ID
# Delete item
curl -sk -X DELETE $AMUX_URL/api/board/ITEM_ID
# Claim a task atomically (prevents two sessions taking same task)
curl -sk -X POST -H 'Content-Type: application/json' \
-d '{"session":"SESSION_NAME"}' $AMUX_URL/api/board/ITEM_ID/claim
```
Statuses: `backlog` · `todo` · `doing` · `done` (plus any custom columns)
---
## Sessions
```bash
# List sessions
curl -sk $AMUX_URL/api/sessions | python3 -m json.tool
# Send a message to a session
curl -sk -X POST -H 'Content-Type: application/json' \
-d '{"text":"your message"}' $AMUX_URL/api/sessions/SESSION_NAME/send
# Peek at a session's terminal output
curl -sk "$AMUX_URL/api/sessions/SESSION_NAME/peek?lines=100"
```
---
## Memory
```bash
# Read this session's memory
curl -sk $AMUX_URL/api/sessions/SESSION_NAME/memory
# Update this session's memory
curl -sk -X POST -H 'Content-Type: application/json' \
-d '{"content":"# My Notes\n..."}' $AMUX_URL/api/sessions/SESSION_NAME/memory
# Read/write global memory (shared across all sessions)
curl -sk $AMUX_URL/api/memory/global
curl -sk -X POST -H 'Content-Type: application/json' \
-d '{"content":"..."}' $AMUX_URL/api/memory/global
```
---
## Scheduler (recurring / one-time tasks)
Schedule commands to run in sessions at specific times or on a cron schedule.
```bash
# List all schedules
curl -sk $AMUX_URL/api/schedules | python3 -m json.tool
# Create a one-time schedule
curl -sk -X POST -H 'Content-Type: application/json' \
-d '{
"title": "Weekly analytics",
"session": "gtm-videos",
"command": "Run the weekly analytics report",
"kind": "tmux",
"sched_type": "once",
"run_at": "2026-04-10T09:00"
}' $AMUX_URL/api/schedules
# Create a recurring schedule (cron expression)
curl -sk -X POST -H 'Content-Type: application/json' \
-d '{
"title": "Weekly video check",
"session": "gtm-videos",
"command": "Check video pipeline status and post summary to board",
"kind": "tmux",
"sched_type": "recurring",
"schedule_expr": "0 9 * * 1"
}' $AMUX_URL/api/schedules
# Update a schedule
curl -sk -X PATCH -H 'Content-Type: application/json' \
-d '{"enabled": 1}' $AMUX_URL/api/schedules/SCHED_ID
# Delete a schedule
curl -sk -X DELETE $AMUX_URL/api/schedules/SCHED_ID
# View recent runs
curl -sk $AMUX_URL/api/schedules/runs | python3 -m json.tool
# Trigger a schedule immediately
curl -sk -X POST $AMUX_URL/api/schedules/SCHED_ID/run
```
**Fields:** `title`, `session` (target session name), `command` (text sent to session), `kind` (`tmux`), `sched_type` (`once`|`recurring`), `schedule_expr` (cron: `min hour dom month dow`), `run_at` (ISO datetime for one-time), `watch` (0/1 — watch output after send), `watch_timeout` (seconds), `done_pattern` (regex to detect completion), `done_action` (`disable`|`reschedule`)
---
## Notes (documents / reference material)
```bash
# List all notes
curl -sk $AMUX_URL/api/notes | python3 -m json.tool
# Read a note
curl -sk $AMUX_URL/api/notes/my-note
# Create or update a note (use slug as path)
curl -sk -X POST -H 'Content-Type: application/json' \
-d '{"content":"# Title\n\nBody text here"}' \
$AMUX_URL/api/notes/my-note
# Delete a note (moves to trash)
curl -sk -X DELETE $AMUX_URL/api/notes/my-note
# Pin/unpin a note
curl -sk -X POST $AMUX_URL/api/notes/my-note/pin
```
---
## Email (via Mail.app)
Accounts: ethan@mixpeek.com · esteininger21@gmail.com
```bash
# Read inbox (returns recent messages with subject, from, date, body, message_id)
curl -sk "$AMUX_URL/api/email/inbox?account=ethan@mixpeek.com&count=20&days=7"
# Params: account (filter to one account), count (max messages, default 20), days (lookback, default 7)
# Send email (validates email format, optional from account)
curl -sk -X POST -H 'Content-Type: application/json' \
-d '{"to":"x@example.com","subject":"Hi","body":"...","from":"ethan@mixpeek.com"}' \
$AMUX_URL/api/email/send
# Reply to an existing email (by message_id from inbox response)
curl -sk -X POST -H 'Content-Type: application/json' \
-d '{"message_id":"<msg-id-from-inbox>","body":"Thanks!","reply_all":false}' \
$AMUX_URL/api/email/reply
# Sync email → calendar events (background AI extraction)
curl -sk -X POST $AMUX_URL/api/email/sync
# Get extracted calendar events
curl -sk $AMUX_URL/api/email/events
```
**Workflow for replying:** call `/api/email/inbox` first to find the message, then use its `message_id` field in `/api/email/reply`.
---
## Browser Automation
**Live backend** — same verbs, executed in YOUR real Chrome (real logins, real IP). Opens a NEW tab (never touches existing tabs); first use needs one "Allow debugging?" click. Use when acting-as-you matters (SSO dashboards, bot-walled sites); the default profile backend is for parallel/unattended work.
```bash
curl -sk -X POST -H 'Content-Type: application/json' -d '{"backend":"live","url":"https://example.com"}' $AMUX_URL/api/browser/start
# navigate/screenshot/state/action/stop then work identically; live click takes {"selector":"..."} or x,y.
```
Shared Playwright instance with saved auth profiles.
```bash
# Start browser
curl -sk -X POST -H 'Content-Type: application/json' \
-d '{"profile":"default","url":"https://example.com"}' \
$AMUX_URL/api/browsePick up an open issue from the amux issue tracker, mark it doing, work it, and mark it done.
Use when the user says "add to board", "create a task", or wants to track a todo on the amux kanban board
Use when the user asks to interact with a web page, take a screenshot of a site, click or type in Chrome, scrape content, or debug a web UI. Connects to real Chrome tabs with existing logins.
Scaffold a closed orchestrator loop — creates the mission note, state/constraints notes, and a scheduler entry from the v2 template.
Use when the user needs to log into a website for browser automation, save auth cookies, or sync browser profiles to cloud
Use when you need to test the amux dashboard UI, investigate a visual bug, or verify a frontend change works correctly
Use when the user wants to record a video of a browser task, create a screen recording, or produce an MP4 demo
Use when the user asks what a session did, wants to review session history, or needs to find errors in a session log