π A lightweight, zero-dependency Python CLI for managing passwords, notes, and progress while playing OverTheWire wargames.
- π Save and retrieve passwords by level
- π Open Markdown notes per level
- π Organized by game (
bandit,natas,leviathan, etc.) - π Track your progress across all games with
otw status - π Secure SSH launch with automatic clipboard copy (using
fip) - βοΈ Git push your notes and password progress (optional)
- π§ Configurable vault location with zero dependencies
git clone https://github.com/Blakemagne/otw-cli.git
cd otw-cli
pip install -e .Then configure your vault path:
otw config ~/Documents/otw-wargame-passwords~/Documents/otw-wargame-passwords/
βββ bandit/
β βββ level0.txt
β βββ level0.md
β βββ ...
βββ narnia/
β βββ level1.txt
βββ ...
otw save <wargame> <level> <password>otw pw <wargame> <level> otw note <wargame> <level> otw ls <wargame>otw status # Shows highest level reached for each gameotw ssh <wargame> <level> # Auto-copies password to clipboard via fipotw push <wargame>If you're just getting started with Bandit Level 0, and haven't created your password vault yet, follow this workflow:
You can either:
-
Clone a private Git repo to store your passwords and notes:
git clone git@github.com:yourusername/otw-wargame-passwords.git
-
Or create a local directory manually:
mkdir -p ~/Documents/otw-wargame-passwords cd ~/Documents/otw-wargame-passwords git init
π§ Tip: Keep this repo private β it will contain your OverTheWire passwords.
Tell otw where your vault is:
otw config ~/Documents/otw-wargame-passwordsThis creates a config file at:
~/.config/otw/config
With:
base_dir=/home/youruser/Documents/otw-wargame-passwords
Now you're ready to use the CLI:
otw save bandit 0 ZjLjTmM6FvvyRnrb2rfNWOZOTa6ip5If
otw note bandit 0These commands will:
- Automatically create the
bandit/folder (if needed) - Save your password as
level0.txt - Create an editable Markdown file for your notes:
level0.md
If your vault is a Git repo:
otw push banditThis runs:
git add .git commit -m "Progress update ..."git push origin main
So your notes and passwords stay synced.
If you try to use the tool before configuring:
otw save <wargame> <level> <password>Youβll get:
β Config file not found. Run: otw config <path-to-vault>
No crash. Just guidance.
All OverTheWire wargames are supported! SSH ports are pre-configured for each game.
| Game | Port | Status |
|---|---|---|
bandit |
2220 | β Fully supported |
leviathan |
2223 | β Fully supported |
narnia |
2226 | β Fully supported |
behemoth |
2221 | β Fully supported |
utumno |
2227 | β Fully supported |
maze |
2225 | β Fully supported |
manpage |
2224 | β Fully supported |
formulaone |
2232 | β Fully supported |
vortex |
2228 | β Fully supported |
drifter |
2230 | β Fully supported |
krypton |
2231 | β Fully supported |
| Game | Access Method | Status |
|---|---|---|
natas |
Web browser | β Password/note storage only |
Note: For
natas, useotw saveandotw pwto manage passwords, but SSH is not available.
- Python 3.7+
- OpenSSH client (
ssh) git(for version control)fip(for clipboard support) - automatically installed during setup!
π‘
fipwill be installed automatically when you runpip install -e .
Manual install:curl -fsSL https://raw.githubusercontent.com/Blakemagne/fip/main/install.sh | sh
If you want to run otw from anywhere without activating your virtual environment every time, you can create a symlink:
If you used a virtual environment like this:
python3 -m venv venv
source venv/bin/activate
pip install -e .Then your CLI will be located at:
venv/bin/otw
ln -s ~/path/to/your/otw-cli/venv/bin/otw ~/.local/bin/otwReplace ~/path/to/your/otw-cli/ with your actual path.
Check with:
echo $PATH | tr ':' '\n' | grep .local/binIf not, add this to your ~/.bashrc, ~/.zshrc, or ~/.profile:
export PATH="$HOME/.local/bin:$PATH"Then reload:
source ~/.bashrc # or ~/.zshrcNow you can run:
otw --helpFrom anywhere, even without activating the virtualenv.
This works because the symlink points directly to the CLI binary inside the virtual environment.
Blakemagne
stonks god