https://github.com/mohammedamarnah/nathm
nathm (Arabic نَظْم — to organize) - a TUI for organization and management of local git branches
https://github.com/mohammedamarnah/nathm
branch cli git
Last synced: about 1 month ago
JSON representation
nathm (Arabic نَظْم — to organize) - a TUI for organization and management of local git branches
- Host: GitHub
- URL: https://github.com/mohammedamarnah/nathm
- Owner: mohammedamarnah
- Created: 2026-05-07T20:47:00.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2026-05-07T21:32:06.000Z (2 months ago)
- Last Synced: 2026-05-07T23:26:33.371Z (2 months ago)
- Topics: branch, cli, git
- Language: Go
- Homepage:
- Size: 79.1 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# nathm
`nathm` (Arabic نَظْم — *to organize*) is a TUI for organization and management of git branches.

## Install
Make sure that Go is installed and is in the `PATH`:
```bash
echo 'export PATH="$PATH:$(go env GOPATH)/bin"' >> ~/.zshrc
source ~/.zshrc
```
```bash
go install github.com/mohammedamarnah/nathm@latest
```
## Usage
### Interactive
In any git repo:
```bash
nathm
```
Keys:
| Key | Action |
|---|---|
| `↑`/`↓` or `j`/`k` | navigate |
| `space` | toggle selection |
| `a` | select all visible |
| `A` | clear selection |
| `d` | safe delete |
| `D` | force delete |
| `r` | rename |
| `c` | checkout |
| `/` | filter |
| `s` | cycle sort |
| `p` | toggle stale-only |
| `?` | help overlay |
| `q` | quit |
### Subcommands
```bash
nathm prune # confirm-before-delete cleanup of stale branches
nathm prune --yes # skip confirmation
nathm rename old new # rename a local branch
nathm list # TSV output (name, status, age_seconds, ahead, behind)
nathm list --stale # only stale branches
nathm version
```
## Configuration
`${XDG_CONFIG_HOME:-$HOME/.config}/nathm/config.toml`. Auto-created on first run. Fields:
- `protected_patterns` — globs for branches that can never be deleted/renamed.
- `base_branches` — preference order for base branch detection.
- `default_sort` — `stale-first` | `name` | `age`.