microcks / microcks/microcks-cli
feat: Automatically open Microcks Dashboard in the browser for better DX
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 52
- Forks
- 68
- Avg merge
- 6h 54m
- Merged PRs (30d)
- 10
Description
### Reason/Context
Currently, when a developer starts **Microcks** or runs a test, they have to manually click the URL in the console to open the browser. This adds friction to the development loop. It makes the CLI feel more modern and integrated
with the developer's workstation
### Description
This enhancement introduces a mechanism to automatically launch the system's default web browser when the CLI
outputs a link to the **Microcks UI.**
Changes to be introduced:
- 1. Centralized Browser Utility: A new package pkg/util to handle cross-platform browser launching with safety
checks.
- 2. Environment Awareness: The CLI will detect if it is running in a headless environment (CI/CD) or if the user
has globally disabled browser launching via environment variables (MICROCKS_NO_BROWSER).
- 3. Command Updates:
* microcks start will open the main dashboard.
* microcks test will open the specific Test Result page.
- 4. User Control: A new flag --launch-browser (defaulting to true) will be added to relevant commands to allow
manual overrides.
### Implementation ideas
* Use the `github.com/skratchdot/open-golang/open `library (already present in the project) for cross-platform
support.
* Implement a LaunchBrowser(url string, enabled bool) function that checks for os.Getenv("CI") before attempting
to open the browser.
* Split the work into three logical PRs:
1. Core utility + microcks start integration.
2. microcks test integration for direct Test Result links.
3. Refactor existing login --sso logic and add permanent configuration settings in config.yaml.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in the CLI implementations for `microcks start` and `microcks test`, then inspect the existing `github.com/skratchdot/open-golang/open` dependency and the proposed `pkg/util` location. Check how flags and environment variables are handled, including `CI` and `MICROCKS_NO_BROWSER`; done means the relevant commands launch the correct UI links by default while respecting overrides, without launching in CI. The issue also mentions `login --sso` and `config.yaml` as separate follow-up work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli, developer-experience
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100