Cross-platform system inventory for Linux, macOS, and Windows — modular collectors, granular redaction, and JSON / YAML / XML / HTML reports.
pip install lupaxa-sysinfo
sysinfo --helpYou can also run python -m lupaxa.sysinfo.
- Lightweight defaults: basic host info as pretty-printed JSON
- Opt-in collectors: CPU, memory, disks, network, listening ports, processes, firewall, runtimes, GPU, packages, services, hosts/DNS, logs, storage, extra hardware, and package-manager layouts
- Granular redaction for hosts, users, homes, emails, IPs, MACs, secrets, domains, and custom regexes
- Profiles for common workflows:
minimal,ci,support - JSON, YAML, XML, human summary, and compact HTML output (CLI)
- Only basic info is collected unless you enable sections or a profile
- Environment variables require explicit
--env;--alland every profile leave them off (they often hold credentials) - In the CLI, redaction is opt-in: raw output unless you pass
--redact-allor individual--redact-*flags - In the library,
collect_report()redacts by default; passredact=Falseor a customRedactOptionsto change that - Missing OS tools are skipped, or normalized with
--strict-missing - Platform tools (
nft,brew,systemctl, …) are used only when present; the package never installs OS packages
- Python 3.10+
- Runtime:
psutil,PyYAML,tldextract(plusdistroon Linux)
from lupaxa.sysinfo import collect_report
report = collect_report(cpu=True, memory=True)Reports are plain dictionaries with schema_version and tool_version,
ready for JSON serialisation. Use CollectOptions / RedactOptions (or the
redact= argument) when you need finer control than keyword flags.
Redaction runs after collection and before any stdout or file write. Use it whenever a report might leave your machine.
CLI vs library defaults (easy to miss):
| Surface | Default | Shareable dumps |
|---|---|---|
| CLI | Off (raw output) | Pass --redact-all (or selective --redact-* flags) |
| Library | On via collect_report() |
Already redacted; use redact=False only if you must |
Categories include FQDNs, hosts, users, homes, Windows homes, emails, IPv4/IPv6,
MACs, secrets, domains, domain trees, subdomains, and custom regexes. Secrets
mode masks dict values whose keys look secret-like (KEY, TOKEN,
PASSWORD, …).
# Full redaction for a support dump
sysinfo --profile support --redact-all \
--json sysreport.json --html sysreport.html
# Selective categories, or carve one out after --redact-all
sysinfo --all --redact-emails --redact-hosts --redact-ipv4s
sysinfo --all --redact-all --no-redact-macs
# Explicit tokens and custom patterns
sysinfo --redact-email "admin@example.com"
sysinfo --redact-domain-trees --redact-domain-tree foo.bar.example.co.uk
sysinfo --redact-custom \
--redact-rx "[A-Za-z0-9]{32}" \
--redact-file patterns.txtfrom lupaxa.sysinfo import collect_report, RedactOptions
# Library default: redacted (all categories on)
report = collect_report(cpu=True, memory=True)
# Keep redaction but carve out a category
report = collect_report(cpu=True, redact=RedactOptions(macs=False))
# Raw (local debugging only)
raw = collect_report(cpu=True, redact=False)If you enable --env, always pair it with redaction before sharing:
sysinfo --profile support --env --redact-all --yaml support.yamlsysinfo
sysinfo --version
sysinfo --profile ci --json report.json
sysinfo --all --yaml report.yaml
sysinfo --all --output xml
sysinfo --profile support --xml report.xml| Profile | Behaviour |
|---|---|
minimal |
Basic only; spinner off |
ci |
CPU, memory, disks, network, runtimes, packages (fast); strict missing |
support |
All non-environment sections; full package enumeration |
sysinfo --profile ci --json ci-sysinfo.json
sysinfo --cpu --memory
sysinfo --all --no-firewall --no-gpu
sysinfo --packages --packages-mode fastStdout formats are json (default), yaml, xml, summary, and both.
File writers: --json PATH, --yaml PATH, --xml PATH, --html PATH.
Full flag list: sysinfo --help.
From a clone of this repository:
make init # first-time makefile-skills checkout
make python-install-dev # editable install with [dev]
make python-check # lint, type-check, and test