A terminal GUI for managing Warden Docker environments
Project description
WardenGUI
A terminal-based GUI for managing Warden Docker development environments.
Features
- ๐ณ Interactive Menu - Navigate and manage multiple Warden environments with visual selection
- ๐ Environment Switching - Automatically stop current and start new environments with one command
- ๐ Docker Stats - View disk usage for images and volumes
- ๐ SSH Access - Quick shell access to running containers (GUI and headless mode)
- ๐ Log Streaming - Follow container logs in real-time with customizable tail options
- ๐ Hosts File Check - Windows hosts file validation
- โจ๏ธ Terminal Commands - Run warden commands directly from the GUI
- ๐ Headless Mode - Run commands via CLI without interactive GUI (start, info, ssh, log)
- ๐จ Modern UI - Clean, business-like terminal interface with clickable URLs
Installation
Quick Install (One-liner)
From PyPI (recommended):
curl -sSL https://raw.githubusercontent.com/Genaker/WardenGUI/main/install.sh | bash
From GitHub (latest dev version):
curl -sSL https://raw.githubusercontent.com/Genaker/WardenGUI/main/install-git.sh | bash
The Git installer:
- Clones repository to
~/.wardengui - Creates launcher scripts in
~/.local/bin - Easy to update with
cd ~/.wardengui && git pull
From PyPI
pip install wardengui
From Source
git clone https://github.com/Genaker/WardenGUI.git
cd WardenGUI
pip install -e .
Upgrade to Latest Version
pip install --upgrade wardengui
Or force reinstall:
pip install --upgrade --force-reinstall wardengui
Check Installed Version
pip show wardengui
WSL / Linux Installation
โ ๏ธ Note: WardenGUI uses only Python standard library - no external dependencies! Using
--break-system-packagesis completely safe as it won't affect any system packages.
Option 1: Direct install (recommended)
pip3 install --break-system-packages wardengui
Option 2: Using pipx (isolated environment)
sudo apt install pipx
pipx ensurepath
pipx install wardengui
Option 3: User install without breaking system
pip3 install --user wardengui
Option 4: Virtual environment
python3 -m venv ~/.wardengui-venv
~/.wardengui-venv/bin/pip install wardengui
~/.wardengui-venv/bin/wardengui
Troubleshooting: Command Not Found
If you see wardengui: command not found after installation, the scripts are installed in ~/.local/bin which is not in your PATH.
Fix 1: Add to PATH (permanent)
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
wardengui
Fix 2: Run directly
~/.local/bin/wardengui
Fix 3: Use Python module
python3 -m wardengui
Usage
# Run with default settings (scans ~/ for projects)
wardengui
# or
warden-gui
# Specify projects directory
wardengui -p /path/to/projects
# Use 'down/up' instead of 'stop/start' (removes containers)
wardengui --down
Commands
Interactive GUI Mode
Navigation:
| Command | Description |
|---|---|
โ/โ or u/d |
Navigate menu up/down |
0-9 |
Select environment by number |
Enter or start |
Start selected environment |
q or quit |
Exit application |
help or ? |
Show available commands |
Environment Actions:
| Command | Description |
|---|---|
ssh or s |
SSH into running environment |
log or logs |
Follow all container logs |
log nginx |
Follow specific service logs |
ls |
List running containers |
run <cmd> |
Run one-off warden command |
port <svc> |
Show port bindings |
Headless Mode (CLI)
Run commands directly without the interactive GUI:
# Start an environment (stops current, starts new)
wardengui pei start
# Show environment information
wardengui pei info
# or simply
wardengui pei
# SSH into running environment
wardengui pei ssh
# View logs (last 100 lines)
wardengui pei log
# View logs with custom tail
wardengui pei log --tail 50
# Follow logs (tail -f)
wardengui pei log -f
# Follow logs with custom tail
wardengui pei log --tail 200 -f
Headless Mode Options:
| Option | Description |
|---|---|
--tail N |
Show last N log lines (default: 100) |
-f, --follow |
Follow log output (like tail -f) |
-p, --projects-root |
Specify projects directory |
-d, --down |
Use env down/up instead of env stop/start |
Requirements
- Python 3.8+
- Warden installed at
/opt/warden/bin/warden - Docker running
- WSL2 (on Windows)
Building & Publishing
Step 1: Install Build Tools
pip install build twine
Step 2: Clean Previous Builds
rm -rf build/ dist/ *.egg-info/
Step 3: Build the Package
cd C:\Users\Yshytikov\WardenGUI
python -m build
This creates:
dist/
โโโ wardengui-1.0.0-py3-none-any.whl # Wheel (binary)
โโโ wardengui-1.0.0.tar.gz # Source distribution
Step 4: Test Locally
# Install locally in editable mode
pip install -e .
# Test the command works
wardengui --help
Step 5: Create PyPI Account
- Go to https://pypi.org/account/register/
- Create an account
- Go to Account Settings โ API tokens
- Create a new API token (scope: entire account or project-specific)
- Save the token (starts with
pypi-)
Step 6: Configure Twine
Create ~/.pypirc (or C:\Users\YourName\.pypirc on Windows):
[pypi]
username = __token__
password = pypi-YOUR_API_TOKEN_HERE
Or use environment variable:
export TWINE_PASSWORD=pypi-YOUR_API_TOKEN_HERE
Step 7: Upload to TestPyPI (Optional - Recommended First)
# Upload to TestPyPI for testing
twine upload --repository testpypi dist/*
# Test install from TestPyPI
pip install --index-url https://test.pypi.org/simple/ wardengui
Step 8: Upload to PyPI
twine upload dist/*
Step 9: Verify Installation
# Install from PyPI
pip install wardengui
# Run
wardengui
Quick Build & Push Script
Use the included build_and_push.sh script:
chmod +x build_and_push.sh
./build_and_push.sh
This script will:
- Clean previous builds
- Build the package
- Check for errors
- Ask for confirmation before uploading to PyPI
Version Bump
Before publishing a new version, update version in pyproject.toml:
[project]
version = "1.0.1" # Increment this
Project Structure
wardengui/
โโโ pyproject.toml # Package configuration
โโโ README.md # This file
โโโ LICENSE # MIT License
โโโ warden_gui.py # Direct execution script
โโโ build_and_push.sh # Build and publish script
โโโ tests/ # Unit tests
โ โโโ test_headless.py # Headless mode tests
โ โโโ test_warden_mocking.py # WardenManager tests
โโโ src/
โโโ wardengui/
โโโ __init__.py # Package init, exports
โโโ __main__.py # Module execution entry point
โโโ warden.py # WardenManager class (core logic)
โโโ cli.py # CLI entry point (GUI + headless)
โโโ colors.py # ANSI color codes and formatting
Configuration
| Option | Default | Description |
|---|---|---|
-p, --projects-root |
~ |
Root directory to scan for Warden projects |
-d, --down |
false |
Use env down/up instead of env stop/start (removes containers) |
Environment Variables
WardenGUI automatically detects:
- Warden installation at
/opt/warden/bin/warden - WSL environment (for Windows users)
- Docker availability
- Project locations by scanning for
.wardendirectories
Project Detection
WardenGUI scans the specified directory (default: ~) for directories containing .warden folders. Each project must have:
- A
.wardendirectory - A
.envfile withWARDEN_ENV_NAMEdefined
Example project structure:
~/api-orocommerce/
โโโ .warden/
โโโ .env # Contains WARDEN_ENV_NAME=api
โโโ ...
Screenshot
Interactive GUI Mode
๐ณ WARDEN ENVIRONMENT MANAGER
๐ฆ ENVIRONMENTS:
> 0. [api] โ RUNNING -> https://app.apitire.test
1. [pei] โ STOPPED -> https://app.peigenesis.test
2. [lccoins] โ STOPPED -> https://app.lccoins.test
q. [Exit]
๐ API DETAILS:
๐ Path: /home/hammer/api-orocommerce
๐ URL: https://app.apitire.test/
๐ฆ Repo: https://github.com/Genaker/api-orocommerce
๐ Hosts: โ 127.0.0.1 -> app.apitire.test
๐ง Environment: api
๐ฆ Type: symfony
๐ PHP: 8.4
๐๏ธ DB: 10.11
๐ ES: 8.15.0
๐พ Volumes: 6 ๐ณContainers: 3/8 running
โโ dbdata: 8.58GB โ php-fpm
โโ esdata: 43.45MB โ nginx
โโ bashhistory: 1.401kB โ elasticsearch
โโ sshdirectory: 278B โ db
โโ redis: 93B โ elasticsearch-hq
โ php-debug
โ Status: RUNNING
Headless Mode Examples
Starting an environment:
$ wardengui pei start
Stopping current environment 'api'...
STOPPING API
$ cd /home/hammer/api-orocommerce && /opt/warden/bin/warden env stop
โ Container api-php-fpm-1 Stopped
โ Container api-nginx-1 Stopped
โ Environment api stopped successfully
Starting environment 'pei'...
STARTING PEI
Step 1/3: Starting Warden services...
$ /opt/warden/bin/warden svc up -d
Running:
โ traefik
โ portainer
โ Warden services ready
Step 2/3: Starting pei environment...
$ cd /home/hammer/pei-orocommerce-enterprise-application && /opt/warden/bin/warden env up -d
โ Container pei-php-fpm-1 Created
โ Container pei-php-fpm-1 Started
โ Container pei-nginx-1 Started
โ Network pei_default Created
Step 3/3: Restarting Warden services...
$ /opt/warden/bin/warden svc restart
โ Services restarted
โ Environment pei started successfully
โ pei is now running!
-> https://app.peigenesis.test/
Viewing environment info:
$ wardengui pei info
๐ PEI DETAILS:
๐ Path: /home/hammer/pei-orocommerce-enterprise-application
๐ URL: https://app.peigenesis.test/
๐ฆ Repo: https://github.com/Genaker/pei-orocommerce-enterprise-application
๐ง Environment: pei
๐ฆ Type: symfony
๐ PHP: 8.4
๐๏ธ DB: 10.11
๐ ES: 8.15.0
๐พ Volumes: 6 ๐ณContainers: 8/8 running
โโ dbdata: 12.3GB โ php-fpm
โโ appcode: 2.1GB โ nginx
โโ esdata: 156MB โ elasticsearch
โโ bashhistory: 2.1kB โ db
โโ redis: 93B โ elasticsearch-hq
โ php-debug
โ Status: RUNNING
SSH access:
$ wardengui pei ssh
๐ Connecting to pei...
$ cd /home/hammer/pei-orocommerce-enterprise-application && /opt/warden/bin/warden shell
Type 'exit' to return.
[user@pei-php-fpm-1 /app]$
Viewing logs:
$ wardengui pei log --tail 50 -f
๐ Showing logs for pei...
$ cd /home/hammer/pei-orocommerce-enterprise-application && /opt/warden/bin/warden env logs --tail 50 -f
Press Ctrl+C to stop following logs.
[Log output follows...]
License
MIT License - see LICENSE file for details.
Author
Yehor Shytikov
Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Project details
Release history Release notifications | RSS feed
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 wardengui-1.0.11.tar.gz.
File metadata
- Download URL: wardengui-1.0.11.tar.gz
- Upload date:
- Size: 30.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
30d3617e873fe8759576bd050395b9ced0782b8114285dd543b6e97b98885c01
|
|
| MD5 |
0c8e62c0f35e78734b2b4fce873945c7
|
|
| BLAKE2b-256 |
b09a8a268f5252d31bdb6f905ee3b05c060bbda30fd5184497fa6d43568d2090
|
File details
Details for the file wardengui-1.0.11-py3-none-any.whl.
File metadata
- Download URL: wardengui-1.0.11-py3-none-any.whl
- Upload date:
- Size: 21.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eddaec60edc559f1f731eacb5e6d19de1c7223fea473b6534200017f0db3cd02
|
|
| MD5 |
0b6a6249574e0f085adac37a19154241
|
|
| BLAKE2b-256 |
9f27d25ffa9c32335e6f11326552b70a90ec6cd690552e34c1ec764d9e4d32b3
|