[!TIP] Русская версия: README-RU.md
[!NOTE] gitow - git open web. A Rust CLI focused on opening repository web pages from the current working tree. It offers:
- Repository navigation - Open repository roots, branches, commits, issues, pull requests, commit history, releases, tracked files, and custom URL suffixes.
- Remote resolution - Resolve Git remote names, literal remote URLs,
insteadOfrewrites, and SSH config aliases.- Branch-aware links - Pick the upstream branch, current branch, exact tag, or current commit SHA depending on repository state.
- Multi-remote workflow - Open every configured remote with
--all-remotes, keepingoriginfirst.- Script-friendly output - Print generated URLs with
BROWSER=echowithout launching a browser.- Short command surface - Use one compact
gitowbinary for every navigation target.
[!IMPORTANT]
Required dependencies:
- Git
- Rust 1.95 or newer
- Platform browser launcher or a
BROWSERcommand
Installation
Install from crates.io
This installs the latest published release from crates.io into your Cargo bin directory.
Install from source
The command above builds gitow and places the binary into the Cargo bin directory, usually ~/.cargo/bin.
Run locally without installing
Run the binary through Cargo with:
Usage
gitow [OPTIONS] [REMOTE_OR_URL] [BRANCH]
Examples:
Navigation targets
-c, --commit- opens the current commit in the forge UI.-i, --issue- opens the issue inferred from the current branch name.-m, --pull-requests- opens the pull requests or merge requests page.-C, --commits- opens the commits page for the selected branch or ref.-r, --releases- opens the releases page where the forge supports it.-a, --all-remotes- opens every configured remote.-f, --file <PATH>- opens a repository-relative tracked file.-s, --suffix <SUFFIX>- appends an arbitrary suffix to the generated URL.-p, --print- prints the URL instead of launching a browser.-h, --help- shows the help text.
Common workflows
Remote and branch selection
By default, gitow opens:
open.default.remote, if configured.- The current branch's tracked remote, if configured.
origin.
For the ref, it uses the selected branch's upstream branch when available, otherwise the current branch. In detached HEAD state, it falls back to an exact tag and then to the current commit SHA.
Supported remote repositories
gitow detects URL layouts for:
- GitHub
- GitHub Gist
- GitLab.com and self-hosted GitLab instances
- Gitea, Forgejo, Gogs, and Codeberg
- Bitbucket Cloud
- Bitbucket Server / Atlassian Stash
- Azure DevOps / Visual Studio Team Services / Team Foundation Server
- AWS CodeCommit
- generic Git hosting URLs
Some pages are forge-specific. Releases are supported for GitHub, GitLab, and Gitea-compatible forges. AWS CodeCommit does not support the issue shortcut.
Configuration
gitow uses normal Git configuration. Add --global to apply an option to all repositories.
Default remote
Set the remote that should be opened when no remote argument is provided:
Custom web domain and protocol
If the Git remote host differs from the web UI host, configure URL-matched overrides:
For example, a remote like:
ssh://git@git.example.com:7000/team/repo.git
can open as:
http://repo.intranet/subpath/team/repo
Gitea, Forgejo, and Gogs
Gitea-compatible forges use a different branch URL layout. Codeberg and domains containing gitea, forgejo, or gogs are detected automatically. For custom domains, configure the forge type explicitly:
Accepted values gitea, forgejo, and gogs are normalized to gitea.
SSH config aliases
SCP-style remotes can be resolved through SSH config aliases:
Host work
HostName git.internal.example
# prints https://git.internal.example/team/repo
The tool reads the path from the GITOW_SSH_CONFIG environment variable first, then falls back to $HOME/.ssh/config when it exists.
Browser selection and debugging
By default, gitow uses the platform browser launcher:
- Windows:
cmd /C start - macOS:
open - Linux:
xdg-open - WSL: Windows PowerShell
Start
Set BROWSER to use a specific browser command:
BROWSER=firefox
Use --print or BROWSER=echo to inspect generated URLs without opening a browser:
BROWSER=echo
Development