Skip to content

Conversation

@BYK
Copy link
Member

@BYK BYK commented Dec 10, 2025

Add a new --open / -o CLI flag that automatically opens the Spotlight
web dashboard in the user's default browser when starting the sidecar server.

Implementation:

  • Add openInBrowser utility using platform-specific commands
    (macOS: open, Windows: cmd /c start, Linux: xdg-open)
  • Add --open / -o boolean flag to CLI argument parsing
  • Update help text with new flag documentation
  • Implement browser opening in both server and run commands
  • Add E2E tests for the new flag

Closes #1192

@vercel
Copy link

vercel bot commented Dec 10, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
spotlightjs Ready Ready Preview Comment Dec 10, 2025 8:41pm

Copy link
Member

@betegon betegon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok this is so good to have.

i've used it with spotlight run --open docker compose build 🔥

Add a new `--open` / `-o` CLI flag that automatically opens the Spotlight
web dashboard in the user's default browser when starting the sidecar server.

Implementation:
- Add `openInBrowser` utility using platform-specific commands
  (macOS: open, Windows: cmd /c start, Linux: xdg-open)
- Add `--open` / `-o` boolean flag to CLI argument parsing
- Update help text with new flag documentation
- Implement browser opening in both `server` and `run` commands
- Add E2E tests for the new flag

Closes #1192
@BYK BYK force-pushed the feat/cli-open-flag branch from 6dabc42 to ad5b8a3 Compare December 10, 2025 20:40
@BYK BYK deployed to Preview December 10, 2025 20:40 — with GitHub Actions Active
@BYK BYK enabled auto-merge (squash) December 10, 2025 20:46
@BYK BYK merged commit 3da87c9 into main Dec 10, 2025
22 checks passed
@BYK BYK deleted the feat/cli-open-flag branch December 10, 2025 20:46
BYK pushed a commit that referenced this pull request Dec 13, 2025
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and publish to npm
yourself or [setup this action to publish
automatically](https://github.com/changesets/action#with-publishing). If
you're not ready to do a release yet, that's fine, whenever you add more
changesets to main, this PR will be updated.


# Releases
## @spotlightjs/[email protected]

### Minor Changes

- Add `--open` / `-o` CLI flag to automatically open the Spotlight
dashboard in your default browser when starting the sidecar
([#1200](#1200))

### Patch Changes

- Fixed flamechart tree building to iterate from root to leaf frames,
resolving fragmented visualization
([#1201](#1201))

- shifted electron dependencies to dev dependencies as there were
getting installed with npx for spotlight run
([#1184](#1184))

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a flag to automatically open the web panel

3 participants