| Crates.io | blaze-keys |
| lib.rs | blaze-keys |
| version | 0.3.0 |
| created_at | 2026-01-16 21:01:05.307174+00 |
| updated_at | 2026-01-25 16:25:41.367253+00 |
| description | Zsh plugin for blazing fast Zsh commands, providing customizable leader-key combos and project-specific keybinds. |
| homepage | |
| repository | https://github.com/enhanced-primate/blaze-keys |
| max_upload_size | |
| id | 2049236 |
| size | 131,461 |
Blazing fast terminal commands with customizable leader-key combos and project-specific keybinds. For Zsh and Nushell.
nushell support is limited to leader-key functionality at present.
Note: All the keybinds shown are defined in the
blzconfig, and fully customizable.
With blaze-keys you can:
Alt+g to run git status.
git status or cargo build --release.git commit -am or git checkout -b.push-line.For example, maybe you want to be able to use Shift+Alt+B to run cargo build in a Rust project, but you want the same shortcut to run make in a C project. blaze-keys allows you to easily configure this, without needing to run any commands when you cd between projects.
Tip:
blaze-keysalso works in Vim mode; callbindkey -vbefore activatingblaze-keysin your~/.zshrc.
fish (please upvote the issue if you're interested).
nushell added. Limitations: blz only supports leader keys in nushell; top-level keybinds are not yet supported.You can try out blaze-keys without installing it, by using the Docker image.
blaze-keys uses two types of configuration:
global configuration:
conditions which are used to determine whether they should be applied when you cd into a project.local configurations (optional):
local configuration is in your current working directory.inherit a profile from the global config.After completing the setup steps below, you can follow the brief tutorial.
blz is a single executable file in a tarball, which you can download from the release page. Extract blz from the tarball and make sure it's on your PATH.
You can alternatively install with cargo (Rust 1.88 or newer):
cargo install --locked --bin blz blaze-keys
Run blz -g to edit the global config (creating from template if not present). The repo includes an example which demonstrates many of the available features: global.all.yml. I would suggest that you use the all config when prompted, then (after completing step 3 below) follow the tutorial to familiarise yourself with the usage; then you can modify the config as you wish.
Warning: After adding a new leader key to the global config, you need to source your config (in Zsh) or open a new shell for the new keybinds to take effect.
⚠️ macOS users: You will need to configure your terminal emulator to use the
Optionkey asAlt. Please see the macOS terminal setup guide for more information.
For zsh, add a line to your .zshrc file and source it:
echo 'source <(blz --zsh-hook)' >> ~/.zshrc
source ~/.zshrc
If using nushell, first you need to generate the file which will hold the leader-key keybindings:
# Important: Run manually before adding the block to the nu config.
blz porcelain generate-nu-source
Then run config nu to edit the shell config, and paste in the following block:
### blaze-keys: start v1
blz porcelain generate-nu-source
source ~/.config/blaze-keys/.leader_keys.nu
$env.BLZ_SHELL = "nu"
$env.BLZ_LEADER_STATE = (blz porcelain print-leader-state)
$env.config.hooks.pre_execution = $env.config.hooks.pre_execution | append { ||
if ((commandline) | str contains "source") {} else if ((commandline) | str contains "env.BLZ") {} else {
blz porcelain check-leader-state
}
}
### blaze-keys: end
Then open a new shell. You will need to use a new terminal tab/window to ensure it doesn't inherit the environment from the first shell.
Note: Local configs are optional, and I would typically recommend creating a profile in the global config instead.
You can use blz -l to edit (creating if not present) a local config in any directory, which will be stored as .blz.yml. It will be applied only when you cd to that directory.
# Optional: You can inherit a profile from the global config.
# This isn't necessary if one of the profile's 'conditions' evaluates to true.
inherits:
- Rust
keybinds:
- key: "Ctrl-l"
command: "ls -la"
- key: "C-g"
# '^M' can be used as the `Enter` key. This is useful here because `blz` applies only one `^M`,
# which in this case expands `!!` to the last executed command;
# another 'Enter' is required to execute the expanded last command.
command: "!!^M"
- key: "F10"
command: "cargo run"
nushell?The leader-key functionality is supported in nushell, but top-level keybinds are not yet.
cd into a child directory, will my keybindings be unset?Every time you cd, blz will emit the appropriate keybindings based on the local config, if present, and any profiles in the global config, if applicable. It does not explicitly unset any keybindings when a local config or profile becomes non-applicable, so your keybindings will remain set until a conflicting keybind is applied.
blaze-keys instead of shell aliases?cc to run cargo check or conan create.exec mode). In my experience, this reduces strain on my wrist significantly.abbr mode). Unlike an alias, the full command will appear in your history.localhost/my-private-image, you can create an alias with blaze-keys which can be used after typing the initial command, like docker save -o out.tar <trigger blaze-keys to insert 'localhost/my-private-image'>.blaze-keys TUI makes it easier to find an alias which you've forgotten, rather than searching for it in the alias output.blaze-keys just feels like you have a more direct interface with the terminal. It feels smoother and more fluid, partly because the Enter key becomes more obsolete.If your top-level keybindings are not working as expected, you can see what keybindings are being emitted by running blz -v:
$ blz -v
Ctrl-P -----> 'push-line' (zle builtin)
Alt-l -----> 'ls -lah'
F2 -----> 'git log'
Alt-B -----> 'cargo build'
Alt-X -----> 'cargo run'
...
Note: This is directory-dependent and will include all keybindings from profiles active in your current working directory, or local configs.
You can run blz -B to see the raw bindkey commands which are being executed, in Zsh syntax. You can then manually try to run these bindkey commands to see if they work.
If your TUI is not appearing when triggering a leader key, check for a .panic.blz file in the current working directory.
If you need to view blz logs, you can export BLZ_LOG=debug and view the log file at /tmp/blz.log.
It's possible for another process to inject into the command which is completed with blz, if specifically engineered to do so. However, this is no greater risk than that of a program overwriting your ~/.zshrc to reassign some aliases to malicious commands.
As a precaution, blz will not run as root unless an environment variable (BLZ_ALLOW_ROOT) is explicitly set.