A command-line workflow tool for HackTheBox — manage the full machine lifecycle without leaving the terminal.
Project description
htb-flow
A command-line workflow tool for HackTheBox. Manage the full machine lifecycle from initial setup to completion: spawn machines, run recon, track credentials, submit flags, and archive finished boxes — all without leaving the terminal.
Installation
Requirements: Python 3.11+, nmap
# Recommended (isolated environment)
pipx install htb-flow
# Alternative
pip install htb-flow
Or from source:
git clone https://github.com/TimBoBN/htb-flow
cd htb-flow
pipx install .
Set your API key (stored encrypted in the system keyring):
htb key set
Commands
Workflow
htb init <machine> [ip] # Setup: VPN check, folders, /etc/hosts, notes.md, nmap
htb done <machine> # Finish: submit flags, terminate, cleanup, archive
htb update <machine> [ip] # Update IP in /etc/hosts and notes.md
Recon
htb list # All active machines
htb list --retired # Retired machines
htb list --os Linux --diff Easy # With filters
htb list --search <query> # Search within list
htb search <query> # Search across all machines
htb info <machine> # Machine details + local status
htb status # Currently active machine + time remaining
Profile & Stats
htb profile # Your profile (rank, points, owns)
htb activity [n] # Last n solves (default 20)
htb timeline # Solve history as ASCII chart
htb tracks # Learning paths
htb fortresses # Fortresses
htb todo # Local machines with flag status
Lifecycle
htb spawn <machine> # Start a machine via API, waits for IP
htb reset <machine> # Reset a running machine
htb vpn status # VPN status
htb vpn start # Start VPN
htb vpn stop # Stop VPN
htb vpn switch # Switch VPN profile
Quick actions
htb notes <machine> # Open notes.md in $EDITOR
htb flag <machine> # Submit a flag without running done
htb scan <machine> [ip] # Re-run nmap quick scan
htb scan <machine> [ip] --full # Re-run full port scan (background)
htb creds <machine> # Save found credentials to notes.md
htb shell <machine> # SSH/evil-winrm with creds from notes.md
htb port <machine> <port> <svc> # Add port to notes.md table
htb writeup <machine> # Export clean writeup
htb open <machine> # Open machine page in browser
htb diff <machine> # Git diff of notes.md
Auth
htb key set # Store API key encrypted in system keyring
htb key status # Show where the key is coming from
htb key clear # Remove key from keyring
Shell completion
htb completion bash >> ~/.bashrc # Bash
htb completion zsh >> ~/.zshrc # Zsh
Configuration
Optional config file at ~/.config/htb/config.toml:
htb_base = "~/Data/Cyber/HTB" # Where machine folders are created
ovpn_path = "~/Data/Cyber/HTB.ovpn" # Path to your .ovpn file
editor = "nvim" # Editor for htb notes (fallback: $EDITOR)
API Key
The API key is read in this order:
$HTB_API_KEYenvironment variable (CI/scripts)- System keyring — set with
htb key set ~/.config/htb/api_keyplaintext file (legacy fallback)
Get your API key from HackTheBox → Profile → Settings → API Key.
Machine folder structure
htb init creates the following layout under htb_base:
<machine>/
├── notes.md ← metadata, flags, credentials, write-up notes
├── nmap/
│ ├── quick.txt
│ └── full.txt
├── web/
├── exploits/
├── loot/
└── creds/
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file htb_flow-0.1.6.1.tar.gz.
File metadata
- Download URL: htb_flow-0.1.6.1.tar.gz
- Upload date:
- Size: 29.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4747140afc6b37e4ab64803d414a87c1b4a0fa29eb2a816ce7155d1d113d9cac
|
|
| MD5 |
dc23fd47d9b5e2c5f54ea8fe20878cad
|
|
| BLAKE2b-256 |
989d4353066e9628179410b88c4a12ac59060a4cafb42438541f0494e3d637c3
|
Provenance
The following attestation bundles were made for htb_flow-0.1.6.1.tar.gz:
Publisher:
release.yml on TimBoBN/htb-flow
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
htb_flow-0.1.6.1.tar.gz -
Subject digest:
4747140afc6b37e4ab64803d414a87c1b4a0fa29eb2a816ce7155d1d113d9cac - Sigstore transparency entry: 1684877196
- Sigstore integration time:
-
Permalink:
TimBoBN/htb-flow@3ab857d46f6fb4c07a892b16aefafbb508911732 -
Branch / Tag:
refs/tags/v0.1.6.1 - Owner: https://github.com/TimBoBN
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@3ab857d46f6fb4c07a892b16aefafbb508911732 -
Trigger Event:
push
-
Statement type:
File details
Details for the file htb_flow-0.1.6.1-py3-none-any.whl.
File metadata
- Download URL: htb_flow-0.1.6.1-py3-none-any.whl
- Upload date:
- Size: 40.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6d62795e0a215d1a2cc994d5ca2bdd5a146a9ecb3d70df7127c91492656f8a58
|
|
| MD5 |
77f3cda620bb4e4740b79d375a2a16c1
|
|
| BLAKE2b-256 |
6760cc5dcb8a34bed4684305e587d14a2b9bd64e36b329c4dca89fcca3d23696
|
Provenance
The following attestation bundles were made for htb_flow-0.1.6.1-py3-none-any.whl:
Publisher:
release.yml on TimBoBN/htb-flow
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
htb_flow-0.1.6.1-py3-none-any.whl -
Subject digest:
6d62795e0a215d1a2cc994d5ca2bdd5a146a9ecb3d70df7127c91492656f8a58 - Sigstore transparency entry: 1684877321
- Sigstore integration time:
-
Permalink:
TimBoBN/htb-flow@3ab857d46f6fb4c07a892b16aefafbb508911732 -
Branch / Tag:
refs/tags/v0.1.6.1 - Owner: https://github.com/TimBoBN
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@3ab857d46f6fb4c07a892b16aefafbb508911732 -
Trigger Event:
push
-
Statement type: