--- id: extra-platforms version: "13.6.0" license: Apache-2.0 license_treatment: permissive maintenance: active --- # extra-platforms — 🔎 Detect architectures, platforms, shells, terminals, CI systems and agents, grouped by family License: permissive · Maintenance: active · Downloads: 135.1K/mo ## 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 above — 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 pip install extra-platforms uv add extra-platforms 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_current - Install friction: low - Maintenance: active - Downloads: 135.1K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags platform detection, os detection library, architecture detection, ci environment detection, linux distribution detection, shell and terminal detection, pytest platform decorators, platform-detection, ci-aware, pytest-plugin [View on SkillFed](https://skillfed.io/packages/extra-platforms) · [View on PyPI](https://pypi.org/project/extra-platforms/)