GitHub - metaist/cosmofy: Cosmopolitan Python Bundler

1 min read Original article ↗

Build PyPI Supported Python Versions

cosmofy bundles your Python app using uv into a single executable which runs on Linux, macOS, and Windows using Cosmopolitan libc.

Install

uv tool install cosmofy  # recommended
# or
pip install cosmofy      # classic

Or download the portable binary.

Quick Example

Define your entry point in pyproject.toml:

[project.scripts]
my_command = "my_command.__main__:main"

Bundle your project:

uvx cosmofy bundle  # produces dist/my_command

Or bundle a script:

uv init --script myscript.py
uvx cosmofy bundle --script myscript.py  # produces dist/myscript

Limitations

  • Pure-Python only (no C extensions) - see #94
  • Tied to latest Cosmopolitan Python version - see #44

Documentation

Read the full documentation

License

MIT License