Skip to main content

End-user CLI for deploying apps to urun

Project description

urun CLI

Deploy Python apps to urun from your terminal.

PyPI Python

Install

uv tool install urun-cli
# or
pip install urun-cli

The package installs the urun command:

urun --version

For one-off uvx usage:

uvx --from urun-cli urun --version
# or the package-matching command alias
uvx urun-cli --version

Quick start

Today, an operator manually vends an org-scoped deploy API key. Save it locally with urun login:

urun login --api-key urun_<32hex>

urun login verifies the key with the urun API and stores credentials for later commands. The future browser-based login flow is not available in this CLI release.

For CI or one-off commands, you can still use the environment variable:

export URUN_API_KEY=urun_<32hex>

Create app.py:

import urun
from urun import App

app = App("hello-h100")


@app.function(gpus="h100:1")
def hello(ctx: urun.Context):
    print(f"running on {ctx.device}")
    return {"device": str(ctx.device)}

Run it:

urun run app.py

In this release, urun run uses the same deploy pipeline as urun deploy. deploy remains available as the lower-level command while the full deploy/run/monitor workflow is being built.

What gets deployed

urun deploy creates a source manifest from your Python entrypoint:

Entrypoint Included source
urun deploy app.py app.py and local Python files it imports

Dependencies are declared in your urun app code. Project-level files such as pyproject.toml and requirements.txt are not uploaded as dependency declarations by the CLI.

Generated/cache content such as .git, dotfiles, __pycache__, and .pyc files is excluded. Add .urunignore to exclude additional paths.

Non-Python assets such as templates, static files, and data files are not auto-included yet.

Common options

Shared by run and deploy:

Option Description
--name Override the derived app name.
--api-url Override the API URL; defaults to URUN_API_URL, saved login credentials, or https://api.urun.sh/v1.
--api-key Deploy API key; defaults to URUN_API_KEY or saved login credentials.
--no-wait Finalize but do not poll for readiness.
--poll-interval, --timeout Control readiness polling.

Troubleshooting

Error Fix
missing API key Run urun login, set URUN_API_KEY, or pass --api-key.
invalid API key format Use urun_<32 lowercase hex chars>.
entrypoint not found Run from the project root or pass the entrypoint path.
path is outside the project root Move the file under the project before deploying.
Expected files are missing Import local Python files from app.py; non-Python assets are not auto-included yet.

Development

Contributing and test instructions are in CONTRIBUTING.md.

License

MIT.

Development environment

This repo has a Nix/direnv/devcontainer baseline:

direnv allow
just sync
just check

Use VS Code Dev Containers to open the repository with the same toolchain in a container. Copy devcontainer.env.example to .devcontainer.env if you need to pass local git identity or other non-secret development settings into the container.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

urun_cli-0.3.1.tar.gz (17.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

urun_cli-0.3.1-py3-none-any.whl (19.6 kB view details)

Uploaded Python 3

File details

Details for the file urun_cli-0.3.1.tar.gz.

File metadata

  • Download URL: urun_cli-0.3.1.tar.gz
  • Upload date:
  • Size: 17.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for urun_cli-0.3.1.tar.gz
Algorithm Hash digest
SHA256 661db481ee652bff820ece1bfb54f32a8d22f2516166000441b143e4f9f6b2af
MD5 5eefb226abc5e71e28be8b02bc6c568f
BLAKE2b-256 d4f821b162c1c7c71881150c53e624b9de7813d68e6479a5c5758d787414aff9

See more details on using hashes here.

Provenance

The following attestation bundles were made for urun_cli-0.3.1.tar.gz:

Publisher: release.yaml on urun-sh/urun-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file urun_cli-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: urun_cli-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 19.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for urun_cli-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f7d8dd68c5102d327bf65bae7064b87bb829a7de1c27b2421ea1afc040097533
MD5 bb03d72ab24d870cddfcb47208be6e9f
BLAKE2b-256 c82cb0d669a95e563d8a35f222287f57b0d7b52741ae659e973f7b9cdd7f43be

See more details on using hashes here.

Provenance

The following attestation bundles were made for urun_cli-0.3.1-py3-none-any.whl:

Publisher: release.yaml on urun-sh/urun-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page