{"id":13587009,"url":"https://github.com/orhun/halp","last_synced_at":"2025-04-09T06:13:37.193Z","repository":{"id":128244164,"uuid":"610958533","full_name":"orhun/halp","owner":"orhun","description":"A CLI tool to get help with CLI tools 🐙","archived":false,"fork":false,"pushed_at":"2025-04-01T05:52:17.000Z","size":4727,"stargazers_count":724,"open_issues_count":7,"forks_count":9,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-02T04:08:12.875Z","etag":null,"topics":["cli","cli-command","cli-helper","cli-helpers","cli-tool","cli-tools","command-line","command-line-tool","command-line-tools","command-line-utility","help","helper","helpers","rust","terminal","terminal-helper"],"latest_commit_sha":null,"homepage":"https://halp.cli.rs/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/orhun.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE-APACHE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"orhun","patreon":"orhunp","custom":["https://www.buymeacoffee.com/orhun"]}},"created_at":"2023-03-07T20:30:32.000Z","updated_at":"2025-04-01T05:52:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"c02c6d27-b5bb-4eb5-a050-dd9c41fa8ea4","html_url":"https://github.com/orhun/halp","commit_stats":{"total_commits":445,"total_committers":6,"mean_commits":74.16666666666667,"dds":0.4382022471910112,"last_synced_commit":"0d73787e83a5b27ff521d203691d78f8b2791816"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orhun%2Fhalp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orhun%2Fhalp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orhun%2Fhalp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orhun%2Fhalp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/orhun","download_url":"https://codeload.github.com/orhun/halp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247987285,"owners_count":21028895,"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":["cli","cli-command","cli-helper","cli-helpers","cli-tool","cli-tools","command-line","command-line-tool","command-line-tools","command-line-utility","help","helper","helpers","rust","terminal","terminal-helper"],"created_at":"2024-08-01T15:05:57.783Z","updated_at":"2025-04-09T06:13:37.169Z","avatar_url":"https://github.com/orhun.png","language":"Rust","readme":"\u003cdiv align=\"center\"\u003e\n\n  \u003ca href=\"https://lospec.com/gallery/orhun/octopus\"\u003e\n    \u003cimg src=\"assets/halp-logo.png\" width=\"400\"\u003e\n  \u003c/a\u003e\n\n\u003ch4\u003eA CLI tool to get help with CLI tools 🐙\u003c/h4\u003e\n\n\u003ca href=\"https://github.com/orhun/halp/releases\"\u003e\u003cimg src=\"https://img.shields.io/github/v/release/orhun/halp?style=flat\u0026amp;labelColor=342a5e\u0026amp;color=684d81\u0026amp;logo=GitHub\u0026amp;logoColor=white\" alt=\"GitHub Release\"\u003e\u003c/a\u003e\n\u003ca href=\"https://crates.io/crates/halp/\"\u003e\u003cimg src=\"https://img.shields.io/crates/v/halp?style=flat\u0026amp;labelColor=342a5e\u0026amp;color=684d81\u0026amp;logo=Rust\u0026amp;logoColor=white\" alt=\"Crate Release\"\u003e\u003c/a\u003e\n\u003ca href=\"https://codecov.io/gh/orhun/halp\"\u003e\u003cimg src=\"https://img.shields.io/codecov/c/gh/orhun/halp?style=flat\u0026amp;labelColor=342a5e\u0026amp;color=684d81\u0026amp;logo=Codecov\u0026amp;logoColor=white\" alt=\"Coverage\"\u003e\u003c/a\u003e\n\u003cbr\u003e\n\u003ca href=\"https://github.com/orhun/halp/actions?query=workflow%3A%22Continuous+Integration%22\"\u003e\u003cimg src=\"https://img.shields.io/github/actions/workflow/status/orhun/halp/ci.yml?branch=main\u0026amp;style=flat\u0026amp;labelColor=1c1d42\u0026amp;color=4f396a\u0026amp;logo=GitHub%20Actions\u0026amp;logoColor=white\" alt=\"Continuous Integration\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/orhun/halp/actions?query=workflow%3A%22Continuous+Deployment%22\"\u003e\u003cimg src=\"https://img.shields.io/github/actions/workflow/status/orhun/halp/cd.yml?style=flat\u0026amp;labelColor=1c1d42\u0026amp;color=4f396a\u0026amp;logo=GitHub%20Actions\u0026amp;logoColor=white\u0026amp;label=deploy\" alt=\"Continuous Deployment\"\u003e\u003c/a\u003e\n\u003ca href=\"https://hub.docker.com/r/orhunp/halp\"\u003e\u003cimg src=\"https://img.shields.io/github/actions/workflow/status/orhun/halp/docker.yml?style=flat\u0026amp;labelColor=1c1d42\u0026amp;color=4f396a\u0026amp;label=docker\u0026amp;logo=Docker\u0026amp;logoColor=white\" alt=\"Docker Builds\"\u003e\u003c/a\u003e\n\u003ca href=\"https://docs.rs/halp/\"\u003e\u003cimg src=\"https://img.shields.io/docsrs/halp?style=flat\u0026amp;labelColor=1c1d42\u0026amp;color=4f396a\u0026amp;logo=Rust\u0026amp;logoColor=white\" alt=\"Documentation\"\u003e\u003c/a\u003e\n\n\u003cimg src=\"./assets/halp-demo.gif\" alt=\"halp demo\"\u003e\n\n\u003c/div\u003e\n\n`halp` aims to help find the **correct arguments** for command-line tools by checking the predefined list of commonly used options/flags. Additionally, it provides a prompt for quick access to the **manual page** or **cheat sheet** of the given command.\n\nIf you deal with command-line tools often, it might take some time to figure out how to get help or check the version of a particular command (especially when shell completions are not available). In that case, you might try the most-known flags such as `-h` and `-v` but unfortunately not all the command-line tools follow these conventions (either due to conflicts with other flags or they just use another form). Instead of _brute-forcing_ manually into getting help, you can run `halp \u003ccommand\u003e` and it will check the following arguments for you:\n\n- for **help**: `-h`, `--help`, `help`, `-H`\n- for **version info**: `-v`, `-V`, `--version`, `version`\n\nIf one of these arguments succeeds (with exit code 0), it prints the output and exits. This way, you can get informed about the version and help in one single command. You can also customize this list with a configuration file or provide a list of arguments via command-line arguments.\n\nOn the other hand, if you _really_ need help, you can use the `plz` subcommand which will prompt a selection for:\n\n1. show the **man page** (runs [`man(1)`](https://man7.org/linux/man-pages/man1/man.1.html))\n2. show the **cheat sheet** (via [`cheat.sh`](http://cheat.sh))\n\n\u003cdetails\u003e\n  \u003csummary\u003eTable of Contents\u003c/summary\u003e\n\n\u003c!-- vim-markdown-toc GFM --\u003e\n\n- [Example](#example)\n- [Installation](#installation)\n  - [Cargo](#cargo)\n  - [Arch Linux](#arch-linux)\n  - [Docker](#docker)\n    - [Images](#images)\n    - [Usage](#usage)\n    - [Building](#building)\n  - [Binary releases](#binary-releases)\n  - [Build from source](#build-from-source)\n- [Usage](#usage-1)\n  - [`plz`](#plz)\n- [Examples](#examples)\n  - [Check `help` and `version` (default)](#check-help-and-version-default)\n  - [Check a custom argument](#check-a-custom-argument)\n  - [Disable defaults](#disable-defaults)\n  - [Verbose logging](#verbose-logging)\n  - [Get additional help (via `plz`)](#get-additional-help-via-plz)\n    - [Custom pager](#custom-pager)\n    - [Custom cheat.sh host URL](#custom-cheatsh-host-url)\n- [Configuration](#configuration)\n- [Funding](#funding)\n- [Contributing](#contributing)\n- [License](#license)\n- [Copyright](#copyright)\n\n\u003c!-- vim-markdown-toc --\u003e\n\n\u003c/details\u003e\n\n### Example\n\nHave you ever experienced this:\n\n```sh\n$ cli_tool -v\nunknown flag -v\n```\n\n```sh\n$ cli_tool -V\nunknown flag -V\n```\n\n```sh\n$ cli_tool -h\nunknown flag -h\n```\n\n```sh\n$ asdjw1jwhdajh1idojad # frustration\nbash: asdjw1jwhdajh1idojad: command not found\n```\n\n```sh\n$ cli_tool --help # f*cking finally!\nSome CLI Tool Version 1.42.69\nUsage:\n  cli_tool \u003cflags\u003e \u003cargs\u003e [--parameter1 value1 --parameter2 value2 ...]\n```\n\nWhereas with `halp`:\n\n```\n$ halp cli_tool\n\n(°ロ°)  checking 'cli_tool -v'\n(×﹏×)      fail '-v' argument not found.\n(°ロ°)  checking 'cli_tool -V'\n(×﹏×)      fail '-V' argument not found.\n(°ロ°)  checking 'cli_tool -h'\n(×﹏×)      fail '-h' argument not found.\n(°ロ°)  checking 'cli_tool --help'\n\\(^ヮ^)/ success '--help' argument found!\n\nSome CLI Tool Version 1.42.69\nUsage:\n  cli_tool \u003cflags\u003e \u003cargs\u003e [--parameter1 value1 --parameter2 value2 ...]\n```\n\n## Installation\n\n\u003cdetails\u003e\n  \u003csummary\u003ePackaging status\u003c/summary\u003e\n\n[![Packaging status](https://repology.org/badge/vertical-allrepos/halp.svg)](https://repology.org/project/halp/versions)\n\n\u003c/details\u003e\n\n### Cargo\n\n`halp` can be installed from [crates.io](https://crates.io/crates/halp):\n\n```sh\ncargo install halp\n```\n\nThe minimum supported Rust version is `1.74.1`.\n\n### Arch Linux\n\n`halp` can be installed from the [community repository](https://archlinux.org/packages/community/x86_64/halp/) using [pacman](https://wiki.archlinux.org/title/Pacman):\n\n```sh\npacman -S halp\n```\n\nOr you can install the available [AUR packages](https://aur.archlinux.org/packages/?O=0\u0026SeB=b\u0026K=halp\u0026outdated=\u0026SB=n\u0026SO=a\u0026PP=50\u0026do_Search=Go) using an [AUR helper](https://wiki.archlinux.org/index.php/AUR_helpers). For example,\n\n```sh\nparu -S halp-git\n```\n\nAlternatively, you can clone the AUR package and then build it with [makepkg](https://wiki.archlinux.org/index.php/Makepkg). For example,\n\n```sh\ngit clone https://aur.archlinux.org/halp-git.git \u0026\u0026 cd halp-git \u0026\u0026 makepkg -si\n```\n\n### Docker\n\n#### Images\n\nDocker builds are [automated](./.github/workflows/docker.yml) and images are available in the following registries:\n\n- [Docker Hub](https://hub.docker.com/r/orhunp/halp)\n- [GitHub Container Registry](https://github.com/orhun/halp/pkgs/container/halp)\n\n#### Usage\n\nThe following commands can be used to get help for a binary inside the container:\n\n```sh\ndocker run --rm -it \"orhunp/halp:${TAG:-latest}\" whoami\ndocker run --rm -it \"orhunp/halp:${TAG:-latest}\" plz whoami\n```\n\nOr you can provide a custom binary as follows (please note that you might get shared library errors):\n\n```sh\ndocker run -v \"bin:/app/bin:rw\" --rm -it \"orhunp/halp:${TAG:-latest}\" -v ./bin\n```\n\n#### Building\n\nCustom Docker images can be built from the [Dockerfile](./Dockerfile):\n\n```sh\ndocker build -t halp .\n```\n\n### Binary releases\n\nSee the available binaries for different targets from the [releases page](https://github.com/orhun/halp/releases). They are automated via [Continuous Deployment](.github/workflows/cd.yml) workflow\n\nRelease tarballs are signed with the following PGP key: [0xFB41AE0358378256](https://keyserver.ubuntu.com/pks/lookup?search=0xFB41AE0358378256\u0026op=vindex)\n\n### Build from source\n\n1. Clone the repository.\n\n```sh\ngit clone https://github.com/orhun/halp \u0026\u0026 cd halp/\n```\n\n2. Build.\n\n```sh\nCARGO_TARGET_DIR=target cargo build --release\n```\n\nBinary will be located at `target/release/halp`.\n\n## Usage\n\n```\nhalp [OPTIONS] \u003cCMD\u003e\n```\n\n```\nOptions:\n      --check \u003cARG\u003e    Sets the argument to check\n      --no-version     Disable checking the version information\n      --no-help        Disable checking the help information\n  -c, --config \u003cPATH\u003e  Sets the configuration file [env: HALP_CONFIG=]\n  -t, --timeout \u003cS\u003e    Sets the timeout for the command [default: 5]\n  -v, --verbose        Enables verbose logging\n  -h, --help           Print help\n  -V, --version        Print version\n```\n\n### `plz`\n\n```\nhalp [OPTIONS] plz \u003cCMD\u003e\n```\n\n```\nOptions:\n  -m, --man-cmd \u003cMAN_CMD\u003e   Sets the manual page command to run\n      --cheat-sh-url \u003cURL\u003e  Use a custom URL for cheat.sh [env: CHEAT_SH_URL=]\n  -p, --pager \u003cPAGER\u003e       Sets the pager to use\n      --no-pager            Disables the pager\n  -h, --help                Print help\n```\n\n## Examples\n\n#### Check `help` and `version` (default)\n\n```sh\nhalp whoami\n```\n\n![halp example I](./assets/halp-example1.gif)\n\n#### Check a custom argument\n\n```sh\nhalp --check \"\\--silent\" zps\n```\n\n(You can escape `-` with using `\\-`.)\n\nYou can also provide multiple arguments as follows:\n\n```sh\nhalp --check \"help\" --check \"test\" menyoki\n```\n\n#### Disable defaults\n\n```sh\nhalp --no-version sha512sum\n```\n\n```sh\nhalp --no-help sha512sum\n```\n\n#### Verbose logging\n\n```sh\nhalp --verbose git-cliff\n```\n\nThis will result in `stderr`/`stdout` being printed if there was an error. For example:\n\n```sh\n(°ロ°)  checking 'git-cliff -v'\n(×﹏×)      fail '-v' argument not found.\n(o_O)      debug\nstdout:\n WARN  git_cliff \u003e \"cliff.toml\" is not found, using the default configuration.\n ERROR git_cliff \u003e Git error: `could not find repository from '.'; class=Repository (6); code=NotFound (-3)`\n```\n\n#### Get additional help (via `plz`)\n\n```sh\nhalp plz vim\n```\n\n![halp example II](./assets/halp-example2.gif)\n\n##### Custom pager\n\n```sh\nhalp plz --pager bat vim\n```\n\nTo disable the pager:\n\n```sh\nhalp plz --no-pager bat vim\n```\n\n##### Custom cheat.sh host URL\n\n```sh\nhalp plz --cheat-sh-url https://cht.sh vim\n```\n\n## Configuration\n\n`halp` can be configured with a configuration file that uses the [TOML](https://en.wikipedia.org/wiki/TOML) format. It can be specified via `--config` or `HALP_CONFIG` environment variable. It can also be placed in one of the following global locations:\n\n- `\u003cconfig_dir\u003e` `/` `halp.toml`\n- `\u003cconfig_dir\u003e` `/` `halp/halp.toml`\n- `\u003cconfig_dir\u003e` `/` `halp/config`\n\n`\u003cconfig_dir\u003e` depends on the platform as shown in the following table:\n\n| Platform | Value                                 | Example                                  |\n| -------- | ------------------------------------- | ---------------------------------------- |\n| Linux    | `$XDG_CONFIG_HOME` or `$HOME`/.config | /home/orhun/.config                      |\n| macOS    | `$HOME`/Library/Application Support   | /Users/Orhun/Library/Application Support |\n| Windows  | `{FOLDERID_RoamingAppData}`           | C:\\Users\\Orhun\\AppData\\Roaming           |\n\nSee [halp.toml](config/halp.toml) for the default configuration values.\n\n## Funding\n\nIf you find `halp` and/or other projects on my [GitHub profile](https://github.com/orhun/) useful, consider supporting me on [GitHub Sponsors](https://github.com/sponsors/orhun) or [becoming a patron](https://www.patreon.com/join/orhunp)!\n\n[![Support me on GitHub Sponsors](https://img.shields.io/github/sponsors/orhun?style=flat\u0026logo=GitHub\u0026labelColor=342a5e\u0026color=684d81\u0026logoColor=white)](https://github.com/sponsors/orhun)\n[![Support me on Patreon](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fshieldsio-patreon.vercel.app%2Fapi%3Fusername%3Dorhunp%26type%3Dpatrons\u0026style=flat\u0026logo=Patreon\u0026labelColor=342a5e\u0026color=684d81\u0026logoColor=white)](https://patreon.com/join/orhunp)\n[![Support me on Patreon](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fshieldsio-patreon.vercel.app%2Fapi%3Fusername%3Dorhunp%26type%3Dpledges\u0026style=flat\u0026logo=Patreon\u0026labelColor=342a5e\u0026color=684d81\u0026logoColor=white\u0026label=)](https://patreon.com/join/orhunp)\n\n## Contributing\n\nSee our [Contribution Guide](./CONTRIBUTING.md) and please follow the [Code of Conduct](./CODE_OF_CONDUCT.md) in all your interactions with the project.\n\n## License\n\nLicensed under either of [Apache License Version 2.0](./LICENSE-APACHE) or [The MIT License](./LICENSE-MIT) at your option.\n\n🦀 ノ( º \\_ º ノ) - respect crables!\n\n## Copyright\n\nCopyright © 2023-2024, [Orhun Parmaksız](mailto:orhunparmaksiz@gmail.com)\n","funding_links":["https://github.com/sponsors/orhun","https://patreon.com/orhunp","https://www.buymeacoffee.com/orhun","https://www.patreon.com/join/orhunp)!","https://patreon.com/join/orhunp"],"categories":["Rust","cli","\u003ca name=\"cheatsheet\"\u003e\u003c/a\u003eCommands cheatsheet and snippets"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forhun%2Fhalp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Forhun%2Fhalp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forhun%2Fhalp/lists"}