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

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

Nano Whale Interface Layout


๐Ÿ“– 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

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

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 New Window:

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

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 New Window:

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

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

๐Ÿ—๏ธ 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


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.14.tar.gz (6.4 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.14-py3-none-any.whl (16.4 kB view details)

Uploaded Python 3

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

Hashes for nano_whale-0.1.14.tar.gz
Algorithm Hash digest
SHA256 2aa2b6601ab03e5730f52c9b9bc8d5e6b270d88a921b61ea655f9a923fb9acd3
MD5 a2d4511a13531b34d32297c32955c3a7
BLAKE2b-256 5fb5075407eba925349657bf4bea9913993fc60703e4f7d1a56ae3f4abdce419

See more details on using hashes here.

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

Hashes for nano_whale-0.1.14-py3-none-any.whl
Algorithm Hash digest
SHA256 43810aabcc14db6b5e3b3e42802b2abf98ef306df19dd4ea1628c7c476bfbe12
MD5 21f87607c0696dbaec949405430b10a1
BLAKE2b-256 b409a46596109b1c112fd62d4b9658c903577bd04b874c5125f89c02f5ab8801

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