skillfed

shiv

A command line utility for building fully self contained Python zipapps.

shiv v1.0.8 425.1K downloads/30d#6,761 on PyPI1,945
Permissive license BSD License Active released

What it is and what it does

shiv is a command-line tool that packages a Python application and all its dependencies into a single executable zipapp file (a .pyz file), following PEP 441. Instead of requiring users to install Python and then use pip to fetch dependencies, you distribute one self-contained binary that runs immediately. It accepts almost all pip install options, so you can specify versions, extras, and sources just as you would with pip.

The tool is designed for developers who want to distribute Python CLI tools or applications without forcing end-users to manage Python environments. You specify a console script entry point (like flake8) and shiv bundles everything needed to run it. The generated zipapp extracts itself into ~/.shiv (or a custom SHIV_ROOT) on first run. A key limitation: zipapps with native C extensions may not work across different operating systems or architectures—a .pyz built on macOS typically only runs on macOS.

Use it for:

  • Package a CLI tool like flake8 into a single executable that users can download and run without installing Python.
  • Distribute internal company tools as standalone binaries that don't require dependency management on target machines.
  • Create a Python REPL bundle with preloaded libraries (e.g., boto) that users can invoke interactively without setup.
  • Build cross-platform Python applications where all dependencies are pure Python and architecture-independent.
  • Simplify CI/CD pipelines by generating immutable, self-contained application artifacts instead of managing virtual environments.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

shiv builds self-contained Python zipapps (PEP 441) that bundle an application and all its dependencies into a single executable file, eliminating the need for separate installation steps.

Yes. shiv is actively maintained, has low install friction, no security vulnerabilities, and solves a real distribution problem for Python CLI tools and applications. Install it if you need to package Python applications as standalone executables; skip it if your users already have Python environments or if your dependencies include platform-specific C extensions that must work across multiple architectures.

Install

shiv on PyPI

pip

pip install shiv

uv

uv add shiv

poetry

poetry add shiv

Installing shiv

Before you install

Low friction installation via pip with a pure-wheel distribution. The package is actively maintained (last commit 2026-05-22) and supports current Python versions (3.8+). Runtime dependencies are lightweight and widely available (click, pip, setuptools, importlib-resources).

License in practice

BSD License (permissive) means you can use shiv freely in commercial and private projects with minimal restrictions, requiring only license attribution.

Quickstart

pip install shiv
shiv -c flake8 -o ~/bin/flake8 flake8
~/bin/flake8 --version

Requires Python 3.6+; zipapps with C extensions may not be cross-platform compatible (e.g., a .pyz built on macOS may only run on macOS).

Verify before relying

  • Whether the generated zipapps work reliably with all dependency types (pure Python vs. C extensions) in production environments.
  • Performance overhead of zipapp extraction into ~/.shiv on repeated invocations.
  • Compatibility guarantees with future Python versions beyond 3.11.

Package facts

License BSD License (permissive)
Python support supports the current Python release (>=3.6)
Install friction low — pure-Python wheel
Runtime dependencies 4 — click, pip, setuptools, importlib-resources
Maintenance actively maintained — 651 days since the last release
Last repo commit
First released
Downloads 425,118/month — #6,761 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: shiv-1.0.8-py2.py3-none-any.whl

License :: OSI Approved :: BSD LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Tags

python zipapp builderself-contained python executablepython app packagingdistribute python cli toolspython dependency bundlercreate standalone python binarypyz file generator
packagingdistributioncli-tools

More Build Tools packages