A lightweight Terminal User Interface (TUI) for managing Docker containers, images, and volumes via WSL2
Project description
๐ณ Nano Whale - Lightweight Docker TUI
A blazingly fast, lightweight Terminal User Interface (TUI) for managing Docker containers, images, and volumes. Built with Textual, Nano Whale provides an elegant, keyboard-driven interface for Docker management without the overhead of Docker Desktop.
๐ธ Screenshots
Main Interface
Container Details Panel
Environment Variables View
Port Mappings
Multi-Select Operations
Logs in Terminal
โจ Features
๐ฅ๏ธ Split-Pane Interface
- Left Pane: Three stacked tables showing Containers, Images, and Volumes simultaneously
- Right Pane: Detailed view with 5 tabbed panels for container inspection
- Bottom Panel: Real-time log output and status messages
๐ฆ Container Management
- Start, stop, and restart containers
- View container logs (in-shell or new terminal window)
- Launch interactive terminal sessions (exec into containers)
- Delete containers with safety checks (stops running containers first)
๐ผ๏ธ Image Management
- View all Docker images with size and creation info
- Delete unused images
- Multi-select for batch deletion
๐พ Volume Management
- List all Docker volumes
- Delete volumes (with force option)
- Batch operations support
๐ Container Inspection (Right Pane Tabs)
| Tab | Content |
|---|---|
| Info (1) | Container ID, Image, Status, PID, Exit Code, Platform, Hostname, Restart Policy |
| Env (2) | All environment variables |
| Ports (3) | Port mappings (host โ container) |
| Volumes (4) | Volume mounts with source, destination, and mode |
| Networks (5) | Network configuration, IP addresses, gateways, MAC addresses |
โก Additional Features
- ๐ Lightning Fast - Minimal resource footprint
- โจ๏ธ Keyboard-Driven - Full keyboard navigation
- ๐ฑ๏ธ Mouse Support - Click anywhere on a table section to switch
- ๐ฆ Multi-Select - Batch operations on multiple items
- ๐ Auto-Refresh - Manual refresh with
Akey - ๐งน Smart Prune - Two-step confirmation for system cleanup
- ๐จ Visual Feedback - Highlighted labels show active table
- ๐ Cross-Platform - Windows (WSL), Linux, macOS support
๐ Prerequisites
- Python 3.8+
- Docker Engine installed and running
- For Windows: WSL2 with Docker (or Docker Desktop)
Platform Support
| Platform | Docker Command |
|---|---|
| Windows (WSL2) | wsl docker ... |
| Linux | docker ... |
| macOS | docker ... |
๐ฆ Installation
Via pip (Recommended)
pip install nano-whale
Via pipx (Isolated)
pipx install nano-whale
From Source
git clone https://github.com/yourusername/nano-whale.git
cd nano-whale
pip install -e .
๐ Usage
Simply run:
nano-whale
Or run directly:
python main.py
โจ๏ธ Keyboard Shortcuts
Table Navigation
| Key | Action |
|---|---|
C |
Switch to Containers table |
I |
Switch to Images table |
V |
Switch to Volumes table |
โ/โ |
Navigate rows |
Page Up/Down |
Fast scroll |
Home/End |
Jump to first/last row |
| Mouse Click | Click anywhere on table section to switch |
Detail Panel Tabs
| Key | Action |
|---|---|
1 |
Info tab - Container details |
2 |
Env tab - Environment variables |
3 |
Ports tab - Port mappings |
4 |
Volumes tab - Volume mounts |
5 |
Networks tab - Network configuration |
Container Operations
| Key | Action |
|---|---|
S |
Start container(s) |
X |
Stop container(s) |
R |
Restart container(s) |
D |
Delete selected item(s) |
Logs & Terminal
| Key | Action |
|---|---|
L |
View Logs in-shell (suspends TUI) |
Ctrl+L |
View Logs in new terminal window |
T |
Launch Terminal in-shell (exec) |
Ctrl+T |
Launch Terminal in new window |
Multi-Select & Batch Operations
| Key | Action |
|---|---|
M |
Mark/Unmark current item |
(then) S/X/R/D |
Perform action on all marked items |
Utilities
| Key | Action |
|---|---|
A |
Refresh all tables |
G |
Toggle Stats display in container list |
P |
Prune menu (press twice to confirm) |
Q |
Quit application |
๐จ Interface Layout
๐ Usage Examples
Viewing Container Details
- Launch Nano Whale:
nano-whale - First container is automatically selected and details shown
- Press
1-5to switch between Info, Env, Ports, Volumes, Networks tabs - Use
โ/โto select different containers
Starting Multiple Containers
- Press
Cto ensure Containers table is focused - Press
Mon first container to mark it[*] - Press
โthenMto mark more containers - Press
Sto start all marked containers
Viewing Live Logs
In-Shell (suspends TUI):
- Select a running container
- Press
L - Logs stream in terminal
- Press
Ctrl+Cto return to TUI
In New Window:
- Select a running container
- Press
Ctrl+L - New terminal window opens with streaming logs
- TUI remains active
Exec into Container
In-Shell:
- Select a running container
- Press
T - Interactive shell opens
- Type
exitto return to TUI
In New Window:
- Select a running container
- Press
Ctrl+T - New terminal with shell opens
Cleaning Up System
- Press
P- shows warning notification - Press
Pagain within 5 seconds to confirm - Executes
docker system prune -a -f - Removes all unused containers, images, and volumes
Switching Between Tables
Keyboard:
Cโ ContainersIโ ImagesVโ Volumes
Mouse:
- Click anywhere within a table's yellow border area
๐๏ธ Architecture
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Nano Whale (Textual) โ
โ Python TUI โ
โโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Platform Detection Layer โ
โ (Windows WSL / Linux / macOS) โ
โโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Docker CLI Commands โ
โ wsl docker ... (Windows WSL) โ
โ docker ... (Linux/macOS) โ
โโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Docker Engine โ
โ Containers โ Images โ Volumes โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Key Benefits:
- โ No Docker Desktop required (on Windows with WSL2)
- โ Direct Docker Engine access
- โ Minimal overhead
- โ Works over SSH
๐ง Configuration
Nano Whale auto-detects your platform:
| Platform | Detection | Command Prefix |
|---|---|---|
| Windows + WSL | wsl available |
wsl docker |
| Windows (native) | No WSL | docker |
| Linux | platform.system() |
docker |
| macOS | platform.system() |
docker |
๐ Troubleshooting
"wsl command not found" (Windows)
wsl --install
# Restart computer after installation
"Cannot connect to Docker daemon"
Linux/macOS:
sudo systemctl start docker
# or
sudo service docker start
Windows WSL:
wsl sudo service docker start
"Permission denied"
sudo usermod -aG docker $USER
# Then log out and back in
Terminal commands not opening new windows
Nano Whale tries multiple terminal emulators:
- Windows: Windows Terminal (
wt.exe),cmd.exe - Linux:
gnome-terminal,konsole,xfce4-terminal,xterm - macOS: Terminal.app, iTerm2
Ensure at least one is installed and accessible in PATH.
๐ค Contributing
Contributions welcome!
# Clone
git clone https://github.com/yourusername/nano-whale.git
cd nano-whale
# Setup
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -e .
# Run
python main.py
๐ License
MIT License - see LICENSE file.
๐ Acknowledgments
- Built with Textual by Textualize.io
- Inspired by lazydocker and the need for a lightweight alternative
โญ Star History
If you find Nano Whale useful, please give it a star on GitHub!
Made with โค๏ธ by Vriddhachalam S
Swim fast, stay light! ๐ณ
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 nano_whale-0.1.14.tar.gz.
File metadata
- Download URL: nano_whale-0.1.14.tar.gz
- Upload date:
- Size: 6.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2aa2b6601ab03e5730f52c9b9bc8d5e6b270d88a921b61ea655f9a923fb9acd3
|
|
| MD5 |
a2d4511a13531b34d32297c32955c3a7
|
|
| BLAKE2b-256 |
5fb5075407eba925349657bf4bea9913993fc60703e4f7d1a56ae3f4abdce419
|
File details
Details for the file nano_whale-0.1.14-py3-none-any.whl.
File metadata
- Download URL: nano_whale-0.1.14-py3-none-any.whl
- Upload date:
- Size: 16.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
43810aabcc14db6b5e3b3e42802b2abf98ef306df19dd4ea1628c7c476bfbe12
|
|
| MD5 |
21f87607c0696dbaec949405430b10a1
|
|
| BLAKE2b-256 |
b409a46596109b1c112fd62d4b9658c903577bd04b874c5125f89c02f5ab8801
|