feat: run templates, watch-on-start, and dashboard links#8
Merged
Conversation
Wire the backend's new `template_id` and add clickable dashboard links. - `run start`: add `--template <slug>` (maintained run templates, e.g. welcome-to-ellipsis), `--watch`/`--interval` to start and immediately stream a run, and a local "exactly one of --config/--config-file/--template" check for a clearer error than the server's 400. - `run get` and `run start` now print a clickable dashboard link to the run; `config get` prints a link to the agent. Links are scoped by account login (resolved from /v1/me) and built from a new `resolveAppBase`, which derives the web app base from the API base (api -> app, beta-api -> beta-app) with an ELLIPSIS_APP_BASE override. - `config get`: the link goes to stderr so the YAML/JSON on stdout stays clean for piping; skipped entirely in `-o json` machine mode. Adds pure URL builders (urls.ts) with tests and resolveAppBase tests, and updates the README (the run-streaming section was stale — streaming already ships behind --watch). Removes the unused APP_BASE constant. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The poll cadence only applies to the rare REST fallback when live WebSocket streaming is unavailable, so it isn't worth a flag. Remove `--interval` from `run start`/`run get` and hardcode the fallback to 3s (FALLBACK_POLL_INTERVAL_SECONDS). The internal watchRun(intervalSeconds) param stays for testability. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ch-urls # Conflicts: # src/commands/run.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Three CLI additions on top of the new backend
template_idsupport:agent run getandagent config getnow print a clickable link to the run / agent in the web app.run startprints one too.run start --watch— start a run and immediately stream it (previously--watchonly existed onrun get). Also adds--intervalfor the polling fallback, mirroringrun get.run start --template <slug>— start from a maintained run template (e.g.welcome-to-ellipsis), sending the backend's newtemplate_id.URL construction
github_brand.py):{app}/{account_login}/agents/runs/{run_id}{app}/{account_login}/agents/{config_id}account_loginisn't on the run/config object, so it's resolved fromGET /v1/me(parallelized with the get, so no added latency).resolveAppBasederives the web app base from the API base (api.→app.,beta-api.→beta-app.) so beta users get beta-app links, with anELLIPSIS_APP_BASEoverride. Replaces the previously-unusedAPP_BASEconstant.Output hygiene
config get: the link is written to stderr so the YAML/JSON on stdout stays clean for piping/redirecting; skipped entirely under-o json(machine mode).run get/run start/watch: the link is skipped under--json.Notes
run startgets a local "exactly one of--config/--config-file/--template" pre-check — clearer than the server's 400 (the server still enforces it).--watch).Test plan
bun run typecheck✓bun run test— 62 passing (newurls.test.ts,resolveAppBasecases) ✓bun run build+ Bun compile smoke +--version✓run start --help/run get --helpshow the new flags🤖 Generated with Claude Code