MCPcopy
hub / github.com/bcicen/ctop

github.com/bcicen/ctop @v0.7.7 sqlite

repository ↗ · DeepWiki ↗ · release v0.7.7 ↗
529 symbols 1,185 edges 60 files 100 documented · 19%
README

ctop

release homebrew macports

Top-like interface for container metrics

ctop provides a concise and condensed overview of real-time metrics for multiple containers:

ctop

as well as a single container view for inspecting a specific container.

ctop comes with built-in support for Docker and runC; connectors for other container and cluster systems are planned for future releases.

Install

Fetch the latest release for your platform:

Debian/Ubuntu

Maintained by a third party

echo "deb http://packages.azlux.fr/debian/ buster main" | sudo tee /etc/apt/sources.list.d/azlux.list
wget -qO - https://azlux.fr/repo.gpg.key | sudo apt-key add -
sudo apt update
sudo apt install docker-ctop

Arch

ctop is available for Arch in the AUR

Linux (Generic)

sudo wget https://github.com/bcicen/ctop/releases/download/0.7.6/ctop-0.7.6-linux-amd64 -O /usr/local/bin/ctop
sudo chmod +x /usr/local/bin/ctop

OS X

brew install ctop

or

sudo port install ctop

or

sudo curl -Lo /usr/local/bin/ctop https://github.com/bcicen/ctop/releases/download/0.7.6/ctop-0.7.6-darwin-amd64
sudo chmod +x /usr/local/bin/ctop

Docker

docker run --rm -ti \
  --name=ctop \
  --volume /var/run/docker.sock:/var/run/docker.sock:ro \
  quay.io/vektorlab/ctop:latest

Building

Build steps can be found here.

Usage

ctop requires no arguments and uses Docker host variables by default. See connectors for further configuration options.

Config file

While running, use S to save the current filters, sort field, and other options to a default config path (~/.config/ctop/config on XDG systems, else ~/.ctop).

Config file values will be loaded and applied the next time ctop is started.

Options

Option Description
-a show active containers only
-f <string> set an initial filter string
-h display help dialog
-i invert default colors
-r reverse container sort order
-s select initial container sort field
-v output version information and exit

Keybindings

Key Action
<ENTER> Open container menu
a Toggle display of all (running and non-running) containers
f Filter displayed containers (esc to clear when open)
H Toggle ctop header
h Open help dialog
s Select container sort field
r Reverse container sort order
o Open single view
l View container logs (t to toggle timestamp when open)
e Exec Shell
c Configure columns
S Save current configuration to file
q Quit ctop

Alternatives

See Awesome Docker list for similar tools to work with Docker.

Extension points exported contracts — how you extend this code

WidgetUpdater (Interface)
(no doc) [6 implementers]
cwidgets/main.go
LogCollector (Interface)
(no doc) [5 implementers]
connector/collector/main.go
Manager (Interface)
(no doc) [4 implementers]
connector/manager/main.go
Connector (Interface)
(no doc) [3 implementers]
connector/main.go
CompactCol (Interface)
(no doc) [3 implementers]
cwidgets/compact/column.go
MenuFn (FuncType)
MenuFn executes a menu window, returning the next menu or nil
menus.go
ToggleText (Interface)
(no doc) [2 implementers]
widgets/view.go
Collector (Interface)
(no doc) [3 implementers]
connector/collector/main.go

Core symbols most depended-on inside this repo

Buffer
called by 30
cwidgets/compact/row.go
HandleKeys
called by 23
keys.go
SetMeta
called by 19
cwidgets/main.go
GetMeta
called by 16
container/main.go
Len
called by 12
cursor.go
Loop
called by 12
connector/mock.go
Clear
called by 11
cwidgets/compact/grid.go
MaxRows
called by 11
cwidgets/compact/grid.go

Shape

Method 289
Function 161
Struct 62
Interface 8
TypeAlias 5
FuncType 4

Languages

Go100%

Modules by API surface

cwidgets/compact/text.go30 symbols
cwidgets/compact/row.go20 symbols
connector/docker.go20 symbols
cwidgets/compact/gauge.go18 symbols
container/main.go16 symbols
widgets/menu/main.go15 symbols
connector/runc.go15 symbols
menus.go14 symbols
logging/main.go14 symbols
cwidgets/compact/grid.go14 symbols
connector/mock.go14 symbols
connector/manager/docker.go13 symbols

Dependencies from manifests, versioned

github.com/c9s/goprocinfov0.0.0-2017060900154 · 1×
github.com/gizak/termuiv2.3.0+incompatible · 1×
github.com/jgautheron/codename-generatorv0.0.0-2015082920320 · 1×
github.com/mattn/go-runewidthv0.0.0-2017020102354 · 1×
github.com/mitchellh/go-wordwrapv0.0.0-2015031417033 · 1×
github.com/nsf/termbox-gov0.0.0-2018030315245 · 1×
github.com/nu7hatch/gouuidv0.0.0-2013122120053 · 1×
github.com/op/go-loggingv0.0.0-2016021121215 · 1×
github.com/pkg/browserv0.0.0-2020120709591 · 1×

For agents

$ claude mcp add ctop \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact