Skip to main content

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.
flag
Show all containers (default shows just running)
Output:
Token savings: 70%

rtk docker images

List images with shortened names.
Output:
Token savings: 65%

rtk docker logs

Deduplicated log output.
flag
Follow log output
number
Number of lines to show from end
Features:
  • Deduplicates repeated log lines (shows count)
  • Strips timestamps and container IDs
  • Groups similar messages
Token savings: 80%

Examples

List Running Containers

View Recent Logs

List All Images

Implementation

Source: src/container.rs

Optimizations

  • Port compaction: :8080→80 instead of full 0.0.0.0:8080->80/tcp
  • Image shortening: nginx:latest instead of full SHA
  • Status icons: ✅ running, ⏹️ stopped, 🔄 restarting
  • Time formatting: 10h instead of verbose timestamps

Token Savings Summary