---
name: editors
description: Launch the Pre-Production or Production Console in Chrome.
allowed-tools: Bash, Read
argument-hint: "[project] [--production] [--stop]"
---

# /editors — Recoil Consoles

Launch the Pre-Production Console (default) or Production Console in Chrome.

## Two Consoles

| Console | Port | Server | Tabs |
|---------|------|--------|------|
| **Pre-Production** (default) | 8420 | `recoil/editors/serve.py` | Screenplay, Grammar, Vis Bible, Casting, Screen Test, Locations |
| **Production** (`--production`) | 8430 | `starsend/editors/review_server.py` | Shooting Script, Previz, Board, Dailies |

## Usage

```
/editors                              # Start pre-prod server (8420) and open console
/editors --production                 # Start production server (8430) and open console
/editors tartarus                     # Open pre-prod with project pre-selected
/editors tartarus --production        # Open production console with project pre-selected
/editors tartarus ep 1                # Open with project + episode
/editors tartarus ep 1 --casting      # Open directly to Casting tab
/editors --stop                       # Kill both servers
/editors --stop 8420                  # Kill only pre-prod server
```

## Execution

### Default: Launch

1. Determine which console:
   - Default (no `--production` flag): Pre-Production Console (port 8420)
   - With `--production` flag: Production Console (port 8430)

2. Start the server if not already running:
   - Pre-prod: `cd ~/CLAUDE_PROJECTS/recoil && python3 editors/serve.py &`
   - Production: `cd ~/CLAUDE_PROJECTS/starsend && python3 editors/review_server.py --project tartarus &`

3. Build the URL with any project/episode/tab params:
   - Pre-prod base: `http://127.0.0.1:8420/`
   - Production base: `http://127.0.0.1:8430/`
   - Add `?project=NAME` if project specified
   - Add `&episode=N` if episode specified
   - Add `&tab=TAB` if tab specified (see tab data-tab values below)

4. Open in Chrome:
   ```bash
   open -a "Google Chrome" "URL"
   ```

### Tab data-tab values (for `&tab=` param)

**Pre-Production (8420):** revision, score, visual-bible, casting, screen-test, locations

**Production (8430):** script, previz, board, dailies

### `--stop`: Kill Server(s)

```bash
# Kill both
lsof -ti:8420 | xargs kill 2>/dev/null; lsof -ti:8430 | xargs kill 2>/dev/null && echo "Servers stopped." || echo "No servers running."
# Kill one
lsof -ti:PORT | xargs kill 2>/dev/null && echo "Server stopped." || echo "No server running."
```

## Notes

- Pre-Production Console serves `prepro-console.html` at root (`/`)
- Production Console redirects `/` to `/console` which serves `production-console.html`
- Production Console also has mobile PWA at `/m`
- Standalone editors still work at `/_standalone/editor_name.html` on port 8420
