mikrus VPS CLI written in Rust
- Rust toolchain (1.85+) — install via rustup:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
git clone https://github.com/pwittchen/mikrus-cli.git
cd mikrus-cli
cargo install --path .cargo install --git https://github.com/pwittchen/mikrus-cli.gitThe binary will be installed to ~/.cargo/bin/mikrus.
cargo uninstall mikrus-cliCredentials can come from any of three sources (highest priority first):
- CLI flags / env vars —
--srv/--keyorMIKRUS_SRV/MIKRUS_KEY - Named profile from
~/.mikrus— passed as the first argument (e.g.mikrus marek245 info) - Auto-selected profile — when
~/.mikruscontains exactly one profile
export MIKRUS_SRV=srv12345
export MIKRUS_KEY=your-api-keyOr pass --srv/--key with each command.
Create ~/.mikrus in TOML format:
[servers.marek245]
srv = "srv12345"
key = "your-api-key"
ssh = "ssh root@srv12345.mikr.us -p 12345" # optional, enables `mikrus ssh`
[servers.prod]
srv = "srv67890"
key = "another-api-key"The ssh field is optional. When present, mikrus ssh (or
mikrus <profile> ssh) runs that command via the system shell, so any flags,
ports, or identity files you put in the string are honored.
If only one profile is defined, commands run against it automatically. With multiple profiles, pass the profile name as the first argument:
mikrus marek245 info
mikrus prod stats shortRun mikrus config to see the config file path, configured profiles, and
currently active credentials.
mikrus [PROFILE] [--srv <SRV>] [--key <KEY>] [--json] <COMMAND>Use --json to output raw JSON instead of formatted text.
| Command | Description |
|---|---|
info |
Show server information |
servers |
List all user servers |
restart |
Restart the server |
logs [ID] |
Show log entries (optional: specific log ID) |
logs short |
Show condensed one-line-per-entry log summary (max 100 chars, aligned columns) |
amfetamina |
Performance boost |
db |
Show database credentials |
exec <CMD> |
Execute a command on the server |
stats [--truncate <WIDTH>] [short] |
Show disk/memory/uptime statistics (truncate long lines at WIDTH, adding "..."; 0 = no truncation; short is a shortcut for --truncate 100) |
ports |
Show TCP/UDP ports |
cloud |
Show cloud services & stats |
domain <PORT> [DOMAIN] |
Assign domain to server (omit domain for auto-assignment; available: *.tojest.dev, *.bieda.it, *.toadres.pl, *.byst.re) |
config |
Show config file path, configured profiles, and active credentials |
ssh |
Connect to the server via SSH (uses optional ssh field from profile in ~/.mikrus) |
status |
Show mikr.us infrastructure status from status.mikr.us — colored dots per monitor (green=up, red=down, yellow=pending, blue=maintenance, gray=unknown). Your hosting server is auto-detected by reading the <h1> of <srv>.mikrus.xyz (e.g. srv30.mikr.us); a Your server: … header is printed and the matching monitor is marked with → |
status short |
Print one line per matched user server (e.g. ● srv30 up) — skips the full grid |
cargo build --verbose
cargo test --verbose
cargo runThis repo ships with a Claude Code skill at
.claude/skills/mikrus/SKILL.md. When you
open the repo in Claude Code, the skill teaches the assistant about the
mikrus commands, credential resolution, and profile handling, so you can ask
things like "restart my VPS" or "show mikrus stats short" and Claude will use
the CLI correctly.
/mikrus show my server stats in the ascii table
/mikrus show my server stats in the ascii table and draw some cool ascii charts, but not too many
/mikrus what eats the most memory on my server?
/mikrus show me the logs of the varun.surf app running in the docker container
/mikrus what apps are tunneled via cloudflared?
/mikrus what is hosted on nginx?