From 054d79161043f906c6a782871fb9decd925265bf Mon Sep 17 00:00:00 2001 From: ryank90 Date: Tue, 22 Sep 2026 15:25:52 +0100 Subject: [PATCH 1/2] docs: add serverless to the README quick start and commands The generated command reference already covers the group; the README still only walked through inference. --- README.md | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 56 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index f81c0dc..b6d5c8b 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ A command-line tool for interacting with the [Runware](https://runware.ai) API. Built in Go, distributed as a single static binary. -Run image generation, video generation, audio generation, 3D, upscaling, background removal, captioning, search models, and more. +Run image generation, video generation, audio generation, 3D, upscaling, background removal, captioning, search models, and deploy serverless applications. ## Install @@ -45,6 +45,9 @@ runware ping # Generate an image runware run runware:400@1 positivePrompt="a chess match in the park" width=1024 height=1024 +# Deploy a serverless application +runware serverless deploy ./app.py --id my-app --gpu-type h100 --wait + # Check your account details runware account details ``` @@ -128,6 +131,54 @@ runware run tencent:hunyuan-3d@3.1-pro positivePrompt="A red vintage sports car" runware run tencent:hunyuan-3d@3.1-pro inputs.images.0="https://example.com/product.jpg" ``` +### `runware serverless` — applications + +Deploy, invoke, and manage Runware serverless applications. Full command reference is in [docs/runware_serverless.md](./docs/runware_serverless.md). + +```shell +# list GPU types and per-second pricing +runware serverless gpus + +# create from a Python entry file (the source directory is zipped and uploaded) +runware serverless deploy ./app.py --id my-app --gpu-type h100 --wait + +# create from a container source (Dockerfile + container.yaml at the directory root) +runware serverless deploy --id my-app --gpu-type h100 --container ./wrapper --wait + +# later deploys with the same --id upload a new source and roll version N+1 +runware serverless deploy ./app.py --id my-app --wait + +# inspect +runware serverless apps list +runware serverless apps show my-app +runware serverless apps endpoints my-app +runware serverless apps workers my-app --state live + +# invoke an endpoint (path is a bare segment, e.g. infer) +runware serverless apps invoke my-app infer -f payload.json --wait + +# logs, events, and usage +runware serverless apps logs my-app --follow +runware serverless apps events my-app +runware serverless usage --for this-month --group-by app,day +runware serverless apps usage my-app --for this-month + +# environment, secrets, and scale +runware serverless apps env set my-app MY_KEY --value-file ./value.txt +runware serverless secrets set FOO --value-file ./foo.txt +runware serverless secrets attach my-app FOO +runware serverless apps scale my-app --max-workers 2 + +# lifecycle +runware serverless apps stop my-app +runware serverless apps resume my-app +runware serverless open my-app +``` + +`--gpu-type`, worker settings, `--volume`, `--env`, `--env-file`, and `--name` apply on create only. Change workers with `apps scale` and environment with `apps env`. An environment change or a secret attach, detach, or rotation records a new version (or rolls live workers) — you do not need to redeploy source to apply them. + +`.env` files are never packed into the source archive. Prefer `--env-file` and `secrets set --value-file` so values stay out of the process list. + ### Authentication ```shell @@ -238,6 +289,7 @@ All commands support `--format json` for piping into `jq` or scripts. | Variable | Description | |----------|-------------| | `RUNWARE_API_KEY` | API key (overrides config file) | +| `RUNWARE_DASHBOARD_URL` | Dashboard base URL for `serverless open` (default `https://my.runware.ai`) | ### Config file @@ -354,9 +406,9 @@ Once installed, `Tab` works at every level: ``` # Complete subcommands $ runware -auth account completion config model -ping preset result run upload -version +auth account completion config media +model ping preset result run +serverless upload version # Complete model AIR identifiers for `run` $ runware run From cc4f450f17df79b036fca73c907a31f67bddc451 Mon Sep 17 00:00:00 2001 From: ryank90 Date: Tue, 22 Sep 2026 19:48:08 +0100 Subject: [PATCH 2/2] docs: say deploy zips the working directory or --src-dir The README implied the entry file's directory is packed. It is the working directory unless --src-dir is set, and apps scale can change the GPU type after create. --- README.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index b6d5c8b..2d52424 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ A command-line tool for interacting with the [Runware](https://runware.ai) API. Built in Go, distributed as a single static binary. -Run image generation, video generation, audio generation, 3D, upscaling, background removal, captioning, search models, and deploy serverless applications. +Run image generation, video generation, audio generation, 3D, upscaling, background removal, captioning, search models, deploy serverless applications, and more. ## Install @@ -136,46 +136,46 @@ runware run tencent:hunyuan-3d@3.1-pro inputs.images.0="https://example.com/prod Deploy, invoke, and manage Runware serverless applications. Full command reference is in [docs/runware_serverless.md](./docs/runware_serverless.md). ```shell -# list GPU types and per-second pricing +# List GPU types and per-second pricing runware serverless gpus -# create from a Python entry file (the source directory is zipped and uploaded) +# Create from a Python entry file (the working directory, or --src-dir, is zipped and uploaded) runware serverless deploy ./app.py --id my-app --gpu-type h100 --wait -# create from a container source (Dockerfile + container.yaml at the directory root) +# Create from a container source (Dockerfile + container.yaml at the directory root) runware serverless deploy --id my-app --gpu-type h100 --container ./wrapper --wait -# later deploys with the same --id upload a new source and roll version N+1 +# Later deploys with the same --id upload a new source and roll version N+1 runware serverless deploy ./app.py --id my-app --wait -# inspect +# Inspect runware serverless apps list runware serverless apps show my-app runware serverless apps endpoints my-app runware serverless apps workers my-app --state live -# invoke an endpoint (path is a bare segment, e.g. infer) +# Invoke an endpoint (path is a bare segment, e.g. infer) runware serverless apps invoke my-app infer -f payload.json --wait -# logs, events, and usage +# Logs, events, and usage runware serverless apps logs my-app --follow runware serverless apps events my-app runware serverless usage --for this-month --group-by app,day runware serverless apps usage my-app --for this-month -# environment, secrets, and scale +# Environment, secrets, and scale runware serverless apps env set my-app MY_KEY --value-file ./value.txt runware serverless secrets set FOO --value-file ./foo.txt runware serverless secrets attach my-app FOO runware serverless apps scale my-app --max-workers 2 -# lifecycle +# Lifecycle runware serverless apps stop my-app runware serverless apps resume my-app runware serverless open my-app ``` -`--gpu-type`, worker settings, `--volume`, `--env`, `--env-file`, and `--name` apply on create only. Change workers with `apps scale` and environment with `apps env`. An environment change or a secret attach, detach, or rotation records a new version (or rolls live workers) — you do not need to redeploy source to apply them. +`--volume`, `--env`, `--env-file`, and `--name` apply on create only. Change `--gpu-type` and other worker settings with `apps scale`, and environment with `apps env`. An environment change or a secret attach, detach, or rotation records a new version (or rolls live workers) — you do not need to redeploy source to apply them. `.env` files are never packed into the source archive. Prefer `--env-file` and `secrets set --value-file` so values stay out of the process list.