device audit profile
Overview
Auto-collects hardware and software specs from the local machine (or a remote Linux host via SSH), then generates a structured profile.yaml and device-profile.md in the profiles directory. This is the primary way to onboard a new device into the fleet.
If --from-collect is provided, it skips collection and uses a previously saved JSON spec file instead.
Usage
device audit profile [OPTIONS]
Options
| Option | Description | Default |
|---|---|---|
--from-collect PATH | JSON file from device audit collect (skip live collection) | -- |
--role ROLE | Machine role (e.g., workstation, server) | workstation |
-o, --output-dir PATH | Output directory for generated profile | Auto-detected |
--overwrite | Overwrite existing profile files | false |
--ssh USER@HOST[:PORT] | Collect from remote Linux machine via SSH | -- |
--key PATH | SSH private key file | -- |
Prerequisites
- Repo: device-deployments
- Install:
pip install -e .from repo root, or usepython -m device_deployments.cli.main - Platform: Windows (WMI), macOS (system_profiler), or Linux (via SSH)
- SSH: For remote collection, SSH key auth must be configured on the target
Examples
Collect and generate profile for the local machine
device audit profile
Generate from a previously saved spec file
device audit profile --from-collect specs.json -o profiles/macos/machines/my-mac
Profile a remote Linux server
device audit profile --ssh homelab-admin@100.105.14.5 -o profiles/linux/machines/homelab
Overwrite an existing profile
device audit profile --overwrite
Output
Creates a profile directory containing:
profile.yaml-- structured hardware/software spec in YAMLdevice-profile.md-- human-readable Markdown summary
Notes
- On Windows, some WMI values may be inaccurate (e.g., Lenovo returns SKU instead of model name, GPU VRAM overflows for cards >4GB). Review and correct the generated profile manually.
- The
--roleflag sets the machine's role in the profile metadata (workstation, server, etc.).