htb-cli — maintained fork

htb-cli provides terminal access to Hack The Box machines, challenges,
Sherlocks, VPN configuration, profile information, submissions, and related
workflows.
This repository is a maintained fork of
GoToolSharing/htb-cli. It keeps
the original history and GPLv3 license while restoring compatibility with the
current Hack The Box APIs.
Maintained changes
- Uses the current HTB API v5 endpoint for profile activity.
- Displays machine, challenge, Sherlock, and fortress activity with local time
and awarded points.
- Avoids the profile TUI crash caused by the removed v4 activity endpoint.
- Includes the latest changes from the original
dev branch.
Installation
Go 1.20 or newer is required.
go install github.com/PsyGuy007-sys/htb-cli@main
htb-cli version
Precompiled releases will use stable version tags when they are published.
Configuration
Create an application token from your Hack The Box account settings, then
export it as HTB_TOKEN:
export HTB_TOKEN="your-application-token"
Keep the token out of repositories, command history, screenshots, and issue
reports. For persistent use, load it from a user-only file with permissions
0600 instead of committing it to a shell configuration repository.
Usage
htb-cli --help
htb-cli machines
htb-cli info --batch
htb-cli sherlocks
htb-cli vpn
The Activity section in htb-cli info --batch loads the 50 most recent profile
events from the HTB v5 API.
The original documentation remains useful for the command overview, but some
API-specific details predate this maintained fork:
https://htb-cli-documentation.qu35t.pw/.
Contributing
Bug reports and pull requests are welcome. Do not include HTB tokens, VPN
credentials, flags, or private lab material in reports or fixtures.
Credits and license
The original project was created and maintained by QU35T-code and contributors.
This fork is maintained by
PsyGuy007-sys.
Licensed under the GNU General Public License v3.0.