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.1.tar.gz (22.6 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.1-py3-none-any.whl (24.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: hostxray-0.0.1.tar.gz
  • Upload date:
  • Size: 22.6 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.1.tar.gz
Algorithm Hash digest
SHA256 4ae570ea14b5005c2663f499b6dc16a8077f690685aa1ddfbb1479fdb31c9a37
MD5 bf82885f50f471c26f282f30fb252aee
BLAKE2b-256 d59b2c5ff9ebcf7f436afe8ea57321744dfa44938089291e88e6dc31c254463d

See more details on using hashes here.

Provenance

The following attestation bundles were made for hostxray-0.0.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: hostxray-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 24.0 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0f49c5e4c029bef392bc4d1c93daa8309af215fc773fdc10eb4b7c3081dea4f7
MD5 000f6a34afec9fd0408c9b0edddacd09
BLAKE2b-256 4da0ada5aea4d72e362f75959a8fe4d95be152f40eb8a3fa07804f1cd11e0159

See more details on using hashes here.

Provenance

The following attestation bundles were made for hostxray-0.0.1-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