What is Extra Platforms?
Extra Platforms detects the runtime architecture, operating system (including Linux distribution), shell, terminal, CI environment & AI coding agents, and exposes rich, cacheable metadata (version, codename, icon, canonical URL). It also groups them into reusable families.
- Accurate detection of architecture, OS/distribution, shell, terminal, and CI systems using lightweight, cacheable heuristics.
- Rich metadata for platforms: version, codename, icon, canonical URL, and "like" relationships.
- Grouping and API primitives: predefined families,
is_*()predicates,current_*()accessors, andGroupmembership helpers. - Testing helpers: Pytest decorators and markers such as
@skip_<id>and@unless_<id>for concise platform-aware tests. - Extensible and CI-friendly: designed to be lightweight, easy to extend, and suitable for CI-aware workflows.
- Built-in Linux distribution detection via
/etc/os-release, with no external dependencies.
Quick start
Quickly inspect your current environment without installing anything, thanks to uvx:
$ uvx extra-platforms
extra-platforms 9.0.1
โโ Architecture โโ ๐ฑ ARM64 (AArch64) โโ[AARCH64]โโโโโโโโโโโโ
id: aarch64
(...)
โโ Platform โโ ๐ macOS โโ[MACOS]โโโโโโโโโโโโโโโโโโโโโโโโโโโโ
id: macos
(...)
โโ Shell โโ โค Zsh โโ[ZSH]โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
id: zsh
(...)
โโ Terminal โโ ๐ Apple Terminal โโ[APPLE_TERMINAL]โโโโโโโโโโ
id: apple_terminal
(...)
โโ CI โโ โ Unknown CI โโ[UNKNOWN_CI]โโโโโโโโโโโโโโโโโโโโโโโโ
(...)
โโ Agent โโ โด๏ธ Claude Code โโ[CLAUDE_CODE]โโโโโโโโโโโโโโโโโโ
(...)
The same output is available via python -m extra_platforms. Use --json for machine-readable output, or --help to see all options.
For scripting, pipe the JSON output into jq:
$ uvx extra-platforms --json | jq --raw-output .platform.id
macos
Or if you want to explore usage of the library in a Python REPL:
$ uvx --with extra-platforms python
>>> import extra_platforms >>> extra_platforms.__version__ '9.0.1'
Examples
Get the current platform, from which you can access lots of metadata:
>>> from extra_platforms import current_platform >>> my_os = current_platform() >>> my_os Platform(id='macos', name='macOS') >>> my_os.id 'macos' >>> my_os.name 'macOS' >>> my_os.icon '๐' >>> my_os.info() { 'id': 'macos', 'name': 'macOS', 'icon': '๐', 'url': 'https://apple.com/macos/', 'current': True, 'distro_id': None, 'version': '26.2', 'version_parts': {'major': '26', 'minor': '2', 'build_number': None}, 'like': None, 'codename': 'Tahoe', }
Check if a platform is a specific system:
>>> from extra_platforms import is_gentoo >>> is_gentoo() False
Use groups to check if the current platform is part of a specific family:
>>> from extra_platforms import current_platform, BSD, UNIX, LINUX >>> current_platform() Platform(id='macos', name='macOS') >>> current_platform() in BSD True >>> current_platform() in UNIX True >>> current_platform() in LINUX False
Or directly use the detection functions returning a boolean that is associated with each group:
>>> from extra_platforms import is_bsd, is_unix, is_linux >>> is_bsd() True >>> is_unix() True >>> is_linux() False
List all platforms of a family:
>>> from extra_platforms import LINUX >>> LINUX.members mappingproxy({ 'altlinux': Platform(id='altlinux', name='ALT Linux'), 'amzn': Platform(id='amzn', name='Amazon Linux'), 'android': Platform(id='android', name='Android'), 'arch': Platform(id='arch', name='Arch Linux'), 'buildroot': Platform(id='buildroot', name='Buildroot'), 'cachyos': Platform(id='cachyos', name='CachyOS'), 'centos': Platform(id='centos', name='CentOS'), 'cloudlinux': Platform(id='cloudlinux', name='CloudLinux OS'), 'debian': Platform(id='debian', name='Debian'), 'exherbo': Platform(id='exherbo', name='Exherbo Linux'), 'fedora': Platform(id='fedora', name='Fedora'), 'gentoo': Platform(id='gentoo', name='Gentoo Linux'), 'guix': Platform(id='guix', name='Guix System'), 'ibm_powerkvm': Platform(id='ibm_powerkvm', name='IBM PowerKVM'), 'kvmibm': Platform(id='kvmibm', name='KVM for IBM z Systems'), 'linuxmint': Platform(id='linuxmint', name='Linux Mint'), 'mageia': Platform(id='mageia', name='Mageia'), 'mandriva': Platform(id='mandriva', name='Mandriva Linux'), 'nobara': Platform(id='nobara', name='Nobara'), 'opensuse': Platform(id='opensuse', name='openSUSE'), 'oracle': Platform(id='oracle', name='Oracle Linux'), 'parallels': Platform(id='parallels', name='Parallels'), 'pidora': Platform(id='pidora', name='Pidora'), 'raspbian': Platform(id='raspbian', name='Raspbian'), 'rhel': Platform(id='rhel', name='RedHat Enterprise Linux'), 'rocky': Platform(id='rocky', name='Rocky Linux'), 'scientific': Platform(id='scientific', name='Scientific Linux'), 'slackware': Platform(id='slackware', name='Slackware'), 'sles': Platform(id='sles', name='SUSE Linux Enterprise Server'), 'tumbleweed': Platform(id='tumbleweed', name='openSUSE Tumbleweed'), 'tuxedo': Platform(id='tuxedo', name='Tuxedo OS'), 'ubuntu': Platform(id='ubuntu', name='Ubuntu'), 'ultramarine': Platform(id='ultramarine', name='Ultramarine'), 'nixos': Platform(id='nixos', name='NixOS'), 'void': Platform(id='void', name='Void Linux'), 'generic_linux': Platform(id='generic_linux', name='Generic Linux'), 'xenserver': Platform(id='xenserver', name='XenServer'), }) >>> LINUX.member_ids frozenset({'centos', 'mageia', 'generic_linux', 'ultramarine', 'tuxedo', 'arch', 'buildroot', 'android', 'exherbo', 'nixos', 'void', 'mandriva', 'fedora', 'slackware', 'parallels', 'xenserver', 'kvmibm', 'nobara', 'amzn', 'guix', 'debian', 'oracle', 'cachyos', 'altlinux', 'rhel', 'ibm_powerkvm', 'rocky', 'scientific', 'sles', 'linuxmint', 'tumbleweed', 'ubuntu', 'pidora', 'cloudlinux', 'gentoo', 'raspbian', 'opensuse'}) >>> print("\n".join([p.name for p in LINUX])) ALT Linux Amazon Linux Android Arch Linux Buildroot CachyOS CentOS CloudLinux OS Debian Exherbo Linux Fedora Gentoo Linux Guix System IBM PowerKVM KVM for IBM z Systems Linux Mint Mageia Mandriva Linux Nobara openSUSE Oracle Linux Parallels Pidora Raspbian RedHat Enterprise Linux Rocky Linux Scientific Linux Slackware SUSE Linux Enterprise Server openSUSE Tumbleweed Tuxedo OS Ubuntu Ultramarine NixOS Void Linux Generic Linux XenServer
Reduce a disparate collection of groups and platforms into a minimal descriptive set, by grouping all platforms into families:
>>> from extra_platforms import AIX, MACOS, SOLARIS, reduce >>> reduce([AIX, MACOS]) frozenset({ Platform(id='macos', name='macOS'), Platform(id='aix', name='IBM AIX'), }) >>> reduce([AIX, MACOS, SOLARIS]) frozenset({ Group(id='system_v', name='AT&T System Five'), Platform(id='macos', name='macOS'), })
All recognized architectures and how they're grouped:
---
config: {"mindmap": {"padding": 5}}
---
mindmap
((๐๏ธ ALL_ARCHITECTURES))
)๐
X86(
(๐ถ I386)
(๐ถ I586)
(๐ถ I686)
(๐ฅ๏ธ X86_64)
)๐ WEBASSEMBLY(
(๐ WASM32)
(๐ WASM64)
)โ
ค RISCV(
(โ
ค RISCV32)
(โ
ค RISCV64)
)โก POWERPC(
(โก PPC)
(โก PPC64)
(โก PPC64LE)
)๐ LOONGARCH(
(๐ LOONGARCH64)
)๐ข IBM_MAINFRAME(
(๐ข S390X)
)โ๏ธ ALL_SPARC(
(โ๏ธ SPARC)
(โ๏ธ SPARC64)
)๐ฒ ALL_MIPS(
(๐ฒ MIPS)
(๐ฒ MIPS64)
(๐ฒ MIPS64EL)
(๐ฒ MIPSEL)
)๐ฑ ALL_ARM(
(๐ฑ AARCH64)
(๐ฑ ARM)
(๐ฑ ARMV5TEL)
(๐ฑ ARMV6L)
(๐ฑ ARMV7L)
(๐ฑ ARMV8L)
Platforms
All recognized platforms and how they're grouped:
---
config: {"mindmap": {"padding": 5}}
---
mindmap
((โ๏ธ ALL_PLATFORMS))
)โ UNIX_LAYERS(
(ฯพ CYGWIN)
)๐ SYSTEM_V(
(โฟ AIX)
(๐ฅ ILLUMOS)
(๐ SOLARIS)
)๐
OTHER_POSIX(
(๐ HAIKU)
(๐ฆฌ HURD)
)โ LINUX_LAYERS(
(โ WSL1)
(โ WSL2)
)๐ง LINUX(
(๐๏ธ ALPINE)
(ฮ ALTLINUX)
(โคป AMZN)
(๐ค ANDROID)
(๐๏ธ ARCH)
(โ๏ธ BUILDROOT)
(โฌ CACHYOS)
(๐ CENTOS)
(๊ฉ CLOUDLINUX)
(๐ DEBIAN)
(๐ฝ EXHERBO)
(๐ฉ FEDORA)
(๐ฅ GENERIC_LINUX)
(๐๏ธ GENTOO)
(๐ GUIX)
(๐คน IBM_POWERKVM)
(๐ฑ KALI)
(๐คน KVMIBM)
(๐ฟ LINUXMINT)
(โฅ MAGEIA)
(๐ซ MANDRIVA)
(โฒ MANJARO)
(โ๏ธ NIXOS)
(๏ NOBARA)
(๐ฆ OPENSUSE)
(๐ถ OPENWRT)
(๐ฆด ORACLE)
(โฅ PARALLELS)
(๐ PIDORA)
(๐ RASPBIAN)
(๐ฉ RHEL)
(โฐ๏ธ ROCKY)
(โ๏ธ SCIENTIFIC)
(๐ฌ SLACKWARE)
(๐ฆ SLES)
(โป TUMBLEWEED)
(๐คต TUXEDO)
(๐ฏ UBUNTU)
(๐ ULTRAMARINE)
(โ
VOID)
(โ XENSERVER)
)โท BSD(
(๐ชฐ DRAGONFLY_BSD)
(๐ FREEBSD)
(๐ MACOS)
(๐ MIDNIGHTBSD)
(๐ฉ NETBSD)
(๐ก OPENBSD)
(๐
SUNOS)
)๐ช ALL_WINDOWS(
(๐ช WINDOWS)
Tip
More groups exist beyond those shown in the diagram, and more utilities are available for each platform. See the platform documentation for details.
Shells
All recognized shells:
---
config: {"mindmap": {"padding": 5}}
---
mindmap
((๐ ALL_SHELLS))
)โจ๏ธ WINDOWS_SHELLS(
(โถ CMD)
(๐ท POWERSHELL)
)โ OTHER_SHELLS(
(๐ FISH)
(๐ NUSHELL)
(๐ XONSH)
)๐
ฒ C_SHELLS(
(๐ CSH)
(๐ TCSH)
)๐ฒ BOURNE_SHELLS(
(๐ชถ ASH)
(๏ผ BASH)
(๐จ DASH)
(๐ KSH)
(๐ SH)
(โค ZSH)
Terminals
All recognized terminals:
---
config: {"mindmap": {"padding": 5}}
---
mindmap
((๐ป ALL_TERMINALS))
)โฌข WEB_TERMINALS(
(โฌก HYPER)
(๐ TABBY)
(๐ต VSCODE_TERMINAL)
)โฆ NATIVE_TERMINALS(
(๐ APPLE_TERMINAL)
(๐ GNOME_TERMINAL)
(โฌ ITERM2)
(๐ KONSOLE)
(๐ TILIX)
(โก WINDOWS_TERMINAL)
(๐ XTERM)
)โง MULTIPLEXERS(
(๐บ GNU_SCREEN)
(๐ TMUX)
(๐ชต ZELLIJ)
)๐ฎ GPU_TERMINALS(
(๐ณ ALACRITTY)
(โฐ CONTOUR)
(๐ฆถ FOOT)
(๐ป GHOSTTY)
(๐ฑ KITTY)
(๐๏ธ RIO)
(๐ก WEZTERM)
CI systems
All recognized CI systems:
---
config: {"mindmap": {"padding": 5}}
---
mindmap
((โบ ALL_CI))
(โ AZURE_PIPELINES)
(โฒ BAMBOO)
(๐ช BUILDKITE)
(โชพ CIRCLE_CI)
(โ CIRRUS_CI)
(แ CODEBUILD)
(๐ GITHUB_CI)
(๐ฆ GITLAB_CI)
(๐ GUIX_BUILD)
(โฅ HEROKU_CI)
(๐๏ธ TEAMCITY)
(๐ท TRAVIS_CI)
Agents
All recognized AI coding agents:
---
config: {"mindmap": {"padding": 5}}
---
mindmap
((๐ง ALL_AGENTS))
(โด๏ธ CLAUDE_CODE)
(๐พ CLINE)
(โค CURSOR)
Used in
Check these projects to get real-life examples of extra-platforms usage:
Feel free to send a PR to add your project in this list if you are relying on Extra Platforms in any way.