{"id":13564754,"url":"https://github.com/strang1ato/nhi","last_synced_at":"2025-04-06T18:17:11.523Z","repository":{"id":57636258,"uuid":"361875040","full_name":"strang1ato/nhi","owner":"strang1ato","description":":tv: Automatically capture all potentially useful information about each executed command (as well as its output) and get powerful querying mechanism","archived":false,"fork":false,"pushed_at":"2024-09-22T00:06:45.000Z","size":4657,"stargazers_count":310,"open_issues_count":19,"forks_count":11,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-03-27T22:09:51.284Z","etag":null,"topics":["bash","bpf","c","ebpf","go","golang","kernel","linux","shell","tracing","zsh"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/strang1ato.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}},"created_at":"2021-04-26T19:48:14.000Z","updated_at":"2025-03-11T04:30:14.000Z","dependencies_parsed_at":"2024-01-14T03:49:17.080Z","dependency_job_id":"1eed871a-4c1a-4e0d-ac0c-64eb29aacc6d","html_url":"https://github.com/strang1ato/nhi","commit_stats":{"total_commits":288,"total_committers":1,"mean_commits":288.0,"dds":0.0,"last_synced_commit":"5338f6f4657a394cf4d3ca68868cd62c1cc638e0"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/strang1ato%2Fnhi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/strang1ato%2Fnhi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/strang1ato%2Fnhi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/strang1ato%2Fnhi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/strang1ato","download_url":"https://codeload.github.com/strang1ato/nhi/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247526768,"owners_count":20953143,"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","bpf","c","ebpf","go","golang","kernel","linux","shell","tracing","zsh"],"created_at":"2024-08-01T13:01:35.436Z","updated_at":"2025-04-06T18:17:11.483Z","avatar_url":"https://github.com/strang1ato.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"\u003cimg src=\"doc/nhi-logo-200x200.png\" align=\"left\"\u003e\n\n![workflow](https://github.com/strang1ato/nhi/actions/workflows/ci.yml/badge.svg)\n[![Gitter chat](https://badges.gitter.im/gitterHQ/gitter.png)](https://gitter.im/nhi-project/community)\n[![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?url=https://github.com/strang1ato/nhi)\n\n`nhi` is a revolutionary tool which automatically captures all potentially useful information\nabout each executed command and everything around, and delivers powerful querying mechanism.\n\n`nhi` keeps records of:\n- command\n- output of command\n- exit status of command\n- working directory at the end of command execution\n- start time of command\n- finish time of command\n- shell prompt at the time of command execution\n- (and much more in the future :smile:)\n\n`nhi` also keeps records of information about shell session in general.\n\nThese features allow retrievement of commands executed in past and whole shell sessions,\nas well as all other useful information in a convenient way.\n\n`nhi` daemon is based on [eBPF](https://ebpf.io/) - a technology built into `linux kernel`.\nUsage of `eBPF` guarantee a great performance and low overhead of the tool, because tracing is being **safely** done inside `kernel`.\n\n`nhi` **does not** affect behaviour of any program/process (and OS in general).\n\nWatch [the introductory video](https://www.youtube.com/watch?v=i7F3fJdYXSs) to see how `nhi` works in practice.\n\n## Usage\nFor the full documentation, read [the nhi(1) man page](https://htmlpreview.github.io/?https://github.com/strang1ato/nhi/blob/main/doc/nhi.1.html).\n\nFor quick reference, use `nhi` `--help` flags.\n\n## Requirements\n`bash` or `zsh`, `x86_64` architecture, `systemd` and `linux kernel` 5.8+.\nSome major distributions that ship with the `linux kernel` 5.8+:\n- Debian 11\n- Ubuntu 20.10+\n- Fedora 33+\n\n`xterm` based terminals are highly recommended. (If you don't know whether your terminal emulator is `xterm` based or not, it most likely is `xterm` based. `xterm` is a standard for terminal emulators.)\n\n## Installation\n\n### Ubuntu 21.10+\n**Step 1**:\nUbuntu has oddly compiled `bash` and `zsh` binaries which are missing some data required by `nhi`. To install shells that are compiled \"normally\", like on every other distro run:\n\n    sudo apt-get remove zsh-common\n    sudo add-apt-repository ppa:strang1ato/default-bash-and-zsh\n    sudo apt-get update\n    sudo apt-get install --reinstall bash\n\nand if you were using `zsh`:\n\n    sudo apt-get install zsh\n\nFrom now `bash` and `zsh` will be upgraded/installed only from the newly added repository.\n\n**Step 2**: Run:\n\n    sudo add-apt-repository ppa:strang1ato/nhi\n    sudo apt-get update\n    sudo apt-get install nhi\n\n**Step 3**: Add to the end of your `.bashrc`:\n\n    source /etc/nhi/nhi.bash\n\nAnd if you use `zsh` add to the end of your `.zshrc`:\n\n    source /etc/nhi/nhi.zsh\n\n**Step 4**: Restart your computer.\n\n### Other distributions\n**Step 1**: Install `objdump`, `awk`, `sqlite3`, `libsqlite3-dev` and `libbpf-dev` (example for linux debian systems):\n\n    sudo apt-get install binutils gawk sqlite3 libsqlite3-dev libbpf-dev\n\n**Step 2**: Download all seven files from the latest [release](https://github.com/strang1ato/nhi/releases), and put them in a new empty directory.\n\n**Step 3**: Go to the new directory and run:\n\n    sudo -E bash ./install\n\n**Step 4**: Restart your computer.\n\n### Testing\nIn order to check if you installed `nhi` succesfully open new terminal window and execute for example:\n\n    echo nhi test\n\nand\n\n    nhi fetch {-1}\n\nIf you see \"nhi test\" once again, it means that `nhi` is properly installed.\n\n## Contributions\nContributions are welcome! Any tips and suggestions are appreciated. If you found any bug feel free to submit a new [issue](https://github.com/strang1ato/nhi/issues).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstrang1ato%2Fnhi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstrang1ato%2Fnhi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstrang1ato%2Fnhi/lists"}