Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

z9s

A terminal UI for Zerops - think k9s, but for your Zerops projects. Live service statuses, streaming logs, one-key ops actions, and metric sparklines, all in the terminal.

It runs on nothing but your zcli login - no internal APIs, no extra setup.

Install

git clone https://github.com/0xsouravm/z9s && cd z9s
cargo install --path .

Requires the Zerops CLI on your PATH and a login:

curl -L https://zerops.io/zcli/install.sh | sh
zcli login <access-token>

Then just:

z9s

Keys

Key Action
j / k / Up Down move between services
enter / l (re)tail the selected service
r refresh services now (also auto-refreshes every 5s)
s / S / x start / stop / restart
d deploy (zcli push from the current dir, streams build log)
D delete service (or project, on a project row) - type name to confirm
w enable Zerops subdomain
e view the service's env vars
F browse the service's files (ssh - needs the VPN)
/ filter logs (esc clears) / f clears
p pause / resume log follow
wheel, Ctrl-U / Ctrl-D scroll logs / half-page
g / G jump to top / bottom
c clear the log view
? help / q quit

Browsing files

F on a service opens a file browser: enter into directories, enter a file to view it, h / Left to go up. It shells in over SSH (ssh <service> ls/cat), so it needs the project VPN up:

zcli vpn up <projectId>

Without it you'll get a "VPN up?" message instead of a listing.

What runs on what

Everything except metrics works with just your access token, over the public API zcli already uses:

  • statuses + tree - zcli project/service list, refreshed every 5s
  • logs - zcli service log --follow --format JSONSTREAM, severity-colored
  • actions - zcli service start/stop/enable-subdomain
  • env - zcli project env, filtered to the selected service

Metrics (CPU / RAM / disk sparklines) scrape each service's Prometheus port (:9630) over the project's private network, so they need the VPN up:

zcli vpn up <projectId>

Without it, the metrics panel just says so and everything else keeps working.

The data layer currently shells out to zcli and parses its table output - pragmatic and dependency-free, but a future version should move to the REST API directly (same token) to be sturdier and faster.

About

A k9s-style terminal UI for Zerops - live service statuses, streaming logs, one-key ops actions, and metric sparklines, all from your zcli login.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages