microcks-cli icon indicating copy to clipboard operation
microcks-cli copied to clipboard

feat: Automatically open Microcks Dashboard in the browser for better DX

Open Manar-Elhabbal7 opened this issue 6 months ago • 0 comments

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.

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

Related issue(s) : #423

Manar-Elhabbal7 avatar May 24 '26 00:05 Manar-Elhabbal7