Overview
Proxy for Docker CLI with token-optimized output. Compacts container lists, image names, and log output.Syntax
Subcommands
rtk docker ps
List containers with compact output.Show all containers (default shows just running)
rtk docker images
List images with shortened names.rtk docker logs
Deduplicated log output.Follow log output
Number of lines to show from end
- Deduplicates repeated log lines (shows count)
- Strips timestamps and container IDs
- Groups similar messages
Examples
List Running Containers
View Recent Logs
List All Images
Implementation
Source:src/container.rs
Optimizations
- Port compaction:
:8080→80instead of full0.0.0.0:8080->80/tcp - Image shortening:
nginx:latestinstead of full SHA - Status icons:
✅running,⏹️stopped,🔄restarting - Time formatting:
10hinstead of verbose timestamps
Related Commands
- rtk kubectl - Kubernetes operations
- rtk log - Log filtering
Token Savings Summary
| Command | Standard | RTK | Savings |
|---|---|---|---|
ps | ~600 tokens | ~180 tokens | 70% |
images | ~450 tokens | ~160 tokens | 65% |
logs | ~2000 tokens | ~400 tokens | 80% |
