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ΒΆ

--help

Show usage information and exit.

--version

Print the package version and exit.

--json

Output 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

id

Unique trait identifier

name

Human-readable name

icon

Single-glyph icon

url

Reference URL

current

Whether this trait matches the current environment

aliases

Alternative IDs for this trait

symbol

Uppercase symbol for Python imports (from extra_platforms import AARCH64)

detection

Detection function name (from extra_platforms import is_aarch64)

groups

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