git-browse-ci
Browse CI results from the command line
TLDR
Open the current repository's CI configuration on its upstream website
Open the current repository's CI configuration on its upstream website for a specific remote
SYNOPSIS
git browse-ci [options]
git browse-ci [-p|--print] [-b|--branch <branch>]
PARAMETERS
-p, --print
Print the generated CI URL to standard output instead of opening it in a web browser.
-b <branch>, --branch <branch>
Specify a branch for which to open the CI page. If not specified, it defaults to the current branch.
DESCRIPTION
The git browse-ci command opens the Continuous Integration (CI) page associated with the current Git repository in your default web browser.
It intelligently detects the CI provider (e.g., GitHub Actions, GitLab CI, Travis CI, Circle CI) by examining the repository's configuration and files. Once detected, it constructs the correct URL for the CI dashboard or pipeline history for the current or specified branch.
This command streamlines access to your CI/CD pipelines, allowing quick monitoring of build statuses and test results without manually navigating to the CI platform's website. It's particularly useful for projects integrated with various CI services.
CAVEATS
The command relies on heuristics to detect the CI provider. In some complex setups or non-standard configurations, it might not correctly identify the provider or construct the URL.
It requires a web browser to be configured and available on the system.
For private repositories or CI services requiring authentication, you will still need to be logged into the respective CI platform in your browser.
CI PROVIDER DETECTION
git browse-ci attempts to auto-detect the CI provider by looking for specific files (e.g., .gitlab-ci.yml, .github/workflows) or Git configuration (.git/config) entries.
Supported providers include GitLab, GitHub Actions, Travis CI, Circle CI, Jenkins, Azure DevOps, Bitbucket Pipelines, and more.
ENVIRONMENT VARIABLES
The behavior of git browse-ci can be influenced by environment variables:
- GIT_BROWSE_CI_PROVIDER: Force a specific CI provider, overriding auto-detection.
- BROWSER: Specify the web browser command to use, e.g., BROWSER=firefox git browse-ci. If not set, it uses system defaults like xdg-open or open.
HISTORY
The git browse-ci command is a component of the popular git-extras project, a collection of useful Git commands that extend Git's core functionality.
It was developed to simplify the often tedious process of navigating to various CI/CD platforms for different projects, providing a unified command-line interface for accessing CI build statuses.
Its development reflects the increasing adoption of continuous integration practices in modern software development workflows.
SEE ALSO
git(1), git-extras(1), git-browse(1), xdg-open(1)