Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
H

halp

> 开发工具
Open source

A CLI tool to get help with CLI tools

764 stars0 likes1 views
WebsiteGitHub

About

A CLI tool to get help with CLI tools

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.

If 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 and it will check the following arguments for you:

  • for help: --help, -h, help, -H
  • for version info: --version, -v, version, -V

If 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.

On the other hand, if you really need help, you can use the plz subcommand which will prompt a selection for:

  1. show the man page (runs man(1))
  2. show the cheat sheet (via cheat.sh)

Table of Contents

  • Example
  • Installation
    • Cargo
    • Arch Linux
    • Docker
      • Images
      • Usage
      • Building
    • Binary releases
    • Build from source
  • Usage
    • plz
  • Examples
    • Check help and version (default)
    • Check a custom argument
    • Disable defaults
    • Verbose logging
    • Get additional help (via plz)
      • Custom pager
      • Custom cheat.sh host URL
  • Configuration
  • Funding
  • Contributing
  • License
  • Copyright

Example

Have you ever experienced this:

bash
$ cli_tool -v
unknown flag -v
bash
$ cli_tool -V
unknown flag -V
bash
$ cli_tool -h
unknown flag -h
bash
$ asdjw1jwhdajh1idojad # frustration
bash: asdjw1jwhdajh1idojad: command not found
bash
$ cli_tool --help # f*cking finally!
Some CLI Tool Version 1.42.69
Usage:
  cli_tool   [--parameter1 value1 --parameter2 value2 ...]

Whereas with halp:

$ halp cli_tool

(°ロ°)  checking 'cli_tool -v'
(×﹏×)      fail '-v' argument not found.
(°ロ°)  checking 'cli_tool -V'
(×﹏×)      fail '-V' argument not found.
(°ロ°)  checking 'cli_tool -h'
(×﹏×)      fail '-h' argument not found.
(°ロ°)  checking 'cli_tool --help'
\(^ヮ^)/ success '--help' argument found!

Some CLI Tool Version 1.42.69
Usage:
  cli_tool   [--parameter1 value1 --parameter2 value2 ...]

Installation

Packaging status

Cargo

halp can be installed from crates.io:

bash
cargo install halp

The minimum supported Rust version is 1.74.1.

Arch Linux

halp can be installed from the extra repository using pacman:

bash
pacman -S halp

Or you can install the available AUR packages using an AUR helper. For example,

bash
paru -S halp-git

Alternatively, you can clone the AUR package and then build it with makepkg. For example,

bash
git clone https://aur.archlinux.org/halp-git.git && cd halp-git && makepkg -si

Docker

Images

Docker builds are automated and images are available in the following registries:

  • Docker Hub
  • GitHub Container Registry

Usage

The following commands can be used to get help for a binary inside the container:

bash
docker run --rm -it "orhunp/halp:${TAG:-latest}" whoami
docker run --rm -it "orhunp/halp:${TAG:-latest}" plz whoami

Or you can provide a custom binary as follows (please note that you might get shared library errors):

bash
docker run -v "bin:/app/bin:rw" --rm -it "orhunp/halp:${TAG:-latest}" -v ./bin

Building

Custom Docker images can be built from the Dockerfile:

bash
docker build -t halp .

Binary releases

See the available binaries for different targets from the releases page. They are automated via Continuous Deployment workflow

Release tarballs are signed with the following PGP key: 0xFB41AE0358378256

Build from source

  1. Clone the repository.
bash
git clone https://github.com/orhun/halp && cd halp/
  1. Build.
bash
CARGO_TARGET_DIR=target cargo build --release

Binary will be located at target/release/halp.

Usage

halp [OPTIONS] 
Options:
      --check     Sets the argument to check
      --no-version     Disable checking the version information
      --no-help        Disable checking the help information
  -c, --config   Sets the configuration file [env: HALP_CONFIG=]
  -t, --timeout     Sets the timeout for the command [default: 5]
  -v, --verbose        Enables verbose logging
  -h, --help           Print help
  -V, --version        Print version

plz

halp [OPTIONS] plz 
Options:
  -m, --man-cmd    Sets the manual page command to run
      --cheat-sh-url   Use a custom URL for cheat.sh [env: CHEAT_SH_URL=]
  -p, --pager        Sets the pager to use
      --no-pager            Disables the pager
      --insecure            Disables TLS certificate verification for HTTP requests
  -h, --help                Print help

Examples

Check help and version (default)

bash
halp whoami

Check a custom argument

bash
halp --check "\--silent" zps

(You can escape - with using \-.)

You can also provide multiple arguments as follows:

bash
halp --check "help" --check "test" menyoki

Disable defaults

bash
halp --no-version sha512sum
bash
halp --no-help sha512sum

Verbose logging

bash
halp --verbose git-cliff

This will result in stderr/stdout being printed if there was an error. For example:

bash
(°ロ°)  checking 'git-cliff -v'
(×﹏×)      fail '-v' argument not found.
(o_O)      debug
stdout:
 WARN  git_cliff > "cliff.toml" is not found, using the default configuration.
 ERROR git_cliff > Git error: `could not find repository from '.'; class=Repository (6); code=NotFound (-3)`

Get additional help (via plz)

bash
halp plz vim
Custom pager
bash
halp plz --pager bat vim

To disable the pager:

bash
halp plz --no-pager bat vim
Custom cheat.sh host URL
bash
halp plz --cheat-sh-url https://cht.sh vim
Skipping TLS certificate verification

Behind a TLS-inspecting proxy the providers are reached through a certificate that is not in the system trust store, which fails with invalid peer certificate: UnknownIssuer. To skip verification:

bash
halp plz --insecure vim

This disables certificate checking for the request, so only use it on networks you trust.

Configuration

halp can be configured with a configuration file that uses the 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:

  • `` / halp.toml
  • `` / halp/halp.toml
  • `` / halp/config

`` depends on the platform as shown in the following table:

Platform Value Example
Linux $XDG_CONFIG_HOME or $HOME/.config /home/orhun/.config
macOS $HOME/Library/Application Support /Users/Orhun/Library/Application Support
Windows {FOLDERID_RoamingAppData} C:\Users\Orhun\AppData\Roaming

See halp.toml for the default configuration values.

Funding

If you find halp and/or other projects on my GitHub profile useful, consider supporting me on GitHub Sponsors or becoming a patron!

Contributing

See our Contribution Guide and please follow the Code of Conduct in all your interactions with the project.

License

Licensed under either of Apache License Version 2.0 or The MIT License at your option.

ノ( º _ º ノ) - respect crables!

Copyright

Copyright © 2023-2024, Orhun Parmaksız

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Rustclicli-commandcli-helpercli-helpers

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category开发工具
PricingOpen source

> Related tools

V
VS Code
流行的开源代码编辑器
G
Git
分布式版本控制系统
V
Vite
下一代前端构建工具