ak-cli
A small CLI I built for my own server management needs — quick answers to "what's using the RAM", "is this port open", "how full is the disk", without reaching for a full monitoring stack. Sharing it in case it's useful to someone else too.
Every command works both as a direct CLI call and from an interactive menu,
so you can script it or just run ak and pick from a list.
Features
| Command | Description |
|---|---|
system-info |
OS, architecture, Python version, hostname |
disk-usage |
Usage for every mounted disk/partition |
network-info |
IPv4 address of every network interface |
memory-info |
RAM and swap usage |
cpu-info |
Core count, current usage, frequency |
process-list |
Top processes by memory usage |
uptime |
System boot time and uptime |
users |
Currently logged-in users |
port-check |
Check whether a TCP port on a host is open |
backup-init |
Create a backup config template |
backup |
Archive configured folders and send to Telegram |
Requirements
- Python 3.10+
Installation
Clone the repo and install it in a virtual environment. uv is recommended:
git clone https://github.com/AmirKenzo/ak-cli.git
cd ak-cli
uv sync
uv run ak
Or with plain pip:
git clone https://github.com/AmirKenzo/ak-cli.git
cd ak-cli
python -m venv .venv
.venv/Scripts/activate # on Linux/macOS: source .venv/bin/activate
pip install -e .
ak
Usage
Running ak with no arguments opens the interactive menu:
ak
Every command is also available directly, which is handy for scripts and one-liners:
ak system-info
ak disk-usage
ak memory-info
ak cpu-info
ak process-list --limit 5
ak port-check example.com 443
ak uptime
ak users
Backups
ak backup archives a configured list of folders (defaults to
/opt/pasarguard and /var/lib/pasarguard, e.g. for a Pasarguard panel) into
a .tar.gz and sends it to a Telegram chat via Telethon.
ak backup-init # interactive wizard: prompts for paths + telegram, saves to ~/.config/ak/backup.json
ak backup # archive configured paths and send to Telegram
ak backup --keep # also save the archive in the current directory
If you skip backup-init and just run ak backup in a terminal, it prompts
you for the Telegram bot token/chat ID on the spot (and offers to save them)
instead of failing. api_id/api_hash default to Telegram Desktop's public
API credentials if left unset, so only bot_token and chat_id are needed.
Config can also be provided entirely via environment variables — useful for
cron/systemd, where there's no terminal to prompt on:
AK_BACKUP_PATHS (comma-separated), AK_TG_API_ID, AK_TG_API_HASH,
AK_TG_BOT_TOKEN, AK_TG_CHAT_ID, and AK_BACKUP_CONFIG to point at a
non-default config file location.
Roadmap
- Scheduled (cron) backup runs
- Including database dumps alongside the folder backups
License
MIT — see LICENSE.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file akctl-0.1.4.tar.gz.
File metadata
- Download URL: akctl-0.1.4.tar.gz
- Upload date:
- Size: 14.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a10346ab7938c5d971d3370c264afb2d40157874a90a4a98b9ae0d8aa538594b
|
|
| MD5 |
5b82b1825558b735f598887f961ea3ed
|
|
| BLAKE2b-256 |
19a9577563cc7f08d84f83c34756d441fe670e6580ad989bcf65d439a8b5ba15
|
File details
Details for the file akctl-0.1.4-py3-none-any.whl.
File metadata
- Download URL: akctl-0.1.4-py3-none-any.whl
- Upload date:
- Size: 10.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fb90cb8e24eb6af7cc6c762c441258c29dad146ceb91d8fb98742920cf1130a8
|
|
| MD5 |
b766bca5869c1a74cd9485b63d2f64c6
|
|
| BLAKE2b-256 |
b6dda1b1f93336006c40c710561c2c55cbc9aca5977a9990e0aca582c93a9844
|