A small workflow utility for managing local git repositories. It handles git identity configuration via profiles and keeps track of repositories across directory pools.
- Profiles — create, edit, and apply gitconfig-based identity profiles (
user.name,user.email, GPG settings). Profiles are selected interactively or matched automatically via git'sincludeIfrules. - Repository tracking — scan directory pools, look up repositories by name, jump to them via a shell function (
ye), and inspect repo status at a glance. - Shell completions for bash, zsh, fish, powershell, and elvish.
# From crates.io
cargo install yarm
# From source
cargo install --path .Recommended: install shell completions for tab completion and the ye jump function.
Help texts are available for yarm and all of its subcommands with usage instructions and available options. To print help use yarm <command> --help. The following sections provide an overview of the different commands and their usage principles.
| Command | Description |
|---|---|
yarm profiles [name] |
Manage profiles interactively, or target a specific profile |
yarm profiles [name] --show |
List all profiles, or print a specific profile's details |
Clone, init, and apply all accept -p <profile> to skip interactive selection. Show repository info and statistics with stat.
| Command | Description |
|---|---|
yarm clone <url> [path] |
Clone and apply a profile |
yarm init |
Initialize repository and apply a profile |
yarm apply [repo] |
Apply a profile to a repository by name (current if omitted) |
yarm apply -P <pool> |
Apply a profile to all repositories in a pool |
yarm stat [repo] |
Show branch, remote, status, size, last fetch |
| Command | Description |
|---|---|
yarm scan |
Scan configured pools for git repositories |
yarm find <name> |
Print full path of a repository by name |
yarm find -P <name> |
Print full path of a pool |
yarm status |
Show pool overview and scan state |
ye <name> |
Navigate into an existing pool repository (see shell completions) |
find matches by basename first (case-insensitive), then by path suffix. Use path fragments to disambiguate: yarm find work/my-repo.
stat accepts a repository name, path, or defaults to the current directory.
Add one of the following to your shell configuration. This loads tab completions for yarm and the ye jump function:
eval "$(yarm completions zsh)" # for zsh
eval "$(yarm completions bash)" # for bash
yarm completions fish | source # for fish
yarm completions powershell | Invoke-Expression # for PS
eval (yarm completions elvish | slurp) # for elvishAlternative: file-based installation
If you prefer file-based completions (e.g. for zsh compinit caching), redirect the output to the appropriate path:
# for zsh
yarm completions zsh > ~/.zfunc/_yarm
# for bash
yarm completions bash > ~/.local/share/bash-completion/completions/yarm
# for fish
yarm completions fish > ~/.config/fish/completions/yarm.fishThe ye function uses yarm find under the hood to cd into a repository by name. Tab completion is included for both repository and pool names.
ye my-repo # cd to a repository
ye -P projects # cd to a pool directoryyarm discovers profiles from three sources:
- Files known to git (
git config --list --show-origin) - Additional gitconfig files in
~/.gitconfig-*,~/.gitconfig.*, and~/.config/git/*.gitconfig - Custom directories configured in
~/.config/yarm.toml(see Configuration)
| Config File | Profile Name |
|---|---|
~/.gitconfig |
default |
~/.gitconfig-work |
.gitconfig-work |
~/.config/git/oss.gitconfig |
oss |
.git/config |
local |
Only files containing user.name or user.email are shown as selectable profiles.
yarm respects git's includeIf directives. Matching profiles are automatically promoted to the top of the selection list.
# ~/.gitconfig
[includeIf "gitdir:~/work/"]
path = ~/.gitconfig-work
[includeIf "hasconfig:remote.*.url:*github.com/mycompany/*"]
path = ~/.gitconfig-workWhen cloning or initializing a repo under ~/work/, or cloning from github.com/mycompany/*, the work profile will be suggested first.
~/.config/yarm.toml
[profiles]
# Pre-select this profile when no includeIf rule matches
default = "work"
# Additional directories to scan for gitconfig files
paths = [
"~/custom/gitconfigs",
"/shared/team-configs"
]
[repositories]
# Directories containing git repositories
pools = [
"~/projects",
"~/work"
]
# Glob patterns for directories to skip during scan
# Matched against the path relative to the pool root; use **/ for any depth
exclude = [
"**/[Bb]uild"
]| Key | Description |
|---|---|
profiles.default |
Profile to pre-select when no -p flag and no includeIf rule applies |
profiles.paths |
Additional directories to scan for gitconfig files |
repositories.pools |
Directories containing git repositories |
repositories.exclude |
Glob patterns for directories to skip during yarm scan |
repositories.auto_rescan |
Auto-rescan pools when internal state is outdated (default: true) |


