# pyfuze: Package Python Projects into Standalone Executables

This repository profile is provided by osrepos.com, an open source repository discovery platform.

Source: osrepos.com
Repository profile: https://osrepos.com/repo/tanixlu-pyfuze
Generated for open source discovery and AI-assisted research.

pyfuze is a powerful tool designed to package Python projects into single, standalone executables. Leveraging `cosmopolitan` and `uv`, it offers flexible packaging modes, including bundle, online, and portable, to suit various deployment needs. This allows developers to easily distribute their Python applications across different platforms without requiring a Python environment on the target machine.

GitHub: https://github.com/TanixLu/pyfuze
OSRepos URL: https://osrepos.com/repo/tanixlu-pyfuze

## Summary

pyfuze is a powerful tool designed to package Python projects into single, standalone executables. Leveraging `cosmopolitan` and `uv`, it offers flexible packaging modes, including bundle, online, and portable, to suit various deployment needs. This allows developers to easily distribute their Python applications across different platforms without requiring a Python environment on the target machine.

## Topics

- pyfuze
- Python packaging
- executable builder
- cross-platform
- application distribution
- bundle
- freeze
- pyinstaller alternative

## Repository Information

Last analyzed by OSRepos: Sun Feb 08 2026 08:01:17 GMT+0000 (Western European Standard Time)
Detail views: 11
GitHub clicks: 12

## Safety Notice

OSRepos shares public repositories for knowledge and discovery only. Review source code, dependencies, licenses, and security implications before running or installing anything.

## Content

## Introduction

pyfuze is an innovative open-source tool that simplifies the process of transforming your Python projects into standalone executables. Built upon the robust foundations of [cosmopolitan](https://github.com/jart/cosmopolitan) and [uv](https://github.com/astral-sh/uv), pyfuze addresses the common challenge of distributing Python applications by bundling all necessary dependencies and the Python interpreter itself into a single file. It offers three distinct packaging modes, each tailored for specific requirements regarding offline capability, cross-platform compatibility, and package size.

## Installation

Getting started with pyfuze is straightforward. You can install it directly using pip:

bash
pip install pyfuze


Alternatively, you can run it directly with `uvx`:

bash
uvx pyfuze -h


## Examples

pyfuze provides flexible options to package your Python applications, adapting to different project structures and deployment scenarios. Here are some common use cases:

### Portable Mode

The portable mode is ideal for generating a standalone, cross-platform executable, particularly well-suited for simpler scripts. It requires no extraction or internet connection at runtime.

bash
pyfuze ./examples/simple.py --mode portable --reqs requests


### Bundle Mode

For more complex projects, the bundle mode packages your application with Python and all its dependencies. This example demonstrates packaging a folder-based project, specifying the entry file, including `pyproject.toml` and `uv.lock` for dependency management, and adding extra files while excluding others. The `--win-gui` option is perfect for GUI applications on Windows.

bash
pyfuze ./examples/complex \
  --entry app.py \
  --pyproject ./examples/complex/pyproject.toml \
  --uv-lock ./examples/complex/uv.lock \
  --include ./examples/complex/config.txt \
  --exclude ./examples/complex/build.py \
  --unzip-path complex \
  --win-gui


### Online Mode

The online mode creates a smaller, cross-platform package. It requires an internet connection at runtime to download Python and dependencies. This mode can be configured with mirror URLs for improved reliability in restricted network environments.

bash
pyfuze ./examples/complex \
  --entry app.py \
  --pyproject ./examples/complex/pyproject.toml \
  --uv-lock ./examples/complex/uv.lock \
  --include ./examples/complex/config.txt \
  --exclude ./examples/complex/build.py \
  --unzip-path complex \
  --win-gui \
  --mode online \
  --uv-install-script-windows <uv-windows-installer-mirror-url> \
  --uv-install-script-unix <uv-unix-installer-mirror-url> \
  --env INSTALLER_DOWNLOAD_URL=<uv-binary-mirror-url> \
  --env UV_PYTHON_INSTALL_MIRROR=<python-install-mirror-url> \
  --env UV_DEFAULT_INDEX=<pypi-mirror-url>


## Why use pyfuze?

pyfuze offers a compelling solution for Python developers looking to simplify application distribution. Its key advantages include:

*   **Simplified Distribution:** Package your entire Python application, including the interpreter and all dependencies, into a single executable, eliminating the need for users to install Python or manage virtual environments.
*   **Flexible Packaging Modes:** Choose between 'bundle' for maximum compatibility on a single platform, 'online' for smaller cross-platform packages with runtime downloads, or 'portable' for truly standalone, pure Python cross-platform executables.
*   **Cross-Platform Support:** With 'online' and 'portable' modes, pyfuze enables your applications to run on macOS (ARM64 and AMD64), Linux (AMD64), and Windows (AMD64).
*   **Leverages Modern Tools:** Built on `cosmopolitan` and `uv`, pyfuze benefits from efficient dependency resolution and robust executable creation.
*   **Ease of Use:** A straightforward command-line interface makes packaging your projects quick and efficient.

## Links

Explore pyfuze further using these official resources:

*   [GitHub Repository](https://github.com/TanixLu/pyfuze)
*   [PyPI Page](https://pypi.org/project/pyfuze/)
*   [Report Issues](https://github.com/TanixLu/pyfuze/issues)
*   [Join Discord](https://discord.gg/GE9FyB5vtt)