govmr 0.1.2

A fast, asynchronous Go version manager written in Rust with an interactive TUI.
Documentation

GoVMR - Go Version Manager (Rust Edition)

A high-performance, asynchronous Go Version Manager written in Rust. GoVMR features a slick, interactive Terminal User Interface (TUI) powered by Ratatui, as well as a full-featured Command Line Interface (CLI) for scripting and automation.

Features

  • Blazing Fast & Lightweight: Zero external runtime dependencies; compiled directly to a standalone native binary.
  • Asynchronous Network & Streaming: Concurrent downloads and in-memory archive extraction using Tokio, Reqwest, Flate2, and Tar/Zip.
  • Interactive TUI: A modern Ratatui dashboard with:
    • Live download progress modal — animated gauge with percent, downloaded/total size, speed and ETA, followed by a dedicated "extracting" phase.
    • Live version search/filter, tab counts, archive sizes, and stable/rc badges.
    • Animated braille spinners for every background task (refresh, switch, delete, install).
    • Rounded-corners Go-cyan theme, branded header showing the active version, and an inline PATH-setup help overlay (h).
    • Keyboard navigation (vim keys + arrows).
  • CLI progress bar: govmr install shows a colored byte/speed/ETA bar that morphs into a spinner during extraction.
  • Non-Destructive Version Switching: Uses executable shims (~/.govmr/shim) to instantly switch active versions without modifying global binary paths.
  • Cross-Platform: Full support for Linux, macOS, and Windows.

Installation

From cargo-binstall (Recommended)

# If you don't have binstall
cargo install cargo-binstall

cargo binstall govmr

From cargo

cargo install govmr

From Source

Ensure you have Rust and Cargo installed:

git clone https://github.com/seyallius/govmr.git
cd govmr
cargo build --release

Move the compiled binary to your PATH:

# On Linux / macOS
sudo install -m 755 target/release/govmr /usr/local/bin/

# On Windows
copy target\release\govmr.exe C:\Windows\System32\

Shell Configuration (First-Time Setup)

GoVMR uses executable shims located in ~/.govmr/shim. Add this directory to your shell configuration so go resolves through GoVMR. A guided setup screen appears automatically the first time you run the TUI, and you can re-open it any time with h.

Linux & macOS

Add the following to your ~/.bashrc, ~/.zshrc, or equivalent shell profile:

export PATH="$HOME/.govmr/shim:$PATH"

Reload your environment:

source ~/.bashrc  # or ~/.zshrc

Windows (PowerShell / Command Prompt)

Run the following command in Command Prompt:

setx PATH "%USERPROFILE%\.govmr\shim;%PATH%"

Restart your terminal session to apply changes.


Usage

Interactive TUI

Launch the full interactive TUI by executing govmr without subcommands:

govmr

Keybindings

Key Action
↑ / k Move selection up
↓ / j Move selection down
Tab / t Switch between Available and Installed views
/ Open the live search/filter (type, then Enter to apply, Esc to clear)
i Download and install the selected version (shows the progress modal)
u Switch the active Go version to the selected release
d Delete the selected installed version (asks for confirmation)
r Refresh the remote version manifest from go.dev
h / ? Open the PATH-setup help overlay
q / Ctrl+C Exit GoVMR

CLI Commands

# Install a specific or partial Go release (with a live download progress bar)
govmr install 1.22
govmr install 1.21.6

# Switch active Go version
govmr use 1.22

# List installed versions and show the current active version
govmr list

# Delete an installed Go release
govmr delete 1.21.6

# Show help options
govmr --help

Architecture Overview

  • src/manager.rs: Core orchestrator managing remote version manifests, asynchronous streaming (with InstallProgress events for download speed/ETA and extraction phase), decompression, and disk persistence.
  • src/shim.rs: Manages shell wrappers inside ~/.govmr/shim to forward execution to the currently active Go binary.
  • src/tui/: Terminal UI — views.rs (dashboard, lists, modals, gauges), styles.rs (Go-cyan theme), and setup.rs (onboarding / help overlay) — via Ratatui.
  • src/cli.rs: Subcommand definitions and execution pathways using Clap and Indicatif.

Testing

Headless rendering tests draw every screen state (tabs, filter, install/extraction modals, delete confirmation, PATH warning) into an in-memory buffer:

cargo test

License

MIT OR Apache-2.0