Bayesh
Zsh command auto suggestion tool
Install / Use
npx skills add mads-bisgaard/bayeshInstalls into whichever agent you are using.
README
Bayesh
Make better use of your shell history!

What is Bayesh?
Bayesh is an auto-suggestion feature for your Zsh shell. Bayesh keeps track of your shell history and based on the current context, suggests shell commands to you in real time. Bayesh is an attempt to apply the core idea of z, not only to the cd command, but to your full shell history.
The plan is for Bayesh to integrate many "autosuggestion/autocompletion" tools in the near future.
Bayesh is lightening fast ⚡ (written in Go) and powered by fzf for great UX.
Installation
-
Install Dependencies:
Ensure you have the following installed: fzf, jq, tmux -
Install Bayesh:
To install Bayesh run
curl -sSLf https://raw.githubusercontent.com/mads-bisgaard/bayesh/refs/heads/main/install.sh | sh
Make sure to integrate Bayesh into your shell.
Shell integration
- To integrate Bayesh into Zsh, add
source <(bayesh --zsh)to your configuration file. You can do so by executing the following command in your shell:
echo "command -v bayesh > /dev/null && source <(bayesh --zsh)" >> ~/.zshrc
How to Use Bayesh
Once inside a tmux session (achieved by running tmux in your zsh shell), you open/close Bayesh by hitting Ctrl-e in your shell. Once open,
- toggle the fzf pane with
Ctrl-<up arrow>andCtrl-<down arrow>. - select a suggestion with
Ctrl-<right arrow>.
At first Bayesh has a short "learning phase" before it will start suggesting you commands.
Inspirations
Bayesh draws inspiration from:
- autojump, z, and zoxide
- The incredible fzf
- Peter Norvig's legendary blogpost on building a spelling corrector
Contributions
Want to contribute? Whether it's fixing a bug, suggesting a feature, or improving documentation, your help is very much appreciated.
How to Contribute:
- Fork the repository.
- Create a new branch for your changes.
- Submit a pull request with a clear description of your changes.
Feel free to open an issue if you have questions or need guidance. Let's make Bayesh even better together!
Why the Name "Bayesh"? 👀
Bayesian statistics applied to your Zsh history.
Gotchas
-
Bayesh relies on your shell’s history behavior. To get the best experience:
-
For Bash Users:
Add this to your~/.bashrc:export HISTCONTROL= -
For Zsh Users:
Add this to your~/.zshrc:unsetopt HIST_IGNORE_DUPS
Test your setup by running
history -1twice. If the two lines are different (timestamps or event numbers), you’re good to go! -
-
Bayesh is built with
CGO_ENABLED=1, so it relies on glibc being available at run time.
Related Skills
node-connect
385.5kDiagnose OpenClaw Android, iOS, or macOS node pairing, QR/setup code, route, auth, and connection failures.
blender-python-addon
40.5kBlender Python add-on rules for operators, panels, properties, registration, testing, and API-safe scripting
flutter-development-guidelines-cursorrules-prompt-file
40.5kCursor rules for Flutter development with MVVM architecture, Riverpod state management, Material widgets, and Dart style guidelines.
commit-push-pr
140.6kCommit, push, and open a PR
