Open Source / Shizuku · Myaku · sysinfo
Open Source · Python CLI

Sysinfo System Report.

User, machine, public and local IP, listening ports, known SSH hosts and running containers.

Python ≥ 3.8 Standard library only Linux · macOS MIT
$ curl -sSL https://devexploris.com/sysinfo/install.sh | bash
01 — Introduction

Five commands in one

A single Python file. It runs on any machine with python3 and replaces the five commands below.

Need Usual command sysinfo
User, machine, OS whoami · hostname · uname -a -a
Public and local IP curl ifconfig.me · ip addr -l --local-ip
Listening ports ss -tulpn --ports
Known SSH hosts cat ~/.ssh/config --ssh
Containers and networks docker ps · docker network ls --docker
$ sysinfo -a -c
 
👤 Utilisateur - obiwan_kenobi
🖥️ Machine - faucon-millenium · Linux 7.0.0
⏱ Uptime - 6h 42m
🌍 IP publique - 66.66.66.66 · Coruscant, OR66
🔌 Ports - TCP 0.0.0.0:5432 · TCP 127.0.0.1:8000
🐳 Docker - 3 containers · 2 networks
$
Zero dependency
One sysinfo.py file, to copy wherever needed.
Lines or table
Lines or table (-t), plus an interactive mode with tabs (-i).
Verified updates
--update checks the SHA256 and replaces the binary atomically.
02 — Installation

Two ways

01 — curl | bash

$ curl -sSL https://devexploris.com/sysinfo/install.sh | bash

Checks python3 and curl, verifies the shebang and the SHA256, installs in ~/.local/bin/sysinfo, and prints the $PATH line to add if needed.

02 — Manual

mkdir -p ~/.local/bin
cp sysinfo.py ~/.local/bin/sysinfo
chmod +x ~/.local/bin/sysinfo
export PATH="$HOME/.local/bin:$PATH"   # si pas déjà dans le PATH
Verifiable checksum:
curl -sSL https://devexploris.com/sysinfo/sysinfo.py -o sysinfo.py
curl -sSL https://devexploris.com/sysinfo/sysinfo.py.sha256 -o sysinfo.py.sha256
sha256sum -c sysinfo.py.sha256   # shasum -a 256 sur macOS
03 — Commands

Available flags

Flags compose: each one adds its block to the output. -a turns them all on.

01 — System

Flag Output
-a, --allEvery block available
-4, --ipv4IPv4 address of the outbound network interface
-g, --groupsGroups the current user belongs to
-u, --uptimeMachine uptime, read from /proc/uptime. Linux only

02 — Network

Flag Output
-l, --locationPublic IP + city/country via ipinfo.io, fallback ip-api.com
--local-ipLAN address, without external call
--vpnVPN / proxy / hosting detection (heuristic, see limitations)
--portsListening ports via ss, falling back to netstat

03 — SSH · Docker

Flag Output
--sshHosts declared in ~/.ssh/config, with user and hostname
--dockerRunning containers and Docker networks, via the docker CLI
Combining:
sysinfo -l --vpn          # localisation + détection VPN
sysinfo --local-ip -4     # IP locale et IPv4 réseau
sysinfo -a -t             # tout, sous forme de tableau
sysinfo --ssh --docker    # hosts SSH et containers
04 — Output modes

In lines, or in a table

By default, one line per info. -t renders the same data as a two-column table, fitted to the terminal width. -c adds color, -i opens the interactive mode.

(default)One line per info
-t, --tableTwo-column table
-c, --colorANSI colors
-i, --interactiveNavigable tabs, see below
-h, --helpFlags and examples
Table output: Info and Value columns
sysinfo -l -t
05 — Interactive mode

Five navigable tabs

$ sysinfo -i

Built with curses. Each tab caches its result in memory; r forces a fresh fetch.

Interactive mode, System tab
sysinfo -i

Keyboard

Key Action
← → · TabSwitch tab
rRefresh the current tab (invalidates its cache)
q · ÉchapQuit
06 — Security

Checksum and permissions

The script is published with its SHA256: install.sh and --update check it, and it can be checked by hand. The script does not call sudo.

sha256sum -c sysinfo.py.sha256   # shasum -a 256 sur macOS

Permissions

Feature Without sudo With sudo
System · network · SSH Full output No difference
--ports Other users' processes shown as N/A All processes visible
--docker Error message if not in the docker group Works
--update Suggests sudo if installed in a system directory Works
07 — Update

What --update does

$ sysinfo --update
✓ Checksum vérifié
✓ sysinfo mis à jour
01
Download
02
SHA256
03
Compare
04
os.replace()
01The remote script is downloaded to a temporary file.
02Its SHA256 is verified against the published checksum. If they differ, nothing is written.
03The remote checksum is compared to the installed file's. If they match, the script is already up to date.
04os.replace() swaps the file atomically: an interrupted update leaves no half-written script.
Install path: resolved via shutil.which() when the script is launched through the $PATH, so --update works from any install directory.
08 — Limitations

External API and uptime

--vpn Relies on an external API call: a rate limit can be reached.
-u, --uptime Linux only.