mikrus is a CLI app for MIKRUS VPS. It allows you to:
- show information about your server
- list provisioned servers
- restart your server
- check last log messages
- boost your server performance by turning on Amfetamina functionality
- show config for your DB(s) (Postgres, MySQL)
- execute remote commands on your server
- show usage / resource utilization statistics
- show ports assigned to your server
- show cloud functions assigned to your account (including stats)
- add / change domain assigned to your server
Install the client binary
go install github.com/qba73/mikrus/cmd/mikctl@latestTo see help on using the client, run:
mikctl -hTo use the client with your Mikrus account, you will need the API Key and Server ID provisioned in your Mikrus account. Go to the Mikrus page, sign up for the service. When your account is ready, go to the panel page and get your server ID and corresponding API key.
There are three ways to pass your API key to the client: in a config file, in an environment variable, or on the command line.
The mikctl client will read a config file named .mikrus.yaml (or .mikrus.json, or any other extension that Viper supports) in your home directory, or in the current directory.
For example, you can put your API key and sever ID in the file $HOME/.mikrus.yaml, and mikctl will find and read them automatically (replace XXX with your own API key, and YYY with your server ID):
apiKey: XXX
srvID: YYYmikctl will look for the API key and server ID in an environment variable named MIKRUS_API_KEY and MIKRUS_SRV_ID:
export MIKRUS_API_KEY=XXX
export MIKRUS_SRV_ID=YYY
mikctl ...You can also pass your API key and server ID to the mikctl client using the --apiKey and --srvID flags like this:
mikctl --apiKey XXX --srvID YYYTo test that your API key is correct and mikctl is reading it properly, run:
mikctl serveror
mikctl --srvID YYY --apiKey XXX serverThe mikctl server command will list information about your server:
mikctl --srvID XXX --apiKey YYY server
ServerID: j230
Server name:
Expiration date: 2026-06-08 00:00:00
Cytrus expiration date:
Storage expiration date:
RAM size: 1024
Disk size: 10
Last log time: 2024-06-07 09:06:35
Is Pro service: nieThe mikctl servers command will list basic information about your provisioned servers:
mikctl --srvID XXX --apiKey YYY servers
Server ID: a135
Server name:
Expiration date: 2025-06-05 00:00:00
RAM size: 1024
ParamDisk: 10
Server ID: j330
Server name:
Expiration date: 2026-06-08 00:00:00
RAM size: 1024
ParamDisk: 10The mikctl logs command will list last ten (max) log messages:
mikctl --srvID j230 --apiKey XXX logs
ID: 3756
Server ID: j230
Task: sshkey
Created: 2024-06-07 09:06:58
Done: 2024-06-07 09:07:01
Output: Uploaded SSH key
ID: 3751
Server ID: j230
Task: restart
Created: 2024-06-05 09:57:54
Done: 2024-06-05 09:58:07
Output: OK
ID: 3749
Server ID: j230
Task: password
Created: 2024-06-05 09:16:50
Done: 2024-06-05 09:17:02
Output: OK
ID: 3748
Server ID: j230
Task: upgrade
Created: 2024-06-05 08:59:28
Done: 2024-06-05 09:00:04
Output: === Aktualne parametry: 768 RAM / 10 DYSK 2 / 20 Dodaje: 256MB RAM oraz 0GB dysku Po zmianie: 1024 MB / 10 GB [succes] GOTOWE!If you find a bug in the mikrus client, please open an issue. Similarly, if you'd like a feature added or improved, let me know via an issue.
Not all the functionality of the Mikrus API is implemented yet.
Pull requests welcome!