Write server-info to file so agents can find URL after background launch

The server now writes its startup JSON to $SCREEN_DIR/.server-info.
Agents that launch the server via background execution (where stdout is
hidden) can read this file to get the URL, port, and screen_dir.
This commit is contained in:
Jesse Vincent
2026-03-09 20:46:34 -07:00
parent 81acbcd51e
commit 7f8edd9c12
2 changed files with 10 additions and 2 deletions

View File

@@ -42,6 +42,8 @@ scripts/start-server.sh --project-dir /path/to/project
Save `screen_dir` from the response. Tell user to open the URL.
**Finding connection info:** The server writes its startup JSON to `$SCREEN_DIR/.server-info`. If you launched the server in the background and didn't capture stdout, read that file to get the URL and port. When using `--project-dir`, check `<project>/.superpowers/brainstorm/` for the session directory.
**Note:** Pass the project root as `--project-dir` so mockups persist in `.superpowers/brainstorm/` and survive server restarts. Without it, files go to `/tmp` and get cleaned up. Remind the user to add `.superpowers/` to `.gitignore` if it's not already there.
**Launching the server by platform:**