Config-driven parser for keybindings with fzf interface
Project description
confhelp
Find and edit your keybindings instantly.
The Problem
Over time you accumulate tmux bindings, zsh aliases, vim mappings, custom functions - scattered across dozens of files. You know you set something up, but where?
Two pain points:
- Finding bindings - "What key did I bind for git status?" "Do I have an alias for docker compose?"
- Editing bindings - You remember it exists, now you need to change it. Which file? What line? grep → open → scroll → find → edit. Every. Single. Time.
The Solution
confhelp -b ~/dotfiles --edit
Fuzzy search all your bindings → select one → opens $EDITOR at exact file:line.
Install
pip install confhelp
Usage
# Output all bindings (uses base_dirs from config)
confhelp
# Interactive fzf selection
confhelp --select
# Select and open in $EDITOR at line
confhelp --edit
# JSON output
confhelp -f json
# Override base directory
confhelp -b ~/other-dotfiles
# Show keys defined more than once
confhelp --conflicts
# Report lines that look like bindings but failed to parse
confhelp --check
Example output:
[tmux] prefix+g display-popup -w 80%... .tmux.conf:42
[alias] gs git status .zsh_aliases:15
[bind] ^[e edit-command-line .zshrc:89
The --edit flag drops you directly into the file at the exact line. Change the binding, save, done.
Config Format
Define parsers in TOML. Each section describes how to extract bindings from a set of files:
# Default directories to search (no -b needed)
base_dirs = ["~/dotfiles", "~/work-dotfiles"]
[tmux]
paths = [".tmux.conf"]
match_line = "^bind"
regex = 'bind(?:-key)?\s+(?:-n\s+)?(\S+)(.*)'
key_group = 1
desc_group = 2
type = "tmux"
truncate = 100
[alias]
paths = [".zsh_aliases", ".zsh_claude"]
regex = "alias\\s+(?:-[gs]\\s+)?([^=]+)=(.*)"
key_group = 1
desc_group = 2
type = "alias"
strip_quotes = true
[abbrev]
paths = [".zsh_abbreviations"]
match_line = '".*"'
regex = '''"([^"]+)"\s+'([^']+)''''
key_group = 1
desc_group = 2
type = "abbrev"
[nvim]
paths = [".config/nvim/lua/**/*.lua"] # glob pattern
match_line = "vim.keymap.set"
regex = 'vim\.keymap\.set\([^,]+,\s*"([^"]+)".*desc\s*=\s*"([^"]+)"'
key_group = 1
desc_group = 2
type = "nvim"
Config Options
| Option | Description |
|---|---|
paths |
List of files or glob patterns (e.g., **/*.lua) |
regex |
Pattern with capture groups for key/desc |
key_group |
Capture group number for the key |
desc_group |
Capture group number for description |
match_line |
Only process lines matching this pattern |
skip_comment |
Skip lines starting with # |
truncate |
Max length for description |
strip_quotes |
Remove surrounding quotes from desc |
desc_literal |
Use fixed string as description |
desc_from_comment |
Extract desc from trailing # comment |
Output Formats
pipe(default): pipe-delimited[type]|key|desc|file:linetsv: Tab-separatedjson: JSON array
The pipe format works well with column -t -s'|' for aligned display.
Integration Examples
confhelp outputs text. How you display it is up to you.
Alacritty Popup
Spawn a centered popup window showing bindings. Enter jumps to the file:
selection=$(confhelp -b ~/dotfiles | column -t -s'|' | fzf)
# parse selection, open in editor
See examples/alacritty-popup.sh for a complete implementation.
tmux Popup
tmux display-popup -w 80% -h 80% -E 'confhelp -b ~/dotfiles --select'
See examples/tmux-popup.sh for a complete implementation.
Rofi/dmenu
confhelp -b ~/dotfiles | rofi -dmenu
Acknowledgments
Inspired by Extracto.
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file confhelp-0.5.0.tar.gz.
File metadata
- Download URL: confhelp-0.5.0.tar.gz
- Upload date:
- Size: 256.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a4e93ebffb8c0a85d940f340cb75fe84d2f6f60c5e976c43219040c06ee837c0
|
|
| MD5 |
e32da3d8b070e4bd66528e305fc38008
|
|
| BLAKE2b-256 |
d5eeacb3a0ecfa82bbcb46098de5585783d00bcb20e979684f8754f3bee9ed85
|
Provenance
The following attestation bundles were made for confhelp-0.5.0.tar.gz:
Publisher:
publish.yml on Piotr1215/confhelp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
confhelp-0.5.0.tar.gz -
Subject digest:
a4e93ebffb8c0a85d940f340cb75fe84d2f6f60c5e976c43219040c06ee837c0 - Sigstore transparency entry: 784328087
- Sigstore integration time:
-
Permalink:
Piotr1215/confhelp@7d968564bb37005701fbe62bc748367497a774f2 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Piotr1215
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7d968564bb37005701fbe62bc748367497a774f2 -
Trigger Event:
push
-
Statement type:
File details
Details for the file confhelp-0.5.0-py3-none-any.whl.
File metadata
- Download URL: confhelp-0.5.0-py3-none-any.whl
- Upload date:
- Size: 8.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cfe5221606f5343db383bcb3ea6159a199639bf584f1e7b8d00dda3d2892ecdd
|
|
| MD5 |
27bcbb6ae01c85d1d78fa3a98bdc3030
|
|
| BLAKE2b-256 |
f3975744d3eac4969ff67a29e1a63fa5fb7f9eaf3d90447be7f14e49aa6fe127
|
Provenance
The following attestation bundles were made for confhelp-0.5.0-py3-none-any.whl:
Publisher:
publish.yml on Piotr1215/confhelp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
confhelp-0.5.0-py3-none-any.whl -
Subject digest:
cfe5221606f5343db383bcb3ea6159a199639bf584f1e7b8d00dda3d2892ecdd - Sigstore transparency entry: 784328124
- Sigstore integration time:
-
Permalink:
Piotr1215/confhelp@7d968564bb37005701fbe62bc748367497a774f2 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Piotr1215
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7d968564bb37005701fbe62bc748367497a774f2 -
Trigger Event:
push
-
Statement type: