Skip to main content

A terminal tool to audit, optimize, and visualize Docker-Compose stacks in real-time

Project description

Composure

A terminal tool to audit, optimize, and visualize Docker-Compose stacks in real-time.

Python 3.9+ License: MIT

What is Composure?

Composure is a TUI (Terminal User Interface) dashboard that helps you:

  • Monitor all your Docker containers in real-time
  • Detect waste by comparing actual resource usage vs allocated limits
  • Visualize networks to see how containers connect to each other
  • Control containers directly from the terminal (start, stop, restart, view logs)

Features

  • Resource Monitoring: See CPU and memory usage for all containers
  • Waste Detection: Identify over-provisioned containers with waste scores
  • Limit Awareness: Quickly spot containers without resource limits
  • Network Visualization: Tree view showing container network topology
  • Container Controls: Start, stop, restart containers with keyboard shortcuts
  • Live Logs: View recent logs for any container
  • Parallel Loading: Fast startup even with many containers

Installation

Using pip (recommended)

pip install composure

Using uv

uv tool install composure

Using Docker

docker run -it -v /var/run/docker.sock:/var/run/docker.sock jamesdimonaco/composure

Debian/Ubuntu (apt)

# Add the repository
curl -fsSL https://jamesdimonaco.github.io/composure/gpg.key | sudo gpg --dearmor -o /usr/share/keyrings/composure.gpg
echo "deb [signed-by=/usr/share/keyrings/composure.gpg] https://jamesdimonaco.github.io/composure stable main" | sudo tee /etc/apt/sources.list.d/composure.list

# Install
sudo apt update
sudo apt install composure

From source

git clone https://github.com/JamesDimonaco/composure.git
cd composure
uv sync
uv run composure

Usage

Simply run:

composure

Keyboard Shortcuts

Key Action
q Quit
r Refresh
n Toggle network view
s Stop selected container
a Start selected container
x Restart selected container
l Show logs for selected container
? Show help
↑/↓ Navigate containers

Understanding the Dashboard

Main View

Container     Status   CPU %  CPU Limit  RAM Used  RAM Limit  Efficiency  Waste
nginx         running  0.5%   2 cores    45 MB     512 MB     LOW         90
api           running  2.1%   No limit   128 MB    256 MB     MEDIUM      40
postgres      running  1.2%   1 core     256 MB    512 MB     GOOD        20

Columns Explained

  • Status: running, exited, paused, etc.
  • CPU %: Current CPU usage
  • CPU Limit: Configured CPU limit (or "No limit")
  • RAM Used: Current memory usage
  • RAM Limit: Configured memory limit (or "No limit")
  • Efficiency: LOW/MEDIUM/GOOD/HIGH based on resource utilization
  • Waste: 0-100 score (higher = more over-provisioned)

Waste Score

The waste score helps identify containers that have been allocated far more resources than they're using:

  • 0-30 (green): Good utilization
  • 30-60 (yellow): Could be optimized
  • 60-100 (red): Significantly over-provisioned

Network View

Press n to see a tree view of your Docker networks:

Docker Networks
├── Compose Networks
│   └── myapp_default (3 containers)
│       ├── nginx
│       ├── api
│       └── postgres
└── System Networks
    └── bridge (empty)

Requirements

  • Python 3.9+
  • Docker Engine running locally
  • Access to Docker socket

Development

# Clone the repo
git clone https://github.com/JamesDimonaco/composure.git
cd composure

# Install dependencies
uv sync

# Run in development
uv run composure

# Run tests
uv run pytest

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT License - see LICENSE for details.

Acknowledgments

Built with:

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

composure-0.1.1.tar.gz (14.0 kB view details)

Uploaded Source

Built Distribution

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

composure-0.1.1-py3-none-any.whl (13.1 kB view details)

Uploaded Python 3

File details

Details for the file composure-0.1.1.tar.gz.

File metadata

  • Download URL: composure-0.1.1.tar.gz
  • Upload date:
  • Size: 14.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.25 {"installer":{"name":"uv","version":"0.9.25","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for composure-0.1.1.tar.gz
Algorithm Hash digest
SHA256 e98c3c96310f6d643b54fff60307af22c15873e04373888b15b5be86661aa31d
MD5 df82801fd8612541e74a3460a6652bf5
BLAKE2b-256 a9f3144489b15e467f756b9c1b9fd5f8bad5d66a3accbdf13a9e7793e8cae426

See more details on using hashes here.

File details

Details for the file composure-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: composure-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 13.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.25 {"installer":{"name":"uv","version":"0.9.25","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for composure-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f89d9e7b9217a51897e5dfeeda1184be9be275f99aaf6f0f296d0f9bdf2d1ee7
MD5 d96505a8d6820b61ae728eef4d9a9ebb
BLAKE2b-256 6ed9fe00c19bed5d6fce4fb7ce9e8ca07a7820b0c847216cf20323011d96a112

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