Skip to main content

Run any command in the cloud. Close your laptop, keep running.

Project description

tup

Run any command in the cloud. Close your laptop, keep running.

# Local
uv run python train.py

# Cloud (just prefix with tup)
tup uv run python train.py

Installation

pip install tup

Quick Start

# Configure (one-time)
tup config set api_url https://tup-api.your-account.workers.dev

# Run a command in the cloud
tup python train.py --epochs 100

# Detach and check later
tup --detach python train.py --epochs 1000
tup logs        # Stream logs
tup status      # Check job status

Usage

tup <command>                    # Run command, stream logs until done
tup --detach <command>           # Run in background, return job ID
tup --name "exp-v1" <command>    # Named job for easy reference

tup logs [job-id]                # Stream logs (default: latest job)
tup status                       # List all jobs
tup stop <job-id>                # Kill a running job
tup attach <job-id>              # Reattach to running job's logs

Options

--detach, -d          Run in background
--name, -n NAME       Job name
--instance TYPE       Instance size: lite, basic, standard-1, standard-2, standard-3, standard-4
--env KEY=VALUE       Pass environment variable (can repeat)
--timeout DURATION    Max runtime (e.g., "2h", "30m", "1d")

Configuration

Configuration is stored in ~/.tup/config.toml:

[default]
api_url = "https://tup-api.your-account.workers.dev"

[env]
# Environment variables passed to all jobs
WANDB_API_KEY = "your-key"
TINKER_API_KEY = "your-key"

Or use environment variables:

export TUP_API_URL="https://tup-api.your-account.workers.dev"

How It Works

  1. tup packages your current directory (respecting .gitignore)
  2. Uploads the bundle to Cloudflare R2
  3. Spins up a container with your command
  4. Streams logs back to your terminal
  5. Container runs until your command exits

Self-Hosting

Deploy your own tup backend:

cd worker
cp wrangler.example.toml wrangler.toml
# Edit wrangler.toml with your account details
pnpm install
pnpm run deploy

See CONTRIBUTING.md for architecture details.

Instance Types

Type vCPU Memory Disk ~Cost/hour
lite 1/16 256MB 2GB $0.002
basic 1/4 1GB 4GB $0.01
standard-1 1/2 4GB 8GB $0.04
standard-2 1 6GB 12GB $0.08
standard-3 2 8GB 16GB $0.16
standard-4 4 12GB 20GB $0.32

License

MIT

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

tup_cli-0.1.0.tar.gz (13.6 kB view details)

Uploaded Source

Built Distribution

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

tup_cli-0.1.0-py3-none-any.whl (15.8 kB view details)

Uploaded Python 3

File details

Details for the file tup_cli-0.1.0.tar.gz.

File metadata

  • Download URL: tup_cli-0.1.0.tar.gz
  • Upload date:
  • Size: 13.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.8

File hashes

Hashes for tup_cli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1930c71b8869122f6d0530b14accf57dea0be9f0b83e019b4fe7d923d2ca1246
MD5 7679ccaa5291ca2ed5cb7a1eaa4034df
BLAKE2b-256 07fa1526d3e2ac5f754a3fc3d601d5007e3c7bae0d2e2c276ea66ff520747bc7

See more details on using hashes here.

File details

Details for the file tup_cli-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: tup_cli-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 15.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.8

File hashes

Hashes for tup_cli-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e7b4211638059b0c799f04de5e1f798257dce7b99087dde9a4f09f67c732cdf6
MD5 835704874a98a09201ddb3f1f1018134
BLAKE2b-256 01696787eeb0298c85fcf41e656c56dee58dfe009c07775fb347fd8af792501d

See more details on using hashes here.

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