Install command
Not provided
Docker statusline configuration for Claude Code CLI. Features real-time health monitoring, color-coded indicators, and container tracking. Production-ready.
Open the source and read safety notes before installing.
Source-backed facts for citing this resource, derived directly from the registry — also available as plain text for AI assistants.
Decision playbook
Signals are present but mixed. Use the checklist below to confirm the source and operational safety for your environment.
0
78
—
No baseline selected
No major trust-signal divergence detected in the current selection.
Confirm ownership and provenance before trusting install instructions.
Source link availableRequired
Open the canonical repository and verify ownership.
Source provenance statusRequired
Marked as source-backed.
Metadata reviewed
Registry metadata indicates a reviewed listing.
Validate risk disclosures before installation or API wiring.
Safety notes presentRequired
Review the listed safety guidance before running commands.
Privacy notes presentRequired
Review data handling notes before connecting accounts or secrets.
Trust level risk gateRequired
Trust level does not block evaluation.
Check package metadata and artifact integrity signals.
Install payload available
Install or copy payload is available for review.
Package verification flag
No package verification flag provided.
Checksum metadata
No checksum provided for downloaded artifact.
Use compare context to validate trade-offs before adoption.
Compare tray has multiple entries
Add at least one more entry to compare trust differences.
Baseline comparison available
No baseline peer selected yet.
Diverging trust signals identified
No major trust-signal divergence found.
Setup at a glance
Copy-ready — paste the snippet to get started.
Install command
Not provided
Config snippet
Provided
Copy snippet
Provided
Prerequisites
6 to clear
Platforms
1 listed
Difficulty
2/100
Adoption plan
Current risk score 16/100. Use staged verification before broader rollout.
Validate source and review signals before any execution.
Confirm source provenanceRequired
Source URL/provenance metadata is present.
Confirm metadata review state
Listing has review metadata.
Verify install payload
Install/config payload exists and can be inspected.
Confirm safety, privacy, and package integrity signals.
Review safety notesRequired
Safety notes are present.
Review privacy notesRequired
Privacy notes are present.
Verify package integrity metadata
No package verification/checksum metadata.
Adopt in controlled steps based on the selected plan.
Run in isolated sandbox firstRequired
Use a constrained sandbox and observe behavior across multiple tasks.
Roll out graduallyRequired
Roll out to a small cohort before wider usage.
Set monitoring and fallback
Define rollback path and monitor errors after adoption.
Evidence readiness
Required evidence gates are covered (5/6 signals complete).
Source repository/provenance is listed.
Required in this preset
Review metadata is present.
Required in this preset
Safety notes are present.
Required in this preset
Privacy notes are present.
Optional in this preset
Package integrity metadata is missing.
Optional in this preset
Install payload is available.
Required in this preset
Required evidence gates are covered for this preset.
Decision timeline
5/6 steps complete with no blocking gaps for this preset.
triage
Source/provenance metadata is available.
triage
Review metadata is available.
verify
Safety notes are available.
verify
Privacy notes are available.
verify
Package integrity metadata is missing.
rollout
Install payload is available.
No required blockers for this timeline preset.
Prerequisite readiness
6 prerequisites to line up before setup.
Safety & privacy surface
1 safety and 1 privacy notes across 1 risk area. Review closely: credentials & tokens.
#!/bin/bash
# Docker Health Statusline
# Real-time container health monitoring for Claude Code CLI
# Get running containers count
running=$(docker ps -q 2>/dev/null | wc -l | tr -d ' ')
# Get total containers
total=$(docker ps -a -q 2>/dev/null | wc -l | tr -d ' ')
# Get unhealthy containers
unhealthy=$(docker ps --filter health=unhealthy -q 2>/dev/null | wc -l | tr -d ' ')
# Color codes
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
RED='\033[0;31m'
BLUE='\033[0;34m'
NC='\033[0m' # No Color
# Status indicator
if [ "$unhealthy" -gt 0 ]; then
status="${RED}●${NC}"
elif [ "$running" -eq 0 ]; then
status="${YELLOW}○${NC}"
else
status="${GREEN}●${NC}"
fi
# Display statusline
echo -e "${BLUE}🐳${NC} ${status} ${running}/${total}"{
"statusLine": {
"type": "command",
"command": "$CLAUDE_PROJECT_DIR/.claude/statuslines/docker-health-statusline.sh",
"refreshInterval": 2000
}
}{
"statusLine": {
"type": "command",
"command": "$CLAUDE_PROJECT_DIR/.claude/statuslines/docker-health-statusline.sh",
"refreshInterval": 2000
}
}
Extended version displaying unhealthy container names for quick identification
#!/bin/bash
# Enhanced Docker Health Statusline with Container Names
running=$(docker ps -q 2>/dev/null | wc -l | tr -d ' ')
total=$(docker ps -a -q 2>/dev/null | wc -l | tr -d ' ')
unhealthy=$(docker ps --filter health=unhealthy -q 2>/dev/null | wc -l | tr -d ' ')
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
RED='\033[0;31m'
BLUE='\033[0;34m'
NC='\033[0m'
if [ "$unhealthy" -gt 0 ]; then
status="${RED}●${NC}"
unhealthy_names=$(docker ps --filter health=unhealthy --format '{{.Names}}' 2>/dev/null | tr '\n' ',' | sed 's/,$//')
if [ -n "$unhealthy_names" ]; then
echo -e "${BLUE}🐳${NC} ${status} ${running}/${total} (${RED}${unhealthy_names}${NC})"
else
echo -e "${BLUE}🐳${NC} ${status} ${running}/${total}"
fi
elif [ "$running" -eq 0 ]; then
status="${YELLOW}○${NC}"
echo -e "${BLUE}🐳${NC} ${status} ${running}/${total}"
else
status="${GREEN}●${NC}"
echo -e "${BLUE}🐳${NC} ${status} ${running}/${total}"
fi
Version showing container restart counts for monitoring stability
#!/bin/bash
# Docker Health Statusline with Restart Count
running=$(docker ps -q 2>/dev/null | wc -l | tr -d ' ')
total=$(docker ps -a -q 2>/dev/null | wc -l | tr -d ' ')
unhealthy=$(docker ps --filter health=unhealthy -q 2>/dev/null | wc -l | tr -d ' ')
# Get containers with restart count > 0
restarting=$(docker ps -a --filter 'restart-count=1' --format '{{.Names}}' 2>/dev/null | wc -l | tr -d ' ')
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
RED='\033[0;31m'
BLUE='\033[0;34m'
NC='\033[0m'
if [ "$unhealthy" -gt 0 ]; then
status="${RED}●${NC}"
elif [ "$restarting" -gt 0 ]; then
status="${YELLOW}⚠${NC}"
elif [ "$running" -eq 0 ]; then
status="${YELLOW}○${NC}"
else
status="${GREEN}●${NC}"
fi
if [ "$restarting" -gt 0 ]; then
echo -e "${BLUE}🐳${NC} ${status} ${running}/${total} (${restarting} restarted)"
else
echo -e "${BLUE}🐳${NC} ${status} ${running}/${total}"
fi
Complete setup script with Docker daemon verification and permissions check
#!/bin/bash
# Installation script for Docker Health Statusline
# Check if Docker is installed
if ! command -v docker &> /dev/null; then
echo "Error: Docker is not installed or not in PATH"
echo "Install Docker: https://docs.docker.com/get-docker/"
exit 1
fi
# Check if Docker daemon is running
if ! docker ps &> /dev/null; then
echo "Error: Docker daemon is not running"
echo "Start Docker daemon and try again"
exit 1
fi
# Check user permissions
if ! docker ps &> /dev/null; then
echo "Warning: User may not have Docker permissions"
echo "On Linux, add user to docker group: sudo usermod -aG docker $USER"
echo "Then log out and log back in"
fi
mkdir -p .claude/statuslines
cat > .claude/statuslines/docker-health-statusline.sh << 'SCRIPT_EOF'
#!/bin/bash
# Docker Health Statusline
# Real-time container health monitoring for Claude Code CLI
running=$(docker ps -q 2>/dev/null | wc -l | tr -d ' ')
total=$(docker ps -a -q 2>/dev/null | wc -l | tr -d ' ')
unhealthy=$(docker ps --filter health=unhealthy -q 2>/dev/null | wc -l | tr -d ' ')
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
RED='\033[0;31m'
BLUE='\033[0;34m'
NC='\033[0m'
if [ "$unhealthy" -gt 0 ]; then
status="${RED}●${NC}"
elif [ "$running" -eq 0 ]; then
status="${YELLOW}○${NC}"
else
status="${GREEN}●${NC}"
fi
echo -e "${BLUE}🐳${NC} ${status} ${running}/${total}"
SCRIPT_EOF
chmod +x .claude/statuslines/docker-health-statusline.sh
# Add to settings.json
if [ ! -f .claude/settings.json ]; then
echo '{"statusLine":{"type":"command","command":"$CLAUDE_PROJECT_DIR/.claude/statuslines/docker-health-statusline.sh","refreshInterval":2000}}' > .claude/settings.json
else
jq '.statusLine = {"type":"command","command":"$CLAUDE_PROJECT_DIR/.claude/statuslines/docker-health-statusline.sh","refreshInterval":2000}' .claude/settings.json > .claude/settings.json.tmp
mv .claude/settings.json.tmp .claude/settings.json
fi
echo "Docker Health Statusline installed successfully!"
echo "Test with: docker ps"
Verify Docker daemon is running with 'docker ps'. Check user has permissions to access Docker socket. On Linux, add user to docker group with 'sudo usermod -aG docker $USER' and restart terminal. On macOS/Windows, ensure Docker Desktop is running. Verify DOCKER_HOST environment variable if using remote Docker daemon.
Ensure terminal supports ANSI color codes. Set TERM=xterm-256color in shell profile (~/.bashrc or ~/.zshrc). Verify colorScheme setting in statusline.json matches terminal capabilities. Test with: echo -e '\033[0;32mGREEN\033[0m'. If colors still don't work, terminal may not support ANSI codes.
Increase refreshInterval to 3000-5000ms in configuration. Reduce docker ps query frequency. Consider caching container count between refresh cycles for better performance. Use docker ps -q (quiet mode) to reduce output parsing overhead. Monitor Docker daemon performance with 'docker stats'.
Confirm containers have HEALTHCHECK defined in Dockerfile or docker-compose.yml. Verify docker version supports health checks (17.05+). Run 'docker inspect CONTAINER' to check health configuration. Check health check interval and timeout settings. Verify health check command is working: docker exec CONTAINER health-check-command.
On Linux: Add user to docker group: sudo usermod -aG docker $USER, then log out and log back in. Verify group membership: groups $USER. Check Docker socket permissions: ls -l /var/run/docker.sock. On macOS/Windows: Ensure Docker Desktop is running and user has proper permissions. Check Docker Desktop settings for user access.
Verify health check filter syntax: docker ps --filter health=unhealthy. Check if containers actually have health checks configured: docker inspect CONTAINER | jq '.[0].State.Health'. Ensure Docker version supports health checks (17.05+). Verify health check command is failing as expected. Check health check logs: docker inspect CONTAINER | jq '.[0].State.Health.Log'.
Verify Docker daemon is running: systemctl status docker (Linux) or check Docker Desktop status (macOS/Windows). Check DOCKER_HOST environment variable: echo $DOCKER_HOST. Default socket location: /var/run/docker.sock (Linux) or ~/.docker/run/docker.sock (macOS). Verify socket exists: ls -l /var/run/docker.sock. Restart Docker daemon if needed.
Verify docker ps commands are working: docker ps -q | wc -l. Check for stopped containers: docker ps -a -q | wc -l. Ensure script is using correct flags: -q for quiet mode, -a for all containers. Verify wc and tr commands are available: which wc tr. Check for hidden characters in output: docker ps -q | od -c.
Show that Claude Code Docker Statusline - Container Health Monitoring is listed on HeyClaude. Paste this Markdown into your README — it renders the badge and links back to this page.
[](https://heyclau.de/entry/statuslines/docker-health-statusline)Claude Code Docker Statusline - Container Health Monitoring side by side with 3 alternatives on trust, install, platform support, and disclosed safety notes — all from reviewed registry metadata.
1 trust signal differ across this comparison (Submitter).
| Field | Docker statusline configuration for Claude Code CLI. Features real-time health monitoring, color-coded indicators, and container tracking. Production-ready. Open dossier | A Claude Code statusline that reads the session JSON on stdin and splits total_duration_ms into API processing time versus network/waiting time (total minus API). Open dossier | Real-time burn rate monitor showing cost per minute, tokens per minute, and projected daily spend to prevent budget overruns during Claude Code sessions. Open dossier | Claude Code statusline that estimates context pressure from local session token counts and a configurable context limit, then prints a compact risk tier. Open dossier |
|---|---|---|---|---|
| Next steps | ||||
| Trust | ||||
| Review status | ReviewedMaintainer reviewed | ReviewedMaintainer reviewed | ReviewedMaintainer reviewed | ReviewedMaintainer reviewed |
| Package trust | Package not verified | Package not verified | Package not verified | Package not verified |
| Source provenance | Source-backed | Source-backed | Source-backed | Source-backed |
| SubmitterDiffers | — | — | — | MkDev11 |
| Install risk | Review first | Review first | Review first | Review first |
| Notes | Safety ✓ Privacy ✓ | Safety ✓ Privacy ✓ | Safety ✓ Privacy ✓ | Safety ✓ Privacy ✓ |
| Brand | — | — | — | |
| Category | statuslines | statuslines | statuslines | statuslines |
| Source | source-backed | source-backed | source-backed | source-backed |
| Author | JSONbored | JSONbored | JSONbored | MkDev11 |
| Added | 2025-10-19 | 2025-10-25 | 2025-10-25 | 2026-06-04 |
| Platforms | Claude Code | Claude Code | Claude Code | Claude Code |
| Source repo | — | — | — | — |
| Safety notes | ✓Runs as a Claude Code statusline command on every refresh and depends on the local shell environment; a failure only affects status rendering, not your session. | ✓Configured as a command-type statusline, so the script runs automatically on every status update. The Examples "Installation" script writes .claude/statuslines/api-latency-breakdown.sh and edits .claude/settings.json, and runs brew/apt-get/yum to install bc. | ✓Runs as a Claude Code statusline command on every refresh and depends on the local shell environment; a failure only affects status rendering, not your session. | ✓Context percentage is only as accurate as the configured limit and the usage fields available in the statusline input. Use the warning as a cue to summarize or checkpoint work before context pressure affects reasoning quality. Do not treat a low percentage as proof that all relevant files, instructions, or tool results are still in scope. |
| Privacy notes | ✓Reads the Claude Code statusline JSON from stdin (model, workspace path, token usage) and renders it in the local terminal; it does not send data off-machine. | ✓The Examples "Enhanced P95" variant appends every measured network time to /tmp/claude_latency_history.txt, leaving session timing data on disk until manually cleared. | ✓Reads the Claude Code statusline JSON from stdin (model, workspace path, token usage) and renders it in the local terminal; it does not send data off-machine. | ✓The script reads local session counters and does not inspect prompt text, files, or transcript contents. Token counts and configured limits can still reveal workload size in screenshots or shared terminal logs. Teams should avoid placing customer names or project identifiers in shell variables that appear in debugging output. |
| Prerequisites |
|
|
|
|
| Install | — | — | — | — |
| Config | | | | |
| Citations | ||||
| Claim | Unclaimed | Unclaimed | Unclaimed | Unclaimed |
Source-backed guides for putting this to work.
Write a claude-code-hint tag to stderr under CLAUDECODE, and Claude Code prompts users once to install your official-marketplace plugin.
Loading live community signals…
A short, calm digest of reviewed Claude resources. Unsubscribe any time.