Skill Tracer
Skills › HyperFrames › hyperframes-cli › cloudrun.md

cloudrun.md

62 lines · skills/hyperframes-cli/references/cloudrun.md at a595755

Open on GitHub

Most marks come from matching words in the file, so treat them as pointers.

1# Cloud Run rendering on Google Cloud
2
3Use `hyperframes cloudrun` only when the user explicitly wants self-managed Google Cloud infrastructure. It deploys Cloud Run, Workflows, and Cloud Storage. For a managed default use `hyperframes cloud`; for AWS use `hyperframes lambda`.
4

Cloud Run rendering on Google Cloud

Use hyperframes cloudrun only when the user explicitly wants self-managed Google Cloud infrastructure. It deploys Cloud Run, Workflows, and Cloud Storage. For a managed default use hyperframes cloud; for AWS use hyperframes lambda.

Raw lines 1 to 4
5## Prerequisites
6
7- `gcloud` is authenticated and the target project has billing enabled.
8- Terraform 1.5 or newer is on `PATH`.
9- Docker or permission to use Cloud Build is available.

Prerequisites

  • gcloud is authenticated and the target project has billing enabled.
  • Terraform 1.5 or newer is on PATH.
  • Docker or permission to use Cloud Build is available.
Raw lines 5 to 10
11## Lifecycle
13```bash
14npx hyperframes cloudrun deploy --project <gcp-project> --region us-central1
15npx hyperframes cloudrun sites create ./project
16npx hyperframes cloudrun render ./project --width 1920 --height 1080 --wait
17npx hyperframes cloudrun progress <execution-name>
18npx hyperframes cloudrun destroy --project <gcp-project>
19```
21`deploy` enables the required Google APIs, builds or accepts a container image, applies the bundled Terraform module, and stores the resulting coordinates in `~/.hyperframes/cloudrun-state.json`. Use deploy flags such as `--image`, `--repo`, `--cpu`, `--memory`, `--max-instances`, and `--timeout` only when the infrastructure needs those overrides.
23`sites create` uploads a content-addressed project archive for reuse by `render-batch`; pass its `--site-id` to that command to skip the batch upload. Single `cloudrun render` currently resolves the project from its directory and does not consume `--site-id`. Both render commands require `--width` and `--height`; supported output formats are `mp4`, `mov`, `png-sequence`, and `webm`. Use `--output-resolution 4k` to supersample an authored composition without changing its layout dimensions.
25Common render flags are `--fps 24|25|30|60`, `--quality draft|standard|high`, `--codec h264|h265` for MP4, `--chunk-size`, `--max-parallel-chunks`, `--target-chunk-frames`, `--render-id`, `--output-key`, `--wait`, and `--wait-interval-ms`. Use `--json` for machine-readable output.
27For a variable-driven single render:
29```bash
30npx hyperframes cloudrun render ./template \
31 --width 1920 --height 1080 \
32 --variables-file ./alice.json \
33 --strict-variables \
34 --wait
35```
37Use exactly one of `--variables` and `--variables-file`. Read [Variables](../../hyperframes/references/format.md#variables) for the composition-side contract.

Lifecycle

npx hyperframes cloudrun deploy --project <gcp-project> --region us-central1
npx hyperframes cloudrun sites create ./project
npx hyperframes cloudrun render ./project --width 1920 --height 1080 --wait
npx hyperframes cloudrun progress <execution-name>
npx hyperframes cloudrun destroy --project <gcp-project>

deploy enables the required Google APIs, builds or accepts a container image, applies the bundled Terraform module, and stores the resulting coordinates in ~/.hyperframes/cloudrun-state.json. Use deploy flags such as --image, --repo, --cpu, --memory, --max-instances, and --timeout only when the infrastructure needs those overrides.

sites create uploads a content-addressed project archive for reuse by render-batch; pass its --site-id to that command to skip the batch upload. Single cloudrun render currently resolves the project from its directory and does not consume --site-id. Both render commands require --width and --height; supported output formats are mp4, mov, png-sequence, and webm. Use --output-resolution 4k to supersample an authored composition without changing its layout dimensions.

Common render flags are --fps 24|25|30|60, --quality draft|standard|high, --codec h264|h265 for MP4, --chunk-size, --max-parallel-chunks, --target-chunk-frames, --render-id, --output-key, --wait, and --wait-interval-ms. Use --json for machine-readable output.

For a variable-driven single render:

npx hyperframes cloudrun render ./template \
  --width 1920 --height 1080 \
  --variables-file ./alice.json \
  --strict-variables \
  --wait

Use exactly one of --variables and --variables-file. Read Variables for the composition-side contract.

Raw lines 11 to 38
39## JSONL batches
41```bash
42npx hyperframes cloudrun render-batch ./template \
43 --batch ./users.jsonl \
44 --width 1920 --height 1080 \
45 --max-concurrent 10 \
46 --site-id <site-id> \
47 --json
48```
50Each nonblank line must contain an `outputKey`; `variables` is optional:
52```json
53{ "outputKey": "renders/alice.mp4", "variables": { "name": "Alice" } }
54```
56- `--max-concurrent` defaults to `50` and limits in-flight executions. `--max-parallel-chunks` separately limits chunks inside one render.
57- `--dry-run` parses the file and prints `would-start` rows without starting executions.
58- The template uploads once unless `--site-id` is supplied.
59- Per-entry start errors remain visible and make the command exit nonzero.
60- Do not rely on `--strict-variables` for `cloudrun render-batch`: the current command accepts the flag but does not validate batch rows. Validate the JSONL variable objects against the composition schema before dispatch. The strict gate does work for single `cloudrun render`.
62`render` without `--wait` returns an execution name. Use `cloudrun progress <execution-name>` until it succeeds, then verify the reported GCS output. `destroy` removes the Terraform-managed stack and its scratch bucket; preserve any deliverables that must outlive the stack.

JSONL batches

npx hyperframes cloudrun render-batch ./template \
  --batch ./users.jsonl \
  --width 1920 --height 1080 \
  --max-concurrent 10 \
  --site-id <site-id> \
  --json

Each nonblank line must contain an outputKey; variables is optional:

{ "outputKey": "renders/alice.mp4", "variables": { "name": "Alice" } }
  • --max-concurrent defaults to 50 and limits in-flight executions. --max-parallel-chunks separately limits chunks inside one render.
  • --dry-run parses the file and prints would-start rows without starting executions.
  • The template uploads once unless --site-id is supplied.
  • Per-entry start errors remain visible and make the command exit nonzero.
  • Do not rely on --strict-variables for cloudrun render-batch: the current command accepts the flag but does not validate batch rows. Validate the JSONL variable objects against the composition schema before dispatch. The strict gate does work for single cloudrun render.

render without --wait returns an execution name. Use cloudrun progress <execution-name> until it succeeds, then verify the reported GCS output. destroy removes the Terraform-managed stack and its scratch bucket; preserve any deliverables that must outlive the stack.

Raw lines 39 to 62
Starts an agent dispatch :60