Open dev server
Find dev servers running in tmux panes and open in browser.
Usage
/open - list servers, open if only one found
/open /api/docs - open with path appended
/open my app - match server by freetext (match against pane name or command)
Steps
- Run the discovery script:
./find-servers.sh
Parse the tab-separated output:
PANE\tPORT\tCOMMANDDecide what to open:
- If
ARGUMENTSstarts with/, it's a literal path - append to the chosen server - Otherwise,
ARGUMENTSis freetext - use it to match against pane names and commands to pick the right server - If no arguments given, use conversation context to infer which server and path to open
- If one server found, use it
- If multiple servers found and context doesn't clarify, show a table and ask the user to pick
- If no servers found, tell the user
- If
Open in browser:
open "http://localhost:$PORT$PATH"
Arguments: $ARGUMENTS