A real-time machine-stats CLI dashboard with a JSON export API
Project description
minit-cli
A cross-platform (Ubuntu & Windows) real-time machine-stats CLI tool with a JSON export API.
Features
| Feature | Details |
|---|---|
| Per-core CPU | Usage % for every logical core + overall average, physical/logical count, frequency |
| Memory | Virtual RAM and swap utilisation (MB, %) |
| Disk space | Per-partition used/free/total (GB, %) for all mounted filesystems |
| Disk I/O | Cumulative read/write bytes and operation counts per disk |
| Network | Per-NIC bytes sent/received, packet counts, errors and drops |
| Process list | Top-N processes sorted by CPU %, with PID, name, user, status, CPU%, Mem% |
| Real-time dashboard | Full-screen terminal dashboard via rich, refreshed every 2 s |
| JSON export API | FastAPI server exposing last 10 minutes of snapshots at GET /stats |
Install from PyPI
pip install minit-cli
minit dashboard
Requirements: Python 3.9+ on Ubuntu/Debian or Windows 10/11.
Local setup
# 1. Clone the repo
git clone https://github.com/vamsi-ehc/minit-cli
cd minit-cli
# 2. (Recommended) Create and activate a virtual environment
python -m venv .venv
source .venv/bin/activate # Linux / macOS
# .venv\Scripts\activate # Windows
# 3. Install dependencies
pip install -r requirements.txt
# 4. Install the package in editable mode
pip install -e .
# 5. Verify the CLI is available
minit --help
Run tests
pytest
Commands
minit dashboard
Launch the full-screen real-time terminal dashboard (press Ctrl-C to quit).
minit dashboard # default: refresh every 2 s
minit dashboard --refresh 5 # refresh every 5 s
minit serve
Start the JSON export API server. Stats are collected in the background and kept
for 10 minutes (configurable via --interval).
minit serve # http://127.0.0.1:8000
minit serve --host 0.0.0.0 --port 9000 --interval 5
Endpoints:
| Method | Path | Description |
|---|---|---|
GET |
/health |
Liveness probe |
GET |
/stats |
All snapshots from the last 10 minutes (JSON array) |
GET |
/stats/latest |
Most recent snapshot (JSON object) |
Interactive API docs are available at http://<host>:<port>/docs.
minit stats
Print a one-shot JSON snapshot to stdout (useful for scripting).
minit stats # compact JSON
minit stats --pretty # indented JSON
Publishing to PyPI
Prerequisites
pip install build twine
1. Bump the version
Edit pyproject.toml and update the version field:
[project]
version = "0.2.0" # increment as needed
2. Build the distribution
python -m build
This produces dist/minit_cli-<version>-py3-none-any.whl and dist/minit_cli-<version>.tar.gz.
3. Upload to PyPI
# Upload to the real PyPI index
twine upload dist/*
You will be prompted for your PyPI username and password (or an API token — recommended). To use an API token, set your credentials once:
# ~/.pypirc (create if it doesn't exist)
[pypi]
username = __token__
password = pypi-<your-api-token>
Or pass the token inline:
twine upload -u __token__ -p pypi-<your-api-token> dist/*
4. Test on TestPyPI first (optional but recommended)
twine upload --repository testpypi dist/*
pip install --index-url https://test.pypi.org/simple/ minit-cli
5. Verify the published package
pip install minit-cli # install from PyPI
minit --help
minit dashboard
Project layout
minit_cli/
cli.py # Click CLI entry point
collectors/
cpu.py # Per-core CPU stats (psutil)
memory.py # RAM + swap stats
disk.py # Disk space + I/O
network.py # Per-NIC network stats
processes.py # Top-N process list
dashboard/
live.py # Rich live dashboard
api/
server.py # FastAPI application
store.py # Thread-safe 10-min rolling buffer
tests/
test_collectors.py
test_store.py
test_server.py
test_cli.py
Project details
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 minit_cli-0.1.0.tar.gz.
File metadata
- Download URL: minit_cli-0.1.0.tar.gz
- Upload date:
- Size: 13.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ac1dc233e27a5838815718a2ad621d4a42f4596bad8a57b549ceaefffd967186
|
|
| MD5 |
7d39186d771a81f30fdbb450f22a2289
|
|
| BLAKE2b-256 |
980f8a1890990cd009e5532ed2402ed348fe0377111c7b7345ab8cab97454f2a
|
Provenance
The following attestation bundles were made for minit_cli-0.1.0.tar.gz:
Publisher:
publish.yml on vamsi-ehc/minit-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
minit_cli-0.1.0.tar.gz -
Subject digest:
ac1dc233e27a5838815718a2ad621d4a42f4596bad8a57b549ceaefffd967186 - Sigstore transparency entry: 1114955918
- Sigstore integration time:
-
Permalink:
vamsi-ehc/minit-cli@ede7040604d6dc611caa206b7bacc5e013dcf15e -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/vamsi-ehc
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ede7040604d6dc611caa206b7bacc5e013dcf15e -
Trigger Event:
push
-
Statement type:
File details
Details for the file minit_cli-0.1.0-py3-none-any.whl.
File metadata
- Download URL: minit_cli-0.1.0-py3-none-any.whl
- Upload date:
- Size: 13.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c26dcf80f4df2f2e4caefbab9665bcef61fcaca5a56e70430e0666a62c1295f4
|
|
| MD5 |
77487838315465338568bdaf71e69958
|
|
| BLAKE2b-256 |
f1aa63b429454cf6b2ba32fba8d4427dd13f9c8559c855ba6ecc97ac6264e1cd
|
Provenance
The following attestation bundles were made for minit_cli-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on vamsi-ehc/minit-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
minit_cli-0.1.0-py3-none-any.whl -
Subject digest:
c26dcf80f4df2f2e4caefbab9665bcef61fcaca5a56e70430e0666a62c1295f4 - Sigstore transparency entry: 1114955955
- Sigstore integration time:
-
Permalink:
vamsi-ehc/minit-cli@ede7040604d6dc611caa206b7bacc5e013dcf15e -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/vamsi-ehc
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ede7040604d6dc611caa206b7bacc5e013dcf15e -
Trigger Event:
push
-
Statement type: