dotwrap is a tiny installer/uninstaller for a namespaced set of GitHub CLI aliases.
Why it exists:
- I want
ghworkflows that feel like a real CLI, not a browser tab. - I want shareable aliases without a dotfiles framework.
- I want safe, reversible changes (only touches
dw_aliases). - I want something I can keep around for years.
Requirements:
- Python 3.11+
gh(GitHub CLI)
Install the aliases into gh (idempotent):
python3 dotwrap.py install gh
# provider defaults to gh, so this is also fine:
python3 dotwrap.py installThen use the aliases via gh:
gh dw_prs
gh dw_prmeta 17
gh dw_prweb 17
gh dw_prco 17Interactive PR picker powered by fzf.
Extra requirement:
-
fzf -
enter→ open selected PR in the browser -
ctrl-o→ checkout the selected PR -
esc→ quit (exit 0)
All config lives in aliases.toml next to dotwrap.py.
Format:
[providers.gh.aliases]
dw_prs = "..."
dw_prmeta = """ ... """Rules:
- Alias keys must start with
dw_. If any key doesn’t, dotwrap exits 1. - Commands are normalized before install:
" ".join(value.split()). - Aliases are processed in sorted key order (deterministic installs).
Remove only the aliases declared in aliases.toml:
python3 dotwrap.py uninstall ghpython3 -m unittest discover -s tests -vTests never call real gh: they put a fake gh binary on PATH and assert the exact subprocess argv that dotwrap sends.
- Not a dotfiles manager.
- Not a replacement for
gh. - Not a secret store (don’t put tokens in alias commands).
