CLIΒΆ
The extra-platforms command-line tool detects and reports the architecture, platform, shell, terminal, CI system, and agent of the current environment.
InvocationΒΆ
$ uvx extra-platforms
$ extra-platforms
$ python -m extra_platforms
$ uv run extra-platforms
OptionsΒΆ
--helpShow usage information and exit.
--versionPrint the package version and exit.
--jsonOutput results as JSON instead of the default human-readable format. Useful for scripting and piping into tools like
jq.
Default outputΒΆ
The default output prints each detected trait with its metadata, followed by summary tables of all detected traits and groups:
$ extra-platforms
extra-platforms 11.2.0
ββ Architecture ββ π± ARM64 (AArch64) ββ[AARCH64]ββββββββββββ
id: aarch64
aliases: arm64
name: ARM64 (AArch64)
icon: π±
url: https://en.wikipedia.org/wiki/AArch64
current: True
machine: arm64
symbol: AARCH64
detection: is_aarch64()
pytest: @skip_aarch64, @unless_aarch64
groups: ALL_ARCHITECTURES, ALL_ARM, ARCH_64_BIT, LITTLE_ENDIAN
ββ Platform ββ π macOS ββ[MACOS]ββββββββββββββββββββββββββββ
id: macos
(...)
JSON outputΒΆ
The --json flag produces a single JSON object with all detected traits and groups:
$ extra-platforms --json
{
"version": "11.2.0",
"architecture": {
"id": "aarch64",
"name": "ARM64 (AArch64)",
"icon": "π±",
"url": "https://en.wikipedia.org/wiki/AArch64",
"current": true,
"machine": "arm64",
"processor": null,
"aliases": ["arm64"],
"symbol": "AARCH64",
"detection": "is_aarch64",
"groups": ["ALL_ARCHITECTURES", "ALL_ARM", "ARCH_64_BIT", "LITTLE_ENDIAN"]
},
"platform": { "..." : "..." },
"shell": { "..." : "..." },
"terminal": { "..." : "..." },
"ci": { "..." : "..." },
"agent": { "..." : "..." },
"groups": [
{
"id": "all_arm",
"name": "ARM architectures",
"icon": "π±",
"symbol": "ALL_ARM",
"detection": "is_any_arm",
"canonical": true
}
]
}
Each trait section contains:
Field |
Description |
|---|---|
Unique trait identifier |
|
Human-readable name |
|
Single-glyph icon |
|
Reference URL |
|
Whether this trait matches the current environment |
|
Alternative IDs for this trait |
|
Uppercase symbol for Python imports ( |
|
Detection function name ( |
|
Groups this trait belongs to |
Trait-specific fields (like machine, version, codename) are included when available.
Scripting examplesΒΆ
Extract the current platform ID:
$ extra-platforms --json | jq --raw-output .platform.id
macos
List all detected group names:
$ extra-platforms --json | jq --raw-output '.groups[].name'
ARM architectures
All BSD
All Unix
(...)
Check if running in CI:
$ extra-platforms --json | jq '.ci.id != "unknown_ci"'
false