A command-line interface for HackTheBox, built on top of the official HTB API v4.
- View your profile, rank, and stats
- Browse and spawn active/retired machines
- Submit flags for machines and challenges
- Browse challenges by category, view details, download files, start/stop instances
- Interactive menus with keyboard navigation
- Python 3.10+
- A HackTheBox account with an API token
git clone https://github.com/mooder1/htbx.git
cd htbx
pip install -r requirements.txtGet your API token from https://app.hackthebox.com/account-settings under App Tokens.
On first launch, you will be prompted to enter it. The key is stored in ~/.config/htb-cli/config.json with permissions set to 600.
You can also set it via environment variable:
export HTB_API_KEY=your_token_herepython3 main.pyNavigate with arrow keys, confirm with Enter, go back with ESC.
htbx/
├── main.py # entry point and action handlers
├── config.py # API key storage
├── requirements.txt
├── api/
│ ├── client.py # authenticated HTTP session
│ ├── machines.py # machines endpoints
│ ├── challenges.py
│ └── profile.py
└── ui/
├── menus.py # interactive menus
└── tables.py # rich tables and panels
MIT