Skip to main content

A lightweight Terminal User Interface (TUI) for managing Docker containers, images, and volumes via WSL2

Project description

🐳 Nano Whale - Lightweight Docker TUI

Python Version License Textual

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

Nano Whale Main Interface

Multi-Select Operations

Multi-Select Mode

Command Panel

Commands Panel

Logs - In Shell

In-Shell Logs

Logs - New Terminal Window

Logs in New Terminal

Terminal (Exec) - In Shell

In-Shell Terminal Exec

Terminal (Exec) - New Window

Terminal in New Window


✨ 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 A key
  • 🧹 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/Vriddhachalam/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

📖 Usage Examples

Viewing Container Details

  1. Launch Nano Whale: nano-whale
  2. First container is automatically selected and details shown
  3. Press 1-5 to switch between Info, Env, Ports, Volumes, Networks tabs
  4. Use ↑/↓ to select different containers

Container Details View

Starting Multiple Containers

  1. Press C to ensure Containers table is focused
  2. Press M on first container to mark it [*]
  3. Press then M to mark more containers
  4. Press S to start all marked containers

Multiple Containers Marked

Viewing Live Logs

In-Shell (suspends TUI):

  1. Select a running container
  2. Press L
  3. Logs stream in terminal
  4. Press Ctrl+C to return to TUI

In-Shell Logs

In New Window:

  1. Select a running container
  2. Press Ctrl+L
  3. New terminal window opens with streaming logs
  4. TUI remains active

Logs in New Terminal

Exec into Container

In-Shell:

  1. Select a running container
  2. Press T
  3. Interactive shell opens
  4. Type exit to return to TUI

In-Shell Terminal

In New Window:

  1. Select a running container
  2. Press Ctrl+T
  3. New terminal with shell opens

Terminal in New Window

Cleaning Up System

  1. Press P - shows warning notification
  2. Press P again within 5 seconds to confirm
  3. Executes docker system prune -a -f
  4. Removes all unused containers, images, and volumes

Switching Between Tables

Keyboard:

  • C → Containers
  • I → Images
  • V → Volumes

Mouse:

  • Click anywhere within a table's yellow border area

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/Vriddhachalam/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


Download files

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

Source Distribution

nano_whale-0.1.16.tar.gz (6.8 MB view details)

Uploaded Source

Built Distribution

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

nano_whale-0.1.16-py3-none-any.whl (16.3 kB view details)

Uploaded Python 3

File details

Details for the file nano_whale-0.1.16.tar.gz.

File metadata

  • Download URL: nano_whale-0.1.16.tar.gz
  • Upload date:
  • Size: 6.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.7

File hashes

Hashes for nano_whale-0.1.16.tar.gz
Algorithm Hash digest
SHA256 ca6e7c6dc39c837ee5ae745e63544cd27b484a556929c0b8f20e32d43a0790b1
MD5 12f28f731f187e2693ab46c55fae46c9
BLAKE2b-256 3fb56b940436d0c48b38ea359440615451276ee2e763433ee04311cedee34784

See more details on using hashes here.

File details

Details for the file nano_whale-0.1.16-py3-none-any.whl.

File metadata

  • Download URL: nano_whale-0.1.16-py3-none-any.whl
  • Upload date:
  • Size: 16.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.7

File hashes

Hashes for nano_whale-0.1.16-py3-none-any.whl
Algorithm Hash digest
SHA256 45e5247b5f15a655a58642b7fd48156e2184dcf5173a524e54e2c7316f116d59
MD5 83b341c0fc7f81b2519508d9c62fd688
BLAKE2b-256 0c6e28967bf764d14d21e6168ff0840b28634cd11df1b861d455bb688a552c66

See more details on using hashes here.

Supported by

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