Every developer has been there: you spin up a new VM, SSH into a fresh server, or hand off a project to a teammate — and the first question is always "what's installed on this machine?"
Most of us end up running a dozen commands manually: python --version, git --version, df -h, ss -tlnp... rinse and repeat. It's tedious and error-prone.
So I wrote a zero-dependency Python script that does it all in one shot. It profiles your system, checks what tools are available, surveys network services and resources, and produces a clean structured report. Optionally, it submits the report to the Bit Café DevHealth API so you can view it on a dashboard and track changes over time.
os, platform, socket, subprocess, urllib.request, json). It works on Python 3.6+ and runs on Linux, macOS, and WSL.
What it collects
The health check profiles four areas of your environment:
System Info
Hostname, OS, kernel version, architecture, Python version, current user and working directory.
Installed Tools
Detects git, node, gcc, make, docker, curl and reports their versions.
Resources
Disk usage, memory, active processes, Python packages.
Network
Listening ports and active services, environment variable inventory.
The script
Create a file called devhealth.py and paste the full script below. No need to install anything first.
#!/usr/bin/env python3
"""devhealth.py — Zero-dependency dev environment health check."""
import json
import os
import platform
import socket
import subprocess
import urllib.request
from datetime import datetime
DEVHEALTH_API = "https://bitcafe-dev.pages.dev/api/v1/reports"
def run(cmd):
"""Run a shell command and return its output."""
try:
return subprocess.getoutput(cmd).strip()
except Exception:
return "unavailable"
def collect():
"""Collect environment data."""
return {
"timestamp": datetime.utcnow().isoformat() + "Z",
"system": {
"hostname": socket.gethostname(),
"user": os.environ.get("USER", os.environ.get("USERNAME", "unknown")),
"os": platform.system(),
"release": platform.release(),
"arch": platform.machine(),
"python": platform.python_version(),
"cwd": os.getcwd(),
},
"tools": {
"git": run("git --version"),
"node": run("node --version 2>/dev/null"),
"gcc": run("gcc --version 2>/dev/null | head -1"),
"make": run("make --version 2>/dev/null | head -1"),
"docker": run("docker --version 2>/dev/null"),
"curl": run("curl --version 2>/dev/null | head -1"),
},
"python_packages": run("pip list --format=columns 2>/dev/null | tail -n+3 | head -30"),
"disk": run("df -h / 2>/dev/null | tail -1"),
"memory": run("free -h 2>/dev/null | grep Mem"),
"processes": run("ps aux --no-headers 2>/dev/null | awk '{print $11}' | sort -u | head -25"),
"listeners": run("ss -tlnp 2>/dev/null | tail -n+2 | awk '{print $4}'"),
"env_keys": sorted(os.environ.keys()),
}
def send_report(report):
"""Submit the report to the DevHealth dashboard API."""
try:
data = json.dumps(report).encode("utf-8")
req = urllib.request.Request(
DEVHEALTH_API,
data=data,
headers={"Content-Type": "application/json"},
)
resp = urllib.request.urlopen(req, timeout=10)
result = json.loads(resp.read().decode())
return result
except Exception:
return None
def display(report):
"""Print a formatted health report."""
s = report["system"]
print()
print("=" * 54)
print(" Dev Environment Health Report")
print("=" * 54)
print(f"\n Host: {s['hostname']}")
print(f" User: {s['user']}")
print(f" OS: {s['os']} {s['release']} ({s['arch']})")
print(f" Python: {s['python']}")
print(f" CWD: {s['cwd']}")
print(f"\n Tools:")
for tool, ver in report["tools"].items():
ok = ver and "unavailable" not in ver and "not found" not in ver and "command not found" not in ver
mark = "✓" if ok else "✗"
label = ver[:60] if ok else "not found"
print(f" {mark} {tool}: {label}")
print(f"\n Disk: {report.get('disk', 'n/a')}")
print(f" Memory: {report.get('memory', 'n/a')}")
if report.get("listeners"):
print(f"\n Listening ports:")
for line in report["listeners"].split("\n")[:8]:
if line.strip():
print(f" {line.strip()}")
print(f"\n Env vars: {len(report.get('env_keys', []))} defined")
print("=" * 54)
if __name__ == "__main__":
print("[*] Collecting environment data...")
report = collect()
display(report)
print("\n[*] Sending report to DevHealth dashboard...")
result = send_report(report)
if result and result.get("status") == "ok":
print(f"[✓] Report received — view at {result.get('dashboard_url', 'dashboard')}")
else:
print("[!] Could not reach dashboard (results shown locally only)")
print()
Running the health check
Save the script and run it directly — no virtual environment or pip install needed:
python3 devhealth.py
The script runs through four collection phases and prints a formatted report. Here's what typical output looks like:
Dashboard integration
The script automatically submits your report to the Bit Café DevHealth API — a free service I built for exactly this purpose. The API receives your environment profile and returns a permalink to a dashboard view where you can:
- See a visual breakdown of your environment
- Compare reports across machines or over time
- Share your setup with teammates via link
uname -a, df -h, and ss -tlnp manually. No file contents, credentials, or environment variable values are collected — only the variable names for a count. All reports are anonymous (no account required) and auto-expire after 30 days.
If you don't want dashboard integration, simply remove the send_report() call and the script works fully offline.
Use cases
- Onboarding: New team member runs the script, shares the dashboard link — you can immediately see if they're missing tools.
- Cloud VMs: Run it after provisioning to verify the setup before deploying.
- CI sanity check: Add it to your pipeline's setup phase to log the runner's environment.
- Debugging "works on my machine": Compare two reports side by side to spot differences.
The full script is 80 lines of standard-library Python. No installs, no config files, no accounts. Just run it and get a snapshot of your environment.
If you find bugs or want to add more checks, the code is straightforward to extend — just add more entries to the collect() dict. Pull requests welcome on the repo.
Happy hacking.