microcks-cli
microcks-cli copied to clipboard
feat: Automatically open Microcks Dashboard in the browser for better DX
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:
- Centralized Browser Utility: A new package pkg/util to handle cross-platform browser launching with safety checks.
- 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).
- Command Updates:
- microcks start will open the main dashboard.
- microcks test will open the specific Test Result page.
- User Control: A new flag --launch-browser (defaulting to true) will be added to relevant commands to allow manual overrides.
Design Flow
flowchart TD
A[Run command] --> B{Browser enabled?}
B -->|No| C[Continue]
B -->|Yes| D{CI/CD environment?}
D -->|Yes| E[Skip]
D -->|No| F[Open browser]
Milestones
- PR 1: Browser utility +
microcks start(Current)
I will start after approving the Prev PR
- PR 2:
microcks test - PR 3 (optional): Refactor
microcks login+ persistent config