skillfed

extra-platforms

🔎 Detect architectures, platforms, shells, terminals, CI systems and agents, grouped by family

extra-platforms v13.6.0 135.1K downloads/30d#11,453 on PyPI31
Permissive license Apache-2.0 Active released

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-platforms

uv

uv add extra-platforms

poetry

poetry add extra-platforms

Installing 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

Development Status :: 5 - Production/StableEnvironment :: ConsoleEnvironment :: MacOS XEnvironment :: WebAssemblyEnvironment :: WebAssembly :: EmscriptenEnvironment :: WebAssembly :: WASIEnvironment :: Win32 (MS Windows)Framework :: PytestIntended Audience :: DevelopersOperating System :: AndroidOperating System :: BeOSOperating System :: MacOSOperating System :: MacOS :: MacOS 9Operating System :: MacOS :: MacOS XOperating System :: MicrosoftOperating System :: Microsoft :: MS-DOSOperating System :: Microsoft :: WindowsOperating System :: Microsoft :: Windows :: Windows 10Operating System :: Microsoft :: Windows :: Windows 11Operating System :: Microsoft :: Windows :: Windows 3.1 or EarlierOperating System :: Microsoft :: Windows :: Windows 7Operating System :: Microsoft :: Windows :: Windows 8Operating System :: Microsoft :: Windows :: Windows 8.1Operating System :: Microsoft :: Windows :: Windows 95/98/2000Operating System :: Microsoft :: Windows :: Windows CEOperating System :: Microsoft :: Windows :: Windows NT/2000Operating System :: Microsoft :: Windows :: Windows Server 2003Operating System :: Microsoft :: Windows :: Windows Server 2008Operating System :: Microsoft :: Windows :: Windows VistaOperating System :: Microsoft :: Windows :: Windows XPOperating System :: OS IndependentOperating System :: OS/2Operating System :: Other OSOperating System :: PDA SystemsOperating System :: POSIXOperating System :: POSIX :: AIXOperating System :: POSIX :: BSDOperating System :: POSIX :: BSD :: BSD/OSOperating System :: POSIX :: BSD :: FreeBSDOperating System :: POSIX :: BSD :: NetBSDOperating System :: POSIX :: BSD :: OpenBSDOperating System :: POSIX :: GNU HurdOperating System :: POSIX :: HP-UXOperating System :: POSIX :: IRIXOperating System :: POSIX :: LinuxOperating System :: POSIX :: OtherOperating System :: POSIX :: SCOOperating System :: POSIX :: SunOS/SolarisOperating System :: PalmOSOperating System :: RISC OSOperating System :: UnixOperating System :: iOSProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: Implementation :: CPythonTopic :: Software Development :: Libraries :: Python ModulesTopic :: System :: HardwareTopic :: System :: Operating SystemTopic :: System :: Operating System KernelsTopic :: System :: Operating System Kernels :: BSDTopic :: System :: Operating System Kernels :: GNU HurdTopic :: System :: Operating System Kernels :: LinuxTopic :: UtilitiesTyping :: Typed

Tags

platform detectionos detection libraryarchitecture detectionci environment detectionlinux distribution detectionshell and terminal detectionpytest platform decorators
platform-detectionci-awarepytest-plugin

More Python Modules packages