Skip to content

Getting Started

Install

First, make sure you have uv installed.

Use the latest version without installing:

uvx cosmofy bundle

Using uv tool

Install globally:

uv tool install cosmofy

Using pip

pip install cosmofy

Direct Binary Download

You can also download the cosmofy binary directly.

dest=~/.local/bin/cosmofy
curl -sSz $dest -o $dest -L https://github.com/metaist/cosmofy/releases/latest/download/cosmofy
chmod +x $dest
$dest = "$env:LOCALAPPDATA\cosmofy\cosmofy.exe"
New-Item -ItemType Directory -Force -Path (Split-Path $dest)
Invoke-WebRequest -Uri "https://github.com/metaist/cosmofy/releases/latest/download/cosmofy" -OutFile $dest

Shell Completions

Enable tab completion for your shell:

Add to ~/.bashrc:

eval "$(cosmofy completions bash)"

Add to ~/.zshrc:

eval "$(cosmofy completions zsh)"

Or save to your fpath:

cosmofy completions zsh > ~/.zfunc/_cosmofy

Save to completions directory:

cosmofy completions fish > ~/.config/fish/completions/cosmofy.fish

Quick Example

Bundling a Project

First, define your entry point in pyproject.toml:

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

Then bundle:

uvx cosmofy bundle  # produces dist/my_command

Bundling a Script

You can also bundle individual Python files:

uv init --script myscript.py  # or: uv add --script myscript.py <dependency>
uvx cosmofy bundle --script myscript.py  # produces dist/myscript

Next Steps