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.
- Crates.io navigation - Open one or more named packages from any directory, or read the current package name from Cargo, with
-xor--crates-io. - 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 named remotes in argument order, or every configured remote with
--all-remotes. - Script-friendly output - Print generated URLs with
--printorBROWSER=echowithout launching a browser. - Short command surface - Use one compact
gitowbinary for every navigation target.
Important
- Git
- Rust 1.88 or newer
- Platform browser launcher or a
BROWSERcommand
cargo install gitowThis installs the latest published release from crates.io into your Cargo bin directory.
nix run github:WhoSowSee/gitow
nix profile install github:WhoSowSee/gitowUse nix run to try it without installing, or nix profile install for a persistent install.
Download the .snap package for your architecture from GitHub Releases: amd64 for x86-64 or arm64 for ARM64.
With snapd installed, replace ./gitow.snap below with the path to the downloaded file:
sudo snap install --dangerous --classic ./gitow.snap
snap run gitow--dangerous allows installing the local package without a Snap Store signature; --classic is required for access to repositories and the system browser.
Run snap run gitow from your Git working tree.
git clone https://github.com/WhoSowSee/gitow.git
cd gitow
cargo install --path .The command above builds gitow and places the binary into the Cargo bin directory, usually ~/.cargo/bin.
cargo build --release
./target/release/gitow --printRun the binary through Cargo with:
cargo run --bin gitow -- --printgitow [OPTIONS] [REMOTE_OR_URL]...
Examples:
gitow
gitow upstream
gitow origin gitlab
gitow git@github.com:owner/repo.git
gitow https://gitlab.example.com/group/project.git --branch main
gitow --repo mdv
gitow -R codeberg/whosowsee/mdv
gitow --print-c, --commit- opens the current commit in the forge UI.-x, --crates-io [PACKAGE]...- opens the named packages on crates.io, or the current Cargo package when names are omitted.-R, --repo <REPOSITORY>...- opens remote repositories without requiring a local checkout.-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.-b, --branch <BRANCH>- opens the selected branch instead of the current branch or detached ref.-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.-v, --version- shows the program version.
gitow --commit
gitow -x
gitow -x serde clap
gitow --issue
gitow --pull-requests
gitow --commits
gitow --releases
gitow --all-remotes
gitow --file src/main.rs
gitow --suffix actions
gitow --print-R and --repo open one or more remote repositories independently of the current checkout:
gitow -R mdv
gitow -R gitlab/mdv
gitow -R rust-lang/rust
gitow -R codeberg/whosowsee/mdv
gitow --repo gitlab/group/project codeberg/owner/repositoryRepository specs are resolved as follows:
FORGE/OWNER/REPOSITORYuses a short public forge alias. Supported aliases aregithub,gitlab,codeberg,bitbucket,gitea, andazure.OWNER/REPOSITORYdefaults to GitHub.- A full domain, URL, or SSH remote is used directly.
- A bare
REPOSITORY, orFORGE/REPOSITORY, inherits the owner in this order: global Gitopen.default.owner, local repositoryopen.default.owner, then the owner and forge of the currentorigin.
Configure the owner with git config --global open.default.owner OWNER, or omit --global for a repository-local value. A bare repository defaults to GitHub when the owner comes from config; an explicit alias such as gitlab/mdv changes the forge. An owner inherited from origin also inherits that remote's forge.
Repository selection supports --pull-requests, --releases, --suffix, and --print. Local-state targets such as --commit, --issue, --commits, --branch, and --file are rejected with --repo.
Explicit remote arguments are opened in the order provided. Every missing named remote is reported to standard error and skipped when at least one other remote resolves successfully. The command fails after reporting every requested remote if none exist.
Without explicit remotes, gitow opens:
open.default.remote, if configured.origin, if configured.- The current branch's tracked remote, if configured.
Select a branch with -b or --branch. For the ref, gitow uses the selected branch's upstream branch when available, otherwise the selected or current branch. In detached HEAD state, it falls back to an exact tag and then to the current commit SHA.
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.
gitow uses normal Git configuration. Add --global to apply an option to all repositories.
Set the remote that should be opened when no remote argument is provided:
git config open.default.remote upstreamIf the Git remote host differs from the web UI host, configure URL-matched overrides:
git config "open.https://git.example.com.domain" "repo.intranet/subpath"
git config "open.https://git.example.com.protocol" "http"For example, a remote like:
ssh://git@git.example.com:7000/team/repo.git
can open as:
http://repo.intranet/subpath/team/repo
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:
git config "open.https://git.internal.example.forge" "gitea"Accepted values gitea, forgejo, and gogs are normalized to gitea.
SCP-style remotes can be resolved through SSH config aliases:
Host work
HostName git.internal.example
git remote set-url origin work:team/repo.git
gitow --print
# prints https://git.internal.example/team/repoThe tool reads the path from the GITOW_SSH_CONFIG environment variable first, then falls back to $HOME/.ssh/config when it exists.
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 gitowUse --print or BROWSER=echo to inspect generated URLs without opening a browser:
gitow --print
BROWSER=echo gitowcargo fmt --check
cargo clippy --all-targets -- -D warnings
cargo test
© 2026-present WhoSowSee
