octo

command module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 20, 2026 License: MIT Imports: 4 Imported by: 0

README ΒΆ

πŸ™ Octo

Orchestrate your Docker containers like an octopus.

Octo is a powerful Docker container management CLI tool that helps you monitor, analyze, and clean up Docker resources with an intuitive interface.

Features

  • πŸ“Š Status Dashboard - Real-time Docker system monitoring
  • πŸ” Resource Analyzer - Interactive exploration of containers, images, volumes
  • 🧹 Smart Cleanup - Safely remove unused resources with dry-run mode
  • πŸ—‘οΈ Deep Prune - Comprehensive cleanup of all unused Docker resources
  • 🩺 Health Diagnostics - Check Docker daemon health and configuration
  • 🎨 Beautiful TUI - Terminal user interface with keyboard navigation

Quick Start

Installation

Via Install Script (Recommended)

curl -fsSL https://raw.githubusercontent.com/bsisduck/octo/main/install.sh | bash

Via Go

go install github.com/bsisduck/octo@latest

From Source

git clone https://github.com/bsisduck/octo.git
cd octo
make install
Basic Usage
# Launch interactive menu
octo

# Show Docker status
octo status

# Watch status in real-time
octo status -w

# Analyze Docker resources
octo analyze

# Smart cleanup (with confirmation)
octo cleanup

# Preview cleanup without making changes
octo cleanup --dry-run

# Deep prune all unused resources
octo prune

# Run diagnostics
octo diagnose

# Show version info
octo version

Commands

octo (Interactive Menu)

Launch the interactive TUI menu for navigating all features:

   ___       _
  / _ \  ___| |_ ___
 | | | |/ __| __/ _ \
 | |_| | (__| || (_) |
  \___/ \___|\__\___/

  Quick Stats
  Containers:  5 (3 running)
  Images:      12
  Volumes:     8
  Disk Used:   2.5 GB
  Reclaimable: 850 MB

  Commands
β–Έ 1. Status      Monitor system health
  2. Analyze     Explore resource usage
  3. Cleanup     Smart cleanup with safety
  4. Prune       Deep cleanup all unused
  5. Diagnose    Check Docker health
octo status

Display Docker system status and resource usage:

octo status          # One-time status display
octo status -w       # Continuous monitoring mode
octo analyze

Interactive resource analyzer with drill-down navigation:

octo analyze                    # Full overview
octo analyze -t images          # Focus on images
octo analyze -t containers      # Focus on containers
octo analyze -t volumes         # Focus on volumes
octo analyze --dangling         # Show only unused resources

Navigation:

  • ↑/↓ or j/k - Move selection
  • Enter or l - Drill down into category
  • h or ← - Go back
  • d - Delete selected resource
  • r - Refresh
  • q - Quit
octo cleanup

Smart cleanup with safety checks and confirmation prompts:

octo cleanup                    # Clean all unused resources
octo cleanup --dry-run          # Preview without changes
octo cleanup --containers       # Remove stopped containers only
octo cleanup --images           # Remove dangling images only
octo cleanup --volumes          # Remove unused volumes only
octo cleanup --networks         # Remove unused networks only
octo cleanup --build-cache      # Clear build cache only
octo cleanup --all              # Remove ALL unused (not just dangling)
octo cleanup --force            # Skip confirmation prompts
octo prune

Deep cleanup equivalent to docker system prune -a:

octo prune                      # Prune with confirmation
octo prune --dry-run            # Preview what would be removed
octo prune --volumes            # Also remove anonymous volumes
octo prune --all                # Remove all unused images
octo prune --force              # Skip confirmation
octo diagnose

Health check and diagnostics:

octo diagnose                   # Run all diagnostic checks
octo diagnose --verbose         # Show detailed results

Checks performed:

  • Docker connection
  • Docker version and API
  • Storage driver
  • Disk usage
  • Container/image/volume counts
  • API responsiveness
  • Memory configuration

Global Options

--debug       Enable debug output
--dry-run     Preview changes without executing
--no-color    Disable colored output

Configuration

Octo uses sensible defaults and auto-detects Docker socket location:

Platform Default Socket Locations
macOS ~/.docker/run/docker.sock, /var/run/docker.sock
Linux /var/run/docker.sock, $XDG_RUNTIME_DIR/docker.sock
Windows \\.\pipe\docker_engine

Override with DOCKER_HOST environment variable:

export DOCKER_HOST=unix:///var/run/docker.sock

Keyboard Shortcuts

Key Action
↑/k Move up
↓/j Move down
Enter Select/Drill down
←/h Go back
d Delete selected
r Refresh
q/Esc Quit

Tips

Preview Before Cleaning

Always use --dry-run first to see what would be removed:

octo cleanup --dry-run
Quick Monitoring

Use watch mode for continuous monitoring:

octo status -w
Find Large Images

Use the analyzer to sort images by size:

octo analyze -t images
Safe Cleanup Workflow
  1. Run octo diagnose to check Docker health
  2. Run octo analyze to understand resource usage
  3. Run octo cleanup --dry-run to preview
  4. Run octo cleanup to execute

Building from Source

Requirements
  • Go 1.21 or later
  • Make
Build
git clone https://github.com/bsisduck/octo.git
cd octo
make build
Install
make install    # Installs to /usr/local/bin
Release Builds
make release    # Builds for all platforms

Project Structure

octo/
β”œβ”€β”€ main.go              # Entry point
β”œβ”€β”€ cmd/                 # Command implementations
β”‚   β”œβ”€β”€ root.go         # Root command and CLI setup
β”‚   β”œβ”€β”€ docker_client.go # Docker API wrapper
β”‚   β”œβ”€β”€ menu.go         # Interactive menu TUI
β”‚   β”œβ”€β”€ status.go       # Status command
β”‚   β”œβ”€β”€ analyze.go      # Analyze command
β”‚   β”œβ”€β”€ cleanup.go      # Cleanup command
β”‚   β”œβ”€β”€ prune.go        # Prune command
β”‚   β”œβ”€β”€ diagnose.go     # Diagnose command
β”‚   └── version.go      # Version command
β”œβ”€β”€ bin/                 # Built binaries
β”œβ”€β”€ tests/              # Test files
β”œβ”€β”€ Makefile            # Build automation
β”œβ”€β”€ install.sh          # Installation script
└── README.md           # This file

Contributing

Contributions are welcome! Please read our contributing guidelines before submitting PRs.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

MIT License - see LICENSE for details.

Acknowledgments

Documentation ΒΆ

Overview ΒΆ

Octo - Docker container orchestration and management CLI Like an octopus managing multiple containers with ease.

Directories ΒΆ

Path Synopsis
Package cmd provides the CLI command structure for Octo.
Package cmd provides the CLI command structure for Octo.
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL