tars-renderer 0.0.0-stage → 1.1.1

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Tars (hellotars.com)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,188 @@
1
- # Temporary Holding Version
1
+ # tars-renderer
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
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
+ ### Add the skill to Claude Code or Codex
97
+
98
+ ```sh
99
+ npx -y tars-renderer skill install # Claude Code and Codex, for all your projects
100
+ npx -y tars-renderer skill install --repo # only this repo (.claude/skills, .codex/skills)
101
+ ```
102
+
103
+ Once the skill is added, just ask your agent to "render this Remotion project". It knows the whole workflow (version check, build, upload, estimate, render, download), always asks before spending money, and never handles keys. The portal's **CLI & Agents** page can also copy the skill, download it, or give you a prompt that makes the agent save it itself.
104
+
105
+ ## Commands
106
+
107
+ Every command accepts `--help` and `--json`. `<project>` takes a project slug or id.
108
+
109
+ | Command | What it does |
110
+ |---|---|
111
+ | `login` | Sign in through the browser (to tars-renderer.vercel.app) |
112
+ | `logout [--all] [--local] [--purge]` | Sign out this device; `--all` signs out every device on your account |
113
+ | `whoami` | Who you're signed in as |
114
+ | `doctor` | Check Node, sign-in, the API connection and your access |
115
+ | `projects [--mine]` | List projects |
116
+ | `create <name> [--keep 7-days\|30-days\|90-days\|never]` | Create a project |
117
+ | `upload <buildDir> --project <project> [--yes]` | Upload a build; only changed files are sent |
118
+ | `comps <project>` | List compositions (size, fps, duration, frames) |
119
+ | `estimate <project> <composition> [render options]` | Cost, output size and frames, without rendering |
120
+ | `render <project> <composition> [render options] [--watch] [--download [path]] [--yes]` | Start a render |
121
+ | `renders [--mine] [--project <p>] [--status <s>]` | List renders |
122
+ | `status <renderId>` | A render's current state |
123
+ | `watch <renderId>` | Follow a render live (exit 0 when done, 1 if it fails) |
124
+ | `download <renderId> [--out <path>]` | Download a finished render |
125
+ | `link <renderId>` | A share link, valid 24 hours |
126
+ | `delete-render <renderId>` / `delete-project <project>` | Delete (asks first) |
127
+ | `agent-guide` | Instructions for AI coding agents |
128
+
129
+ ### Render options
130
+
131
+ Also accepted by `estimate`.
132
+
133
+ | Option | Values | Default |
134
+ |---|---|---|
135
+ | `--res` | `360p`, `720p`, `1080p`, `4k` | `1080p` |
136
+ | `--quality` | `draft`, `standard`, `high` | `standard` |
137
+ | `--seconds a-b` | a time range, e.g. `0-10` | whole video |
138
+ | `--frames a-b` | a frame range, inclusive, e.g. `0-299` | whole video |
139
+ | `--muted` | no audio | off |
140
+ | `--keep` | `1-day`, `3-days`, `7-days`, `30-days`, `forever` | `7-days` |
141
+
142
+ 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**.
143
+
144
+ ## How uploads work
145
+
146
+ - 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.
147
+ - The Remotion version is read from `bundle.js` and must match the renderer's (use `--version` to override detection).
148
+ - 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).
149
+ - Big files go up in 16 MB parts. Everything shares one parallel queue with retries, and expired upload links are renewed automatically.
150
+ - Builds can have up to 8,000 files, 5 GB per file and 20 GB in total.
151
+ - If an upload fails, run the same command again: anything already uploaded is skipped.
152
+
153
+ ## JSON mode (scripts and agents)
154
+
155
+ 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 }`.
156
+
157
+ | Exit code | Meaning |
158
+ |---|---|
159
+ | `0` | Success |
160
+ | `1` | Error (see `error`) |
161
+ | `2` | Bad usage |
162
+ | `3` | Confirmation needed. Show the user the details, then re-run with `--yes` |
163
+ | `4` | Not signed in, or the sign-in expired. Run `tars-renderer login` |
164
+ | `130` | Cancelled with Ctrl-C |
165
+
166
+ 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.
167
+
168
+ ## Security
169
+
170
+ - Sign-in is a one-time code you approve in your browser, and only allowlisted accounts can approve it.
171
+ - 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.
172
+ - The CLI masks tokens in all output, only talks to `https://` servers (or localhost for development), and never handles AWS credentials.
173
+ - For CI, set `TARS_RENDERER_API` and `TARS_RENDERER_TOKEN` as environment variables instead of signing in.
174
+
175
+ ## Troubleshooting
176
+
177
+ | Problem | Fix |
178
+ |---|---|
179
+ | `Not signed in` / exit code 4 | `tars-renderer login` |
180
+ | `This build uses Remotion X` | Pin `remotion` and every `@remotion/*` package to the renderer's version, rebuild, upload again |
181
+ | `index.html and bundle.js not found` | Pass the `build` folder, not the project root |
182
+ | `A render of this project is running` | Wait for it to finish, then re-upload |
183
+ | `access denied` when approving | Ask an admin to add your work email |
184
+ | Anything else | `tars-renderer doctor`, then `DEBUG=1 tars-renderer <command>` for details |
185
+
186
+ ---
187
+
188
+ **Tars Renderer:** [tars-renderer.vercel.app](https://tars-renderer.vercel.app) (invite-only). Requires Node.js 18+. Licensed under the [MIT License](./LICENSE).
package/package.json CHANGED
@@ -1,6 +1,34 @@
1
1
  {
2
2
  "name": "tars-renderer",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "1.1.1",
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
+ "author": "Tars (https://hellotars.com)",
7
+ "license": "MIT",
8
+ "type": "module",
9
+ "bin": {
10
+ "tars-renderer": "tars-renderer.mjs"
11
+ },
12
+ "files": [
13
+ "tars-renderer.mjs",
14
+ "README.md",
15
+ "LICENSE",
16
+ "skill/SKILL.md"
17
+ ],
18
+ "engines": {
19
+ "node": ">=18"
20
+ },
21
+ "keywords": [
22
+ "remotion",
23
+ "render",
24
+ "lambda",
25
+ "cli",
26
+ "tars",
27
+ "remotion-lambda",
28
+ "video",
29
+ "ai-agent"
30
+ ],
31
+ "publishConfig": {
32
+ "access": "public"
33
+ }
34
+ }
package/skill/SKILL.md ADDED
@@ -0,0 +1,111 @@
1
+ ---
2
+ name: tars-renderer
3
+ description: Render Remotion videos in the cloud with Tars Renderer (the team's AWS Lambda render farm) through the `tars-renderer` CLI. Use when the user wants to render or export a Remotion composition to MP4, upload a Remotion build, check cost or render progress, list or download renders, or sign in to Tars Renderer from the terminal.
4
+ ---
5
+
6
+ # Tars Renderer
7
+
8
+ Tars Renderer renders Remotion projects on AWS Lambda for the Tars team: upload a built project, pick a composition, get an MP4 back. You drive it with the `tars-renderer` CLI. The portal is https://tars-renderer.vercel.app. The user never needs AWS keys.
9
+
10
+ ## Ground rules
11
+
12
+ - **Never ask for or handle secrets.** Sign-in happens in the user's browser. Don't open, read, print or copy anything in `~/.tars-renderer/`. The CLI only ever shows a masked token (`trp_ab12…`); if you see a full one, stop and tell the user to sign that device out on the portal's CLI & Agents page.
13
+ - **Cost needs a yes.** Always run `estimate` first, tell the user the cost, output size and frames, and only start the render (with `--yes`) after they agree.
14
+ - **Test small first.** For a first or experimental render, suggest `--res 360p --seconds 0-5`.
15
+ - **Don't change the user's code**, except pinning Remotion versions (step 2), and only after they agree.
16
+ - **Read results with `--json`.** One JSON document goes to stdout; progress and logs go to stderr.
17
+ - **On failure, stop and explain** what happened and what you suggest. Don't loop on retries.
18
+
19
+ ## Workflow
20
+
21
+ ### 1. Make sure the CLI is ready
22
+
23
+ ```sh
24
+ tars-renderer doctor --json
25
+ ```
26
+
27
+ - `command not found`: install it with `npm i -g tars-renderer` (Node.js 18+), or prefix commands with `npx -y tars-renderer`.
28
+ - Exit code **4** (not signed in): ask the user to run `tars-renderer login` themselves. A browser tab opens; they check that the code matches and click Approve. Wait for them, then run `doctor` again.
29
+ - Access denied: the user's work email isn't on the allowlist; they can request access on the portal.
30
+
31
+ ### 2. Check the Remotion version
32
+
33
+ The renderer supports Remotion **4.0.535** exactly. In the project folder run `npx remotion versions`. If anything differs:
34
+
35
+ 1. Detect the package manager from the lockfile (npm, pnpm, yarn or bun).
36
+ 2. Propose pinning `remotion` and every `@remotion/*` package to exactly 4.0.535 (npm: `npm i --save-exact remotion@4.0.535 @remotion/cli@4.0.535 …`; pnpm: `pnpm add --save-exact`; yarn: `yarn add --exact`; bun: `bun add --exact`).
37
+ 3. Run it only after the user agrees, then check again.
38
+
39
+ ### 3. Build
40
+
41
+ Find the entry file that calls `registerRoot` (usually `src/index.ts`, `src/index.tsx` or `remotion/index.ts`), then:
42
+
43
+ ```sh
44
+ npx remotion bundle src/index.ts --out-dir build
45
+ ```
46
+
47
+ The `build` folder must contain `index.html` and `bundle.js`.
48
+
49
+ ### 4. Pick or create the project
50
+
51
+ ```sh
52
+ tars-renderer projects --mine --json
53
+ ```
54
+
55
+ Reuse a project for this repo if one exists (match by name). Otherwise ask the user for a name, then:
56
+
57
+ ```sh
58
+ tars-renderer create "<name>" --json # returns the project slug
59
+ ```
60
+
61
+ ### 5. Upload
62
+
63
+ ```sh
64
+ tars-renderer upload build --project <slug> --yes --json
65
+ ```
66
+
67
+ Only changed files are sent, so re-uploading is fast. The JSON lists the compositions found. Uploads are refused while a render of that project is running; wait for it to finish.
68
+
69
+ ### 6. Choose and estimate
70
+
71
+ ```sh
72
+ tars-renderer comps <slug> --json
73
+ tars-renderer estimate <slug> <composition> --res 1080p --json
74
+ ```
75
+
76
+ Ask the user which composition and settings to use if they didn't say. Options: `--res 360p|720p|1080p|4k`, `--quality draft|standard|high`, `--seconds a-b` or `--frames a-b`, `--muted`, `--keep 1-day|3-days|7-days|30-days|forever`. Report `estimateUsd`, the output size and the frames, and any `blockedReason` (monthly budget, per-person cap, or too many renders running).
77
+
78
+ ### 7. Render, then download
79
+
80
+ After the user agrees to the cost:
81
+
82
+ ```sh
83
+ tars-renderer render <slug> <composition> [same options] --yes --watch --json
84
+ tars-renderer download <renderId> --out <file>.mp4 --json
85
+ ```
86
+
87
+ `--watch` follows progress until the render is done (exit 0) or fails (exit 1). Tell the user where the file was saved. They can also watch it on the portal's Renders page.
88
+
89
+ ## Exit codes
90
+
91
+ | Code | Meaning | What to do |
92
+ |---|---|---|
93
+ | 0 | OK | Continue |
94
+ | 1 | Error | Read `error` in the JSON, explain it, stop |
95
+ | 2 | Bad usage | Fix the command (check `tars-renderer <command> --help`) |
96
+ | 3 | Confirmation needed | Show the user the details, re-run with `--yes` only if they agree |
97
+ | 4 | Not signed in | Ask the user to run `tars-renderer login` |
98
+
99
+ ## Common problems
100
+
101
+ | Message | Fix |
102
+ |---|---|
103
+ | `This build uses Remotion X` | Pin to 4.0.535 (step 2), rebuild, upload again |
104
+ | `index.html and bundle.js not found` | Pass the `build` folder, not the project root |
105
+ | `A render of this project is running` | Wait for it, then upload |
106
+ | Over budget / too many renders | Tell the user; an admin can raise limits on the portal's Usage & limits page |
107
+ | Render failed | Show the error from `tars-renderer status <id> --json`; try 360p with a short range |
108
+
109
+ ## Other useful commands
110
+
111
+ `tars-renderer renders --mine --json` (recent renders), `tars-renderer status <id> --json`, `tars-renderer link <id>` (24-hour share link), `tars-renderer logout` (`--all` signs out every device), `tars-renderer --help`.