Skip to content

08 CLI Deep Dive

Vicky Patel edited this page Nov 18, 2026 · 1 revision

08. Terminal CLI Deep Dive

The Power-User Command-Line Interface for Engineers and CI/CD Automation


⚑ Overview

The GitVerse CLI (gitverse) is a compiled, high-performance command-line utility written in pure Go. It enables developers to audit any GitHub user's achievement milestones directly from the terminal without opening a browser. It supports ANSI colorized tables, machine-readable JSON, automatic GitHub CLI credential reuse, and headless CI automation.


πŸ“₯ Installation Methods

Method 1: Using go install (Recommended)

Requires Go 1.25+:

go install github.com/TheVicky1/GitVerse/cmd/gitverse@latest

Ensure your Go binary path ($(go env GOPATH)/bin) is added to your shell's PATH.

Method 2: Download Prebuilt Binaries

Download precompiled, multi-architecture binaries (Linux, macOS, Windows) directly from the official GitHub Releases page.

Method 3: Running via Docker

docker run --rm -it thevicky1/gitverse:latest <username>

πŸ’» Command Reference & Flags

Usage: gitverse [flags] [username]

Arguments:
  username             GitHub handle to inspect (defaults to authenticated user)

Flags:
  -a, --all            Display the complete 15-badge catalog (including retired & staff)
  -j, --json           Output structured JSON for automation and piping
  -r, --raw            Print raw unformatted progress numbers
  -t, --token <token>  Provide explicit GitHub Personal Access Token or OAuth token
  -v, --version        Print version, commit hash, and build date
  -h, --help           Display help and command usage

πŸš€ Common Usage Examples

1. Check Your Own Profile (Auto-Auth)

If you already use the GitHub CLI (gh), GitVerse automatically discovers and reuses your active session token:

gitverse

2. Inspect Any Public Developer

gitverse torvalds

3. Display Complete Archive (Including Retired Badges)

gitverse --all TheVicky1

4. Machine-Readable JSON Output (jq Piping)

gitverse --json TheVicky1 | jq '.achievements[] | select(.status == "unlocked")'

πŸ”„ Headless CI/CD Automation

You can run GitVerse inside your GitHub Actions workflows to automatically verify milestone thresholds or assert contribution health:

name: Verify Contributor Achievements
on: [pull_request]

jobs:
  check-achievements:
    runs-on: ubuntu-latest
    steps:
      - name: Set up Go
        uses: actions/setup-go@v5
        with:
          go-version: '1.25'

      - name: Install GitVerse CLI
        run: go install github.com/TheVicky1/GitVerse/cmd/gitverse@latest

      - name: Check PR Author Progress
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        run: |
          gitverse --json ${{ github.actor }} > report.json
          cat report.json | jq '.achievements[] | {badge: .name, tier: .current_tier}'

🎨 Terminal Rendering Engine

The CLI uses ANSI escape sequences configured to adhere to the NO_COLOR standard (https://no-color.org). When output is piped to a file or another command, ANSI styling is automatically stripped to preserve clean data streams.

Clone this wiki locally