Skip to main content

Composure

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

Python 3.9+ License: MIT PyPI Docker

Quick Install

pip install composure

Or choose your preferred method below.

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)
  • Pull images with a single overall progress bar across all images

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
  • Multi-Container Logs: View merged logs from ALL containers with color-coded prefixes (press L)
  • Image Pull Progress: Pull all images from docker-compose.yml with a single overall progress percentage
  • Parallel Loading: Fast startup even with many containers

Installation

pip (recommended)

pip install composure

pipx (isolated environment)

pipx install composure

uv

uv tool install composure

Docker

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

Debian/Ubuntu

# One-line install script
curl -fsSL https://jamesdimonaco.github.io/composure/install.sh | sudo bash
Or install manually
# Add the GPG key
curl -fsSL https://jamesdimonaco.github.io/composure/gpg.key | sudo gpg --dearmor -o /usr/share/keyrings/composure.gpg

# Add the repository
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
pip install -e .

Usage

composure

Pull Images

Pull all images from your docker-compose.yml with a single overall progress percentage:

composure pull

This shows real-time progress across all images downloading in parallel:

Pulling 3 images from docker-compose.yml

⠙ Overall              ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━  36%  847MB / 2.3GB
    nginx:alpine       ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100%  done
    redis:alpine       ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━  45%  pulling
    postgres:15-alpine ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━  20%  pulling

You can also press p in the TUI to pull images.

JSON Output

For scripting and CI/CD pipelines, use --json to get machine-readable output:

composure pull --json

Outputs one JSON object per line with progress updates:

{"percent": 36.5, "downloaded_bytes": 847000, "total_bytes": 2300000, "images_complete": 1, "images_total": 3, ...}

Python API

Use composure programmatically in your Python scripts:

from composure import pull

# With progress updates
for progress in pull("/path/to/project"):
    print(f"{progress.percent:.0f}% complete")
    print(f"Images: {progress.images_complete}/{progress.images_total}")

# Or just get final result
result = pull("/path/to/project", progress=False)
print(f"Pulled {result.images_complete} images")

The PullProgress object contains:

  • percent - Overall percentage (0-100)
  • downloaded_bytes / total_bytes - Byte counts
  • images_complete / images_total - Image counts
  • completed_layers / total_layers - Layer counts
  • images - Dict with per-image details

Keyboard Shortcuts

Key Action
q Quit
r Refresh / Return from logs
n Toggle network view
s Stop selected container
a Start selected container
x Restart selected container
l Show logs for selected container
L Show merged logs from ALL containers (color-coded)
p Pull all images from docker-compose.yml
? 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

Detail Panel

Select a container to see detailed info at the bottom:

nginx  running  Image: nginx:alpine
ID: a1b2c3d4  Ports: 8080:80/tcp, 443:443/tcp  Restart: always
Mounts: ./html:/usr/share/nginx/html
Networks: frontend, backend
Logs: (press 'l' for full, 'L' for all)
  2024-01-15T10:30:45 GET /api/health 200
Field Description
Image Docker image being used
Ports Port mappings (host:container)
Restart Restart policy (always, unless-stopped, on-failure, no)
Mounts Volume and bind mounts
Networks Connected networks

Columns Explained

Column Description
Status running, exited, paused, etc.
CPU % Current CPU usage
CPU Limit Configured limit (or "No limit")
RAM Used Current memory usage
RAM Limit Configured limit (or "No limit")
Efficiency LOW/MEDIUM/GOOD/HIGH 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:

Score Color Meaning
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

Contributing

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

License

MIT License - see LICENSE for details.

Links

Metadata

Release files for composure 0.1.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for composure 0.1.9
File Size Uploaded Provenance
composure-0.1.9.tar.gz 24.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for composure 0.1.9
File Interpreter ABI Platform
composure-0.1.9-py3-none-any.whl Python 3 none any Details

Total release size: 47.9 kB

Release files / composure-0.1.9.tar.gz

Download URL composure-0.1.9.tar.gz
Size 24.4 kB
Tags Source
SHA-256 checksum
How to use checksums
650706ae277ab16df0de0313280b85f6123712a1af1c060c950dafb46340b49f
BLAKE2b-256 checksum
How to use checksums
83ca676a6713c769824c3285e7400054b1e8255d6ff801ccf81f89246bc8e1ac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","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}

Release files / composure-0.1.9-py3-none-any.whl

Download URL composure-0.1.9-py3-none-any.whl
Size 23.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4ea3d147602985b7a0faf02b904118f56433c756f863e2a8108247349b3197fc
BLAKE2b-256 checksum
How to use checksums
170eeded7c2f2dbe078ae3e388a7016d9a5ce4953fae5c63e44c05f822afae92
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","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}

Security for composure 0.1.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page