A container management TUI with deep runtime introspection capabilities. Supports containerd, CRI-O, Docker (Classic / containerd image store), and Docker Desktop on macOS.
- Container List: ID, name, image, status, uptime, Pod association
- Container Tree View: Hierarchical display of Pod and container relationships
- Container Detail Pages:
- Summary (status, PID, start time, restart count)
- Environment variables (with Kubernetes annotations)
- Process Top view (CPU, memory, RSS real-time monitoring)
- Process tree (hierarchical process relationships)
- Process list (detailed information)
- Mount browser (with source tracking and status markers)
- Image layers viewer (snapshots, compression info, disk usage)
- Network info (CNI, DNS, port mappings, multiple IPs)
- Runtime info (OCI config, runc state, CRI metadata)
- Storage info (writable layer, snapshot usage)
- Image List: Name, digest, size, creation time
- Image Details: Tags, config, content path
- Image Layer Analysis:
- Layer structure visualization
- Compressed/uncompressed digests
- Snapshot storage status
- Disk usage statistics
- Container layer overlay display
- Pod List: Name, namespace, UID, container count
- Pod Association: Bidirectional navigation between containers and Pods
- CRI Metadata Integration: Mounts, network, and state info from CRI
- Mount Source Tracking:
cri: CRI-configured mountsruntime-default: Runtime default mountslive-extra: Runtime dynamically added mounts
- Mount Status:
declared+live/declared-only/live-only - CNI Network Details: Interfaces, routes, DNS, port mappings
- Process Resource Monitoring: CPU usage, memory RSS, memory percentage
Download the binary for your platform from the latest release:
| Platform | File |
|---|---|
| Linux amd64 | cray-linux-amd64 |
| Linux arm64 | cray-linux-arm64 |
| macOS Intel | cray-darwin-amd64 |
| macOS Apple Silicon | cray-darwin-arm64 |
# Replace <file> with the filename matching your platform
curl -fsSL -o /usr/local/bin/cray \
https://github.com/icebergu/c-ray/releases/latest/download/<file>
chmod +x /usr/local/bin/craygit clone https://github.com/icebergu/c-ray.git && cd c-ray
make build# Start TUI (default, auto-detect runtime)
cray
# Or explicitly specify
cray tuiOther commands
# If auto-detection fails, specify socket explicitly
cray -socket /run/containerd/containerd.sock
# Specify containerd
cray -socket /run/containerd/containerd.sock -namespace k8s.io
# Common pattern for plain containerd
cray -socket /run/containerd/containerd.sock -namespace default
# Specify CRI-O
cray -socket /run/crio/crio.sock
# Specify Docker
cray -socket /var/run/docker.sock
# Full options
cray -socket /run/containerd/containerd.sock -namespace k8s.io -timeout 30Suitable for non-interactive environments (CI/CD, remote execution):
# Container operations
cray test list-containers
cray test container-detail <container-id>
cray test container-processes <container-id>
cray test container-top <container-id>
cray test container-mounts <container-id>
cray test container-layers <container-id>
# Image operations
cray test list-images
cray test image-detail <image-ref>
cray test image-layers <image-id>
# Pod operations
cray test list-pods| Key | Action |
|---|---|
Up/Down or j/k |
Navigate list |
Enter |
Enter detail / Select |
Esc or q |
Go back / Exit |
Tab |
Switch view tabs |
1-9 |
Quick switch detail page tabs |
r |
Refresh data |
/ |
Search / Filter |
# Use test script
./scripts/test-in-kind.sh
# Manually copy to kind node
GOOS=linux GOARCH=arm64 go build -o bin/cray-linux ./cmd/cray
cat bin/cray-linux | docker exec -i kind-control-plane bash -c "cat > /usr/local/bin/cray && chmod +x /usr/local/bin/cray"
docker exec kind-control-plane cray test list-containersc-ray connects to multiple container runtimes through a unified abstraction layer. It automatically detects available sockets and selects the backend in this order: CRI-O, CRI-enabled containerd, Docker, and finally plain containerd. If all detection fails, it will error out and prompt you to use -socket or CRAY_SOCKET to specify explicitly.
| Runtime | Socket Path | Data Source | Notes |
|---|---|---|---|
| containerd | /run/containerd/containerd.sock |
containerd API + CRI | Native containerd with namespace isolation, suitable for Kubernetes nodes |
| CRI-O | /run/crio/crio.sock |
containers/storage + CRI | Uses containers/storage library for direct storage metadata access, CRI supplements runtime state |
| Docker (Classic) | /var/run/docker.sock |
Docker Engine API | Traditional Docker graphdriver mode (overlay2, etc.) |
| Docker (containerd) | /var/run/docker.sock |
Docker Engine API + containerd | Delegates image operations to containerd when containerd snapshotter is detected |
| Docker Desktop (macOS) | N/A (via launcher bridge) | Docker socket inside Docker Desktop VM | On macOS, uses a launcher to execute Linux binary via chroot in a Docker container |
Issues and Pull Requests are welcome!
MIT License

