{"id":19496830,"url":"https://github.com/jmwoliver/hui","last_synced_at":"2025-07-09T23:32:28.880Z","repository":{"id":161787825,"uuid":"636419213","full_name":"jmwoliver/hui","owner":"jmwoliver","description":"A visual alternative to the history command written in Rust","archived":false,"fork":false,"pushed_at":"2023-12-23T15:03:01.000Z","size":1753,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-15T15:54:54.528Z","etag":null,"topics":["bash","cli","history","ratatui","rust","zsh"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jmwoliver.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2023-05-04T20:06:07.000Z","updated_at":"2024-06-16T10:12:40.000Z","dependencies_parsed_at":"2023-12-23T00:50:02.289Z","dependency_job_id":"de208fff-d474-464d-9c0b-58346e8bb918","html_url":"https://github.com/jmwoliver/hui","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/jmwoliver/hui","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmwoliver%2Fhui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmwoliver%2Fhui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmwoliver%2Fhui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmwoliver%2Fhui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jmwoliver","download_url":"https://codeload.github.com/jmwoliver/hui/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmwoliver%2Fhui/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264505259,"owners_count":23618909,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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","cli","history","ratatui","rust","zsh"],"created_at":"2024-11-10T21:42:18.862Z","updated_at":"2025-07-09T23:32:28.857Z","avatar_url":"https://github.com/jmwoliver.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `hui` - A visual alternative to `history` written in Rust\n\n\u003cimg src=\"./assets/hui_demo.gif\" alt=\"Demo of hui\"\u003e\n\n## Overview\n\n`hui` is command-line tool to quickly search through your terminal history. The motivation behind this tool was having a prettier and faster way to do `history | grep \u003csearch\u003e`. I would do this frequently to remember some `docker` or `curl`\ncommand I had done recently, but couldn't remember the flags I used. This now lets me search through my history and copy the command I want a lot easier.\n\n`hui` is built on top of [ratatui](https://github.com/tui-rs-revival/ratatui) for its TUI, or Terminal User Interface.\n\n## Setup\n\n### Installation\n\nIf you are on a Mac, you can install from `homebrew`:\n\n```bash\nbrew tap jmwoliver/hui\nbrew install hui\n```\n\nAlternatively, you would like to install from source if you have `cargo` installed locally:\n\n```bash\ngit clone https://github.com/jmwoliver/hui.git\ncd hui\ncargo build --release\n# you can then alias the command so it is available in any directory:\n# alias hui=\u003cCURRENT_DIR\u003e/target/release/hui\n```\n\n### Configuration\n\nAfter installing `hui`, it will need to know which shell you are using. This can be done by setting the `HUI_TERM` environment variable.\n\nFor `zsh`, run the following commands:\n\n```bash\necho 'export HUI_TERM=\"zsh\"' \u003e\u003e ~/.zshrc\nsource ~/.zshrc\n```\n\nIf you are using `bash`, run:\n\n```bash\necho 'export HUI_TERM=\"bash\"' \u003e\u003e ~/.bashrc\nsource ~/.bashrc\n```\n\nBash doesn't automatically write the history back to the `.bash_history` file like ZSH does. The following can be added to your `.bashrc` file to append the history for each command (based on a [StackExchange response](https://askubuntu.com/a/261411)):\n```bash\nunset HISTFILESIZE\nHISTSIZE=3000\nPROMPT_COMMAND=\"history -a\"\nexport HISTSIZE PROMPT_COMMAND\n\nshopt -s histappend\n```\n\nThen remember to:\n```bash\nsource ~/.bashrc\n```\n\n## Usage\n\nOnce everything is installed and the `HUI_TERM` environment variable is set, all you have to do to run it is:\n\n```\nhui\n```\n\nNow you can scroll through all your history, filter results, and select a command to copy to your clipboard.\n\nEnjoy!\n\n## Acknowledgements\n\nI used several projects for inspiration or guidance:\n\n- [ratatui](https://github.com/tui-rs-revival/ratatui): Incredible TUI framework and useful examples\n- [hstr-rs](https://github.com/overclockworked64/hstr-rs/tree/master): Helped me better understand how to ingest and parse the `.zsh_history` file\n- [hoard](https://github.com/Hyde46/hoard): Similar concept to `hui` and I liked how they had the searchbar at the bottom\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjmwoliver%2Fhui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjmwoliver%2Fhui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjmwoliver%2Fhui/lists"}