tars-renderer 0.0.0-stage → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +178 -2
- package/package.json +29 -4
- package/tars-renderer.mjs +1894 -0
package/README.md
CHANGED
|
@@ -1,3 +1,179 @@
|
|
|
1
|
-
#
|
|
1
|
+
# tars-renderer
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**Render Remotion videos in the cloud from your terminal, or let your AI coding agent do it.**
|
|
4
|
+
|
|
5
|
+
`tars-renderer` is the command-line client for **Tars Renderer**, the Tars team's Remotion render farm. Upload a built Remotion project, pick a composition, render it on AWS Lambda (hundreds of workers in parallel) and download the MP4, all without AWS keys. Everything you do here also shows up live in the web portal, and the other way round.
|
|
6
|
+
|
|
7
|
+
- **One command, every OS.** No dependencies; needs Node.js 18 or newer.
|
|
8
|
+
- **Sign in through your browser.** No passwords or keys in the terminal. The token goes into your OS keychain.
|
|
9
|
+
- **Fast transfers.** Only changed files are uploaded, hashes are cached, big files go up in parallel parts, and downloads use 8 parallel connections.
|
|
10
|
+
- **Safe by default.** It shows the cost before every render and asks first. A monthly team budget and per-person limits apply.
|
|
11
|
+
- **Agent-ready.** `--json` output, clear exit codes and a built-in guide for Claude Code, Codex and Cursor.
|
|
12
|
+
|
|
13
|
+
> **Portal: [tars-renderer.vercel.app](https://tars-renderer.vercel.app).** Access is invite-only. You need a Tars Renderer account (your work email on the allowlist).
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Install
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
npm i -g tars-renderer
|
|
21
|
+
tars-renderer --version
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Update any time with `npm i -g tars-renderer@latest`.
|
|
25
|
+
|
|
26
|
+
<details>
|
|
27
|
+
<summary>"tars-renderer" is not recognized / command not found</summary>
|
|
28
|
+
|
|
29
|
+
- Close and reopen the terminal, so it picks up the new command.
|
|
30
|
+
- Still missing? npm's global folder isn't on your `PATH`. Run `npm prefix -g`; the command lives in that folder (Windows) or its `bin` folder (macOS/Linux). Add it to `PATH`.
|
|
31
|
+
- If npm is blocked on your network, install the copy your portal serves: `npm i -g https://<portal>/cli/tars-renderer.tgz`.
|
|
32
|
+
</details>
|
|
33
|
+
|
|
34
|
+
## Sign in
|
|
35
|
+
|
|
36
|
+
```sh
|
|
37
|
+
tars-renderer login
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
No address needed: the CLI signs in to [tars-renderer.vercel.app](https://tars-renderer.vercel.app).
|
|
41
|
+
|
|
42
|
+
1. The CLI shows a code such as `KQ7M-4TZP` and opens the portal in your browser.
|
|
43
|
+
2. Sign in if asked, **check that the code matches**, and click **Approve**.
|
|
44
|
+
3. Back in the terminal you're signed in. Check with `tars-renderer doctor`.
|
|
45
|
+
|
|
46
|
+
Your sign-in lasts 90 days. If an admin removes your access, the CLI stops working immediately.
|
|
47
|
+
|
|
48
|
+
### Sign out
|
|
49
|
+
|
|
50
|
+
```sh
|
|
51
|
+
tars-renderer logout # sign out this device: revoked on the server, removed from your keychain
|
|
52
|
+
tars-renderer logout --all # sign out every device and agent on your account (lost laptop?)
|
|
53
|
+
tars-renderer logout --purge # also delete ~/.tars-renderer (settings and upload cache)
|
|
54
|
+
tars-renderer logout --local # offline: forget the sign-in here only
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
You can also see your devices, and sign out one or all of them, on the portal's **CLI & Agents** page.
|
|
58
|
+
|
|
59
|
+
## Quick start
|
|
60
|
+
|
|
61
|
+
```sh
|
|
62
|
+
# 1. Build your Remotion project (same Remotion version as the renderer, currently 4.0.535)
|
|
63
|
+
npx remotion bundle src/index.ts --out-dir build
|
|
64
|
+
|
|
65
|
+
# 2. Create a project (once) and upload the build. Only changed files are sent.
|
|
66
|
+
tars-renderer create "Q4 launch film"
|
|
67
|
+
tars-renderer upload build --project q4-launch-film-x7k2
|
|
68
|
+
|
|
69
|
+
# 3. See the compositions, then render one: it shows the cost and asks first
|
|
70
|
+
tars-renderer comps q4-launch-film-x7k2
|
|
71
|
+
tars-renderer render q4-launch-film-x7k2 Main --res 1080p --watch --download
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
Main in q4-launch-film-x7k2
|
|
76
|
+
Output 1920×1080 · 9,360 frames
|
|
77
|
+
Estimate $0.94
|
|
78
|
+
Budget $12.30 of $50.00 spent this month · 0 active renders of yours
|
|
79
|
+
Start this render for $0.94? [y/N] y
|
|
80
|
+
✔ Render started: k97abc123def456
|
|
81
|
+
▮▮▮▮▮▮▮▮▮▮▮▮▯▯▯▯▯▯▯▯▯▯▯▯ 52% 4,867 frames ~$0.49 1m 12s rendering
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Testing something new? Start small: `--res 360p --seconds 0-10` costs cents.
|
|
85
|
+
|
|
86
|
+
## Use it with an AI coding agent
|
|
87
|
+
|
|
88
|
+
Open Claude Code, Codex or Cursor in your Remotion project folder and ask it to render. The agent can run everything itself, and it always shows you the cost and waits for your yes before rendering. Give it the full instructions with:
|
|
89
|
+
|
|
90
|
+
```sh
|
|
91
|
+
tars-renderer agent-guide
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
or click **Copy agent instructions** on the portal and paste them into the agent. The agent never needs keys: you approve its sign-in in your own browser, and the CLI only ever shows a masked token (`trp_ab12…`).
|
|
95
|
+
|
|
96
|
+
## Commands
|
|
97
|
+
|
|
98
|
+
Every command accepts `--help` and `--json`. `<project>` takes a project slug or id.
|
|
99
|
+
|
|
100
|
+
| Command | What it does |
|
|
101
|
+
|---|---|
|
|
102
|
+
| `login` | Sign in through the browser (to tars-renderer.vercel.app) |
|
|
103
|
+
| `logout [--all] [--local] [--purge]` | Sign out this device; `--all` signs out every device on your account |
|
|
104
|
+
| `whoami` | Who you're signed in as |
|
|
105
|
+
| `doctor` | Check Node, sign-in, the API connection and your access |
|
|
106
|
+
| `projects [--mine]` | List projects |
|
|
107
|
+
| `create <name> [--keep 7-days\|30-days\|90-days\|never]` | Create a project |
|
|
108
|
+
| `upload <buildDir> --project <project> [--yes]` | Upload a build; only changed files are sent |
|
|
109
|
+
| `comps <project>` | List compositions (size, fps, duration, frames) |
|
|
110
|
+
| `estimate <project> <composition> [render options]` | Cost, output size and frames, without rendering |
|
|
111
|
+
| `render <project> <composition> [render options] [--watch] [--download [path]] [--yes]` | Start a render |
|
|
112
|
+
| `renders [--mine] [--project <p>] [--status <s>]` | List renders |
|
|
113
|
+
| `status <renderId>` | A render's current state |
|
|
114
|
+
| `watch <renderId>` | Follow a render live (exit 0 when done, 1 if it fails) |
|
|
115
|
+
| `download <renderId> [--out <path>]` | Download a finished render |
|
|
116
|
+
| `link <renderId>` | A share link, valid 24 hours |
|
|
117
|
+
| `delete-render <renderId>` / `delete-project <project>` | Delete (asks first) |
|
|
118
|
+
| `agent-guide` | Instructions for AI coding agents |
|
|
119
|
+
|
|
120
|
+
### Render options
|
|
121
|
+
|
|
122
|
+
Also accepted by `estimate`.
|
|
123
|
+
|
|
124
|
+
| Option | Values | Default |
|
|
125
|
+
|---|---|---|
|
|
126
|
+
| `--res` | `360p`, `720p`, `1080p`, `4k` | `1080p` |
|
|
127
|
+
| `--quality` | `draft`, `standard`, `high` | `standard` |
|
|
128
|
+
| `--seconds a-b` | a time range, e.g. `0-10` | whole video |
|
|
129
|
+
| `--frames a-b` | a frame range, inclusive, e.g. `0-299` | whole video |
|
|
130
|
+
| `--muted` | no audio | off |
|
|
131
|
+
| `--keep` | `1-day`, `3-days`, `7-days`, `30-days`, `forever` | `7-days` |
|
|
132
|
+
|
|
133
|
+
Renders above **$5** always ask for an extra confirmation. Each person can have **2 renders running** at once, and the team has a **monthly budget**.
|
|
134
|
+
|
|
135
|
+
## How uploads work
|
|
136
|
+
|
|
137
|
+
- Pass the **build folder** (`index.html` and `bundle.js` at its top). If you pass the project root by mistake, the CLI tells you which folder to use.
|
|
138
|
+
- The Remotion version is read from `bundle.js` and must match the renderer's (use `--version` to override detection).
|
|
139
|
+
- Files are hashed (SHA-256) and only new or changed files are sent. Hashes are cached, so re-uploading an unchanged build takes seconds (`--rehash` ignores the cache).
|
|
140
|
+
- Big files go up in 16 MB parts. Everything shares one parallel queue with retries, and expired upload links are renewed automatically.
|
|
141
|
+
- Builds can have up to 8,000 files, 5 GB per file and 20 GB in total.
|
|
142
|
+
- If an upload fails, run the same command again: anything already uploaded is skipped.
|
|
143
|
+
|
|
144
|
+
## JSON mode (scripts and agents)
|
|
145
|
+
|
|
146
|
+
With `--json`, a command prints **exactly one JSON document on stdout**. Progress and logs go to stderr, and errors are JSON too: `{ "ok": false, "error": "…", "exitCode": 1 }`.
|
|
147
|
+
|
|
148
|
+
| Exit code | Meaning |
|
|
149
|
+
|---|---|
|
|
150
|
+
| `0` | Success |
|
|
151
|
+
| `1` | Error (see `error`) |
|
|
152
|
+
| `2` | Bad usage |
|
|
153
|
+
| `3` | Confirmation needed. Show the user the details, then re-run with `--yes` |
|
|
154
|
+
| `4` | Not signed in, or the sign-in expired. Run `tars-renderer login` |
|
|
155
|
+
| `130` | Cancelled with Ctrl-C |
|
|
156
|
+
|
|
157
|
+
Without `--yes`, any step that would ask (upload, render, delete) stops with exit code 3 and prints what it would do, including the cost estimate.
|
|
158
|
+
|
|
159
|
+
## Security
|
|
160
|
+
|
|
161
|
+
- Sign-in is a one-time code you approve in your browser, and only allowlisted accounts can approve it.
|
|
162
|
+
- The token is stored in the **macOS Keychain**, **Windows DPAPI** or the **Linux Secret Service**. It's kept in `~/.tars-renderer/config.json` (owner-only) only if none of those is available. `tars-renderer doctor` shows where it is.
|
|
163
|
+
- The CLI masks tokens in all output, only talks to `https://` servers (or localhost for development), and never handles AWS credentials.
|
|
164
|
+
- For CI, set `TARS_RENDERER_API` and `TARS_RENDERER_TOKEN` as environment variables instead of signing in.
|
|
165
|
+
|
|
166
|
+
## Troubleshooting
|
|
167
|
+
|
|
168
|
+
| Problem | Fix |
|
|
169
|
+
|---|---|
|
|
170
|
+
| `Not signed in` / exit code 4 | `tars-renderer login` |
|
|
171
|
+
| `This build uses Remotion X` | Pin `remotion` and every `@remotion/*` package to the renderer's version, rebuild, upload again |
|
|
172
|
+
| `index.html and bundle.js not found` | Pass the `build` folder, not the project root |
|
|
173
|
+
| `A render of this project is running` | Wait for it to finish, then re-upload |
|
|
174
|
+
| `access denied` when approving | Ask an admin to add your work email |
|
|
175
|
+
| Anything else | `tars-renderer doctor`, then `DEBUG=1 tars-renderer <command>` for details |
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
**Tars Renderer:** [tars-renderer.vercel.app](https://tars-renderer.vercel.app) (invite-only). Requires Node.js 18+.
|
package/package.json
CHANGED
|
@@ -1,6 +1,31 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tars-renderer",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"description": "Command line for the Tars Renderer: upload Remotion builds, render on AWS Lambda, download the MP4.",
|
|
5
|
+
"homepage": "https://tars-renderer.vercel.app",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"bin": {
|
|
8
|
+
"tars-renderer": "tars-renderer.mjs"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"tars-renderer.mjs",
|
|
12
|
+
"README.md"
|
|
13
|
+
],
|
|
14
|
+
"engines": {
|
|
15
|
+
"node": ">=18"
|
|
16
|
+
},
|
|
17
|
+
"keywords": [
|
|
18
|
+
"remotion",
|
|
19
|
+
"render",
|
|
20
|
+
"lambda",
|
|
21
|
+
"cli",
|
|
22
|
+
"tars",
|
|
23
|
+
"remotion-lambda",
|
|
24
|
+
"video",
|
|
25
|
+
"ai-agent"
|
|
26
|
+
],
|
|
27
|
+
"license": "UNLICENSED",
|
|
28
|
+
"publishConfig": {
|
|
29
|
+
"access": "public"
|
|
30
|
+
}
|
|
31
|
+
}
|