extra-platforms
🔎 Detect architectures, platforms, shells, terminals, CI systems and agents, grouped by family
What it is and what it does
Extra Platforms is a lightweight library that detects your runtime environment—CPU architecture, operating system (including specific Linux distributions), shell, terminal emulator, CI system, and AI coding agent—and exposes this information as rich, queryable metadata. It provides version numbers, codenames, icons, and canonical URLs for each detected component, and groups them into semantic families (BSD, UNIX, LINUX, etc.) for easier conditional logic.
The library is designed for zero external dependencies and uses lightweight heuristics (primarily reading `/etc/os-release` for Linux detection). It integrates with pytest via decorators and markers like `@skip_` and `@unless_` to make platform-aware testing concise. You can use it as a Python library, via the command line, or through the `python -m extra_platforms` module interface, with JSON output for scripting.
Use it for:
- Skip or run specific pytest tests only on certain platforms or architectures using decorators.
- Detect if running inside a CI system and adjust build or test behavior accordingly.
- Identify the current Linux distribution and apply distro-specific package or configuration logic.
- Determine shell and terminal type to customize shell completions or output formatting.
- Detect AI coding agents (Claude Code, Cursor, Cline) to enable or disable agent-specific features.
- Group heterogeneous platforms into families for simplified multi-platform compatibility checks.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Detects and exposes rich metadata about runtime architecture, OS, Linux distribution, shell, terminal, CI environment, and AI coding agents, with grouping into reusable families and pytest testing helpers.
Yes. The package is actively maintained, has no dependencies, supports current Python versions (3.10+), carries a permissive license, and solves a real problem for cross-platform and CI-aware development. It is especially valuable if you write platform-conditional code, maintain pytest suites across multiple OS/arch combinations, or need to detect CI or AI agent environments.
Install
extra-platforms on PyPI
pip
pip install extra-platformsuv
uv add extra-platformspoetry
poetry add extra-platformsInstalling extra-platforms
Before you install
Low install friction with no runtime dependencies. Actively maintained with recent release (11 days old) and steady commit activity.
License in practice
Apache-2.0 permissive license allows commercial and private use with minimal restrictions.
Quickstart
pip install extra-platforms
from extra_platforms import current_platform, is_linux, LINUX
my_os = current_platform()
print(my_os.id, my_os.name, my_os.icon)
print(is_linux())
print(current_platform() in LINUX)
Requires Python 3.10 or later.
Verify before relying
- Whether the package's caching mechanism and heuristics are performant enough for frequent calls in tight loops.
- Completeness and accuracy of CI environment detection across all supported systems.
- How well the AI agent detection handles emerging or custom agent implementations.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 11 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 135,141/month — #11,453 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: extra_platforms-13.6.0-py3-none-any.whl
Keywords: Agent detection, Alacritty, AlmaLinux, Almquist Shell, Alpine Linux, ALT Linux, Amazon Linux, Android, Apple Terminal, Arch Linux, Architecture detection, ARM (32-bit), ARM64 (AArch64), ARMv5TE (little-endian), ARMv6 (little-endian), ARMv7 (little-endian), ARMv8 (32-bit, little-endian), AT&T System Five, Azure Pipelines, Bamboo, Bash, Bourne Shell, Buildkite, Buildroot, C shell, CachyOS, CentOS, ChromeOS, CI detection, Circle CI, Cirrus CI, Claude Code, Clear Linux OS, Cline, CloudLinux OS, CodeBuild, Command Prompt, Contour, CPU architecture, Cursor, Cygwin, Dash, Debian, Distro detection, DragonFly BSD, EndeavourOS, Exherbo Linux, Fedora, Fish, foot, FreeBSD, Generic Linux, Gentoo Linux, Ghostty, GitHub Actions runner, GitLab CI, GNOME Terminal, GNU Screen, GNU/Hurd, Guix System, Haiku, Hardware detection, Hermetic Build, Heroku CI, Hyper, IBM AIX, IBM i, IBM PowerKVM, IBM z/Architecture (s390x), illumos, Intel 80386 (i386), Intel Pentium (i586), Intel Pentium Pro (i686), iTerm2, Kali Linux, Kitty, Konsole, Korn shell, KVM for IBM z Systems, Linux distribution, Linux Mint, LoongArch (64-bit), macOS, Mageia, Mandriva Linux, Manjaro Linux, MidnightBSD, MIPS (32-bit, big-endian), MIPS (32-bit, little-endian), MIPS64 (big-endian), MIPS64 (little-endian), multiplatform, NetBSD, NixOS, Nobara, Nushell, OpenBSD, openSUSE, OpenWrt, Oracle Linux, OS detection, OS info, Parallels, Pidora, PikaOS, Platform detection, PowerPC (32-bit), PowerPC 64-bit (big-endian), PowerPC 64-bit (little-endian), PowerShell, Pytest, Pytest fixtures, Pytest plugin, Raspbian, RedHat Enterprise Linux, Rio, RISC-V (32-bit), RISC-V (64-bit), Rocky Linux, Scientific Linux, Shell detection, Slackware, SliTaz GNU/Linux, Solaris, Source Mage GNU/Linux, SPARC (32-bit), SPARC (64-bit), SunOS, SUSE Linux Enterprise Server, System information, Tabby, tcsh, TeamCity, Terminal detection, Tilix, tmux, Travis CI, Tuxedo OS, Ubuntu, Ultramarine, Unix, Void Linux, VS Code Terminal, WebAssembly (32-bit), WebAssembly (64-bit), WezTerm, Windows, Windows Subsystem for Linux, Windows Terminal, x86-64 (AMD64), XenServer, Xonsh, xterm, Zellij, Zsh
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
ci-infoDetects which continuous integration platform…
permissive · top 15,000 on PyPI
distroDistro provides a reliable, machine-readable…
permissive · top 1,000 on PyPI
archspecArchspec provides APIs to detect, query, and…
permissive · top 15,000 on PyPI
spandrel-extra-archesRegisters additional PyTorch model…
permissive · top 15,000 on PyPI
py-cpuinfoDetects and reports CPU…
permissive · top 1,000 on PyPI
deepagents-codeA terminal-based AI coding agent that works…
permissive · top 15,000 on PyPI
certifi-linuxRedirects certifi's certificate lookup to use…
permissive · top 15,000 on PyPI
detect_agentDetects whether code is running in an AI agent…
unclear · top 15,000 on PyPI
xattrxattr is a Python wrapper for reading and…
permissive · top 5,000 on PyPI
uptimeRetrieves the system uptime (time since last…
permissive · top 15,000 on PyPI