Skip to main content

Best-effort host specification capture for environment comparison, troubleshooting, and LLM context.

Project description

hostxray

hostxray collects a best-effort, privacy-aware machine specification for environment comparison (dev/uat/prod), troubleshooting, and providing LLM context.

  • Standard library first
  • Optional enrichment via extras (pip install hostxray[full])
  • Best-effort collection with graceful degradation (never crash)
  • Deterministic, JSON-serializable output
  • Safe mode (default) redacts sensitive identifiers

This README is intentionally self-contained for PyPI. The docs/ folder (on GitHub) has deeper, field-by-field guidance, but you shouldn’t need it to get started.

Install

pip install hostxray
# Optional extras
pip install hostxray[full]

Quickstart (CLI)

Collect a standard, safe-by-default spec as JSON:

hostxray --format json --profile standard

Collect a more complete spec (may include identifying values):

hostxray --format json --profile full --unsafe

Targeted redaction (even in unsafe mode):

hostxray --format json --profile full --unsafe --redact hostname mac ip user serial

Quickstart (Python)

from hostxray import collect_spec

spec = collect_spec(profile="standard")
print(spec.to_json(indent=2))

Key concepts (quick reference)

Profiles

Profiles control what to attempt to collect.

  • minimal: fastest, capacity-oriented inventory
  • standard: capacity-focused inventory (no utilization snapshot)
  • full: includes utilization snapshot (e.g. CPU/mem/disk %), plus additional best-effort enrichment

If a data source is unavailable (missing permissions, missing optional dependency, unsupported platform), hostxray skips it and continues.

On Windows, standard/full also attempt best-effort hardware enrichment via PowerShell/CIM when available (for example: GPU inventory, BIOS/baseboard, NIC link speed, and disk model/bus/media type).

Safe mode vs unsafe

By default, hostxray runs in safe mode and redacts common identifiers.

  • Safe mode (default): returns a useful spec while redacting sensitive identifiers
  • Unsafe mode (--unsafe / API option): may include identifying values like hostname, usernames, MAC addresses, IPs, serials (depending on platform and availability)

Redaction controls

You can explicitly redact categories:

  • hostname
  • user
  • ip
  • mac
  • serial

(Exact available categories may evolve; the CLI --help is the source of truth for your installed version.)

Output guarantees

  • JSON-serializable, deterministic structure
  • Designed to be stable for diffing across machines
  • Collection is best-effort; missing fields are expected and normal

Extras (optional enrichment)

hostxray works with the standard library alone. Installing extras enables additional collectors.

pip install hostxray[full]

If you’re distributing this in a locked-down environment, you can stay on the base install and still get a useful baseline.

CLI

hostxray --help

Documentation

If you’re viewing this on GitHub, deeper references are available:

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

hostxray-0.0.2.tar.gz (24.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hostxray-0.0.2-py3-none-any.whl (25.4 kB view details)

Uploaded Python 3

File details

Details for the file hostxray-0.0.2.tar.gz.

File metadata

  • Download URL: hostxray-0.0.2.tar.gz
  • Upload date:
  • Size: 24.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for hostxray-0.0.2.tar.gz
Algorithm Hash digest
SHA256 47a892dcc0be34e17339745a230fbfcc7643ec176fe3c32a64fe051e28f9780f
MD5 fe1e66d48c01c3afd267f68f49fa1708
BLAKE2b-256 8ae099b2e162349e881bb038584ce7096ee43064976f659b88caa45fc1b19679

See more details on using hashes here.

Provenance

The following attestation bundles were made for hostxray-0.0.2.tar.gz:

Publisher: publish.yml on brentwc/hostxray

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hostxray-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: hostxray-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 25.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for hostxray-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 feb5410318a3d856cb5df713556dd8526aed5190c4161f10029dbda84f61aa50
MD5 2485105f284b8909e8fd22829e16b602
BLAKE2b-256 9c7c0d38263d64181c18010fc2367e417688553854a55ccea17eb907df6238c4

See more details on using hashes here.

Provenance

The following attestation bundles were made for hostxray-0.0.2-py3-none-any.whl:

Publisher: publish.yml on brentwc/hostxray

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page