{"id":27730700,"url":"https://github.com/mads-bisgaard/bayesh","last_synced_at":"2026-03-09T03:35:32.770Z","repository":{"id":243439401,"uuid":"812170473","full_name":"mads-bisgaard/bayesh","owner":"mads-bisgaard","description":"Bash/zsh command auto suggestion tool","archived":false,"fork":false,"pushed_at":"2025-12-31T13:55:06.000Z","size":12538,"stargazers_count":7,"open_issues_count":4,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-02T20:34:41.053Z","etag":null,"topics":["bash","zsh"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mads-bisgaard.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-06-08T06:20:39.000Z","updated_at":"2025-12-30T21:13:36.000Z","dependencies_parsed_at":"2024-06-17T23:15:51.028Z","dependency_job_id":"ea547145-1469-4fed-b7b7-3d6a644e6c2a","html_url":"https://github.com/mads-bisgaard/bayesh","commit_stats":null,"previous_names":["mads-bisgaard/bayesh"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/mads-bisgaard/bayesh","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mads-bisgaard%2Fbayesh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mads-bisgaard%2Fbayesh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mads-bisgaard%2Fbayesh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mads-bisgaard%2Fbayesh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mads-bisgaard","download_url":"https://codeload.github.com/mads-bisgaard/bayesh/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mads-bisgaard%2Fbayesh/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30281593,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-09T02:57:19.223Z","status":"ssl_error","status_checked_at":"2026-03-09T02:56:26.373Z","response_time":61,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bash","zsh"],"created_at":"2025-04-28T06:02:18.372Z","updated_at":"2026-03-09T03:35:32.751Z","avatar_url":"https://github.com/mads-bisgaard.png","language":"Go","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Bayesh\nA faster and more efficient way to use your shell history.\n\n## Description\nBayesh suggests relevant commands to you in your shell (using fzf). This is done by maintaining a database of your shell history and suggesting you relevant commands based on a statistical model.\n\n\n## Installation\nThe following has been tested on Fedora and Ubuntu:\n1. Ensure the dependencies are installed ([fzf](https://github.com/junegunn/fzf), [jq](https://jqlang.org/) and [python3](https://www.python.org/))\n2. Execute the following snippet in your shell\n```bash\ngit clone https://github.com/mads-bisgaard/bayesh.git ~/.bayesh/bayesh\n~/.bayesh/bayesh/install.sh \"$(basename \"$SHELL\")\"\n```\n\n### Shell integration\nBayesh is triggered by hitting `Ctrl-e` in your shell. You will by far get the most out of Bayesh if you use it in your z-shell within [tmux](https://github.com/tmux/tmux). In that case you toggle the fzf pane using `Ctrl-\u003cup arrow\u003e` and `Ctrl-\u003cdown arrow\u003e` and you select a suggestion using `Ctrl-\u003cright arrow\u003e`.\n\n\n## Remarks\nThe purpose of Bayesh is to detect your repetitive shell workflows and (via a great UI (=[fzf](https://github.com/junegunn/fzf))) allow you to quickly reuse commands. In that sense its purpose is similar to the auto suggestion/complete feature smartphones offer. A key difference however, is that Bayesh is not \"trained\" on any external data. That means it will only ever suggest commands you have previously used. In particular it will only start generating useful suggestions after a short learning phase.\n\n## Gotchas\nBayesh uses the Bash `history` builtin to determine when a new command is executed and when not. Hence, to get the most out of Bayesh you are advised to ensure that, when you execute the same command twice in a row it is visible in your bash history that you ran it twice. In Bash you can do that by adding `export HISTCONTROL=` in your `~/.bashrc` (see [here](https://www.gnu.org/software/bash/manual/bash.html#index-HISTCONTROL)). In Zsh you can do that by adding `unsetopt HIST_IGNORE_DUPS` to your `~/.zshrc` (see [here](https://zsh.sourceforge.io/Doc/Release/Options.html)). You can test your setup by running `history -1` twice in your shell and check that the two lines printed are different (either because they display different timestamps or history event numbers).\n\n### Some inspirations for this project\n- [autojump](https://github.com/wting/autojump), [z](https://github.com/rupa/z) and [zoxide](https://github.com/ajeetdsouza/zoxide)\n- The exceptional [fzf](https://github.com/junegunn/fzf)\n- [Peter Norvig](https://norvig.com/)'s excellent [blogpost](https://norvig.com/spell-correct.html) on how to build a spelling corrector.\n\n### Why \"Bayesh\"? 👀\n**Bayes**ian statistics on your **bash** history 🤷‍♂️.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmads-bisgaard%2Fbayesh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmads-bisgaard%2Fbayesh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmads-bisgaard%2Fbayesh/lists"}