Skip to main content

htbConsole

Terminal UI for Hack The Box platform and CTF competitions.

Built with Textual (Python TUI framework).

Inspired by HTBtui.

Screenshots

HTB Platform

HTB Platform

CTF Platform

CTF Platform

Features

HTB Platform (tuiHTB)

  • Challenges — browse, filter by category/difficulty, infinite scroll pagination, start/stop containers, submit flags, download & auto-extract task files, community writeups (lazy loaded), per-challenge notes
  • Machines — current, retired, seasonal lists with infinite scroll, machine details with start/stop/reset/submit, VPN status, per-machine notes
  • Sherlocks — DFIR/SOC investigation tasks, filter by category/difficulty/state, split task view with description/hints/answer submission, incident file downloads
  • Player Profile — stats, rank progress, activity feed with incremental loading, active machine & VPN status
  • Settings — API cache toggle, Burp proxy toggle, workdir path, zip password, custom unpack command, terminal emulator config

CTF Platform (tuiCTF)

  • CTF List — ongoing (with join/play status), upcoming, past (lazy loaded with pagination)
  • CTF Context — general info, categorized challenge browser with detail panel, notes per task, file downloads with auto-extract, ranking board, live scoreboard
  • Workspace Management — auto-create directory trees per CTF ({workdir}/CTF_{date}__{id}/{category}/{taskid}__{name})

Install

# From PyPI (once published)
pip install htbconsole

# From source
git clone https://github.com/k3idii/htbConsole
cd htbConsole
pip install .

Development (editable, run in place)

python -m venv .venv
source .venv/bin/activate
pip install -e .       # or: pip install -r requirements.txt

Configuration

Export your API tokens before launching:

export HTB_TOKEN="your-htb-api-token"
export CTF_TOKEN="your-ctf-api-token"

Get your HTB token from: https://app.hackthebox.com/account-settings (App Token)

Get your CTF token from: https://ctf.hackthebox.com (inspect requests after login)

Optional environment variables:

Variable Default Description
HTB_TOKEN HackTheBox platform API token
CTF_TOKEN CTF platform API token
HTB_WORKDIR ./work Directory for downloads, notes, and task files
USE_BURP Proxy address for Burp (e.g. http://127.0.0.1:8080)
HTB_SETTINGS Explicit path to the settings YAML file

Settings file resolution order: HTB_SETTINGS./htbSettings.yaml if it already exists (back-compat) → $XDG_CONFIG_HOME/htbconsole/htbSettings.yaml (default ~/.config/htbconsole/htbSettings.yaml).

Usage

# Installed console commands
htbconsole            # prompts: [h]tb or [c]tf ?
htbconsole htb        # launch HTB platform TUI
htbconsole ctf        # launch CTF platform TUI
tui-htb               # launch HTB platform TUI directly
tui-ctf               # launch CTF platform TUI directly

# Standalone (no install needed, from repo root)
python -m htbconsole [htb|ctf]
python htbConsole.py [htb|ctf]

CLI (one-shot, no TUI)

Query the same API headless and print JSON (default) or YAML. Uses the same tokens and settings as the TUI.

# read
htbconsole cli htb machine profile Fries
htbconsole cli htb machine active --pick info.ip
htbconsole cli htb chal list per_page=50 state=retired difficulty[]=easy --yaml   # filtered list
htbconsole cli htb user --pick info.name

# submit a flag
htbconsole cli htb chal submit 123 'HTB{...}'
htbconsole cli htb machine submit 808 'HTB{...}'
htbconsole cli htb sherlock submit 42 3 'my-answer'        # <sherlock-id> <task-id> <answer>

# CTF (per-CTF context: cli ctf <ctf-id> ...)
htbconsole cli ctf list                              # all your CTFs
htbconsole cli ctf 1434 info
htbconsole cli ctf 1434 list categories
htbconsole cli ctf 1434 list tasks category=Web solved=false
htbconsole cli ctf 1434 task 9876
htbconsole cli ctf 1434 submit 9876 'HTB{...}'

# raw POST escape hatch (any endpoint)
htbconsole cli htb post /api/v4/challenge/own challenge_id=123 flag='HTB{...}'
htbconsole cli ctf post /api/flags --data '{"challenge_id":9876,"flag":"HTB{...}"}'
  • Resources — HTB: chal {list|info <id>|categories|writeup <id>|submit <id> <flag>}, sherlock {list|info <id>|tasks <id>|submit <id> <task> <ans>}, machine {list|retired|active|profile <name>|info <name>|submit <id> <flag>}, season list, profile <uid>, user. CTF: list, past, and per-CTF <id> {info|scores|list categories|list tasks|task <id>|submit <task> <flag>}.
  • Filtering — HTB list filters are server-side query params (state=, difficulty[]=, category[]=, per_page=, page=). CTF list tasks filters client-side by category=<name> and solved=true|false.
  • --pick a.b.0.c drills into the result; --yaml for YAML; --data '{...}' merges into a POST body; --debug logs API calls to stderr. Run htbconsole cli for the full list.
  • CTF flag endpoint — the CTF submit path isn't documented in the API references used here; ctf … submit posts to /api/flags as a best effort. If your CTF uses a different route, use cli ctf post <endpoint> … (or --data).

Keybindings

Key Action
q Quit
l Toggle log console
[ / ] Previous / next tab
f Filter (challenges, sherlocks)
Escape Focus list / go back
Ctrl+S Save notes

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

htbconsole-0.2.2.tar.gz (53.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

htbconsole-0.2.2-py3-none-any.whl (62.0 kB view details)

Uploaded Python 3

File details

Details for the file htbconsole-0.2.2.tar.gz.

File metadata

  • Download URL: htbconsole-0.2.2.tar.gz
  • Upload date:
  • Size: 53.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for htbconsole-0.2.2.tar.gz
Algorithm Hash digest
SHA256 08e45441d7e8a22de08fb151ba4955ecef43da0c433f93fb03aeefd4392801f8
MD5 0393f85e742625bd796143bab754e23c
BLAKE2b-256 727b28422d763c5ba0a32aeceebbf98e0252b5230a25a9ebdc65a1d0535b205f

See more details on using hashes here.

Provenance

The following attestation bundles were made for htbconsole-0.2.2.tar.gz:

Publisher: publish.yml on k3idii/htbConsole

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file htbconsole-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: htbconsole-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 62.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for htbconsole-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b2ff4678506541db2e5bc4e9a5f7d81bafe8d176741318505882bc99d585a888
MD5 cf52c823a1cce343f139df4f24c2486a
BLAKE2b-256 1f5ebd9b13a66ad9c33dd1a6d0c32eb666a0c07f065c4cf76b431771fd82322a

See more details on using hashes here.

Provenance

The following attestation bundles were made for htbconsole-0.2.2-py3-none-any.whl:

Publisher: publish.yml on k3idii/htbConsole

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page