@telepat/rilo 0.1.0 → 0.1.7

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 CHANGED
@@ -1,209 +1,100 @@
1
- # Rilo
2
-
3
- [![CI](https://github.com/telepat-io/rilo/actions/workflows/ci.yml/badge.svg)](https://github.com/telepat-io/rilo/actions/workflows/ci.yml)
4
- [![Coverage](https://codecov.io/gh/telepat-io/rilo/graph/badge.svg)](https://codecov.io/gh/telepat-io/rilo)
5
- [![npm version](https://img.shields.io/npm/v/%40telepat%2Frilo)](https://www.npmjs.com/package/@telepat/rilo)
6
- [![npm downloads](https://img.shields.io/npm/dm/%40telepat%2Frilo)](https://www.npmjs.com/package/@telepat/rilo)
7
- [![Docs](https://img.shields.io/badge/docs-live-22c55e)](https://docs.telepat.io/rilo/)
8
- [![License](https://img.shields.io/github/license/telepat-io/rilo)](./LICENSE)
9
-
10
- Story-first vertical video generation.
11
-
12
- Rilo turns one story into a complete short-form video pipeline:
13
- - script generation
14
- - voiceover generation
15
- - keyframe generation
16
- - video segment generation
17
- - final composition
18
- - optional subtitle alignment and burn-in
19
-
20
- ## Why Rilo
21
-
22
- - Built for vertical video workflows
23
- - Checkpointed runs with resume support
24
- - Targeted regeneration for faster iteration
25
- - Model selection and per-model option overrides
26
- - Local and Firebase output backends
27
- - API, worker, and frontend flow for production usage
1
+ <p align="center"><img src="./assets/avatar/rilo-logo.webp" width="128" alt="Rilo"></p>
2
+ <h1 align="center">Rilo</h1>
3
+ <p align="center"><em>Turn a story into a finished video — AI-generated script, voiceover, keyframes, and composition, all in one command.</em></p>
28
4
 
29
- ## Quick Start
30
-
31
- Requirements:
32
- - Node.js 22+
33
- - ffmpeg in PATH
34
- - Replicate API token
35
-
36
- Setup:
37
-
38
- ```bash
39
- npm install
40
- cp .env.example .env
41
- ```
42
-
43
- Set required environment variables in .env, **or use the interactive settings command** (see below):
44
-
45
- ```bash
46
- RILO_REPLICATE_API_TOKEN=your-token
47
- RILO_API_BEARER_TOKEN=your-api-bearer-token
48
- ```
49
-
50
- Run the full local stack:
51
-
52
- ```bash
53
- npm run dev:all
54
- ```
55
-
56
- Run a CLI generation:
5
+ <p align="center">
6
+ <a href="https://docs.telepat.io/rilo">📖 Docs</a>
7
+ · <a href="./README.md">🇺🇸 English</a>
8
+ · <a href="./README.zh-CN.md">🇨🇳 简体中文</a>
9
+ </p>
57
10
 
58
- ```bash
59
- rilo --project demo --story-file ./story.txt
60
- ```
61
-
62
- ## Settings
63
-
64
- Configure rilo interactively without editing files:
65
-
66
- ```bash
67
- rilo settings
68
- ```
11
+ <p align="center">
12
+ <a href="https://github.com/telepat-io/rilo/actions/workflows/ci.yml"><img src="https://github.com/telepat-io/rilo/actions/workflows/ci.yml/badge.svg?branch=main" alt="Build"></a>
13
+ <a href="https://codecov.io/gh/telepat-io/rilo"><img src="https://codecov.io/gh/telepat-io/rilo/graph/badge.svg" alt="Codecov"></a>
14
+ <a href="https://www.npmjs.com/package/@telepat/rilo"><img src="https://img.shields.io/npm/v/@telepat/rilo" alt="npm"></a>
15
+ <a href="https://github.com/telepat-io/rilo/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-yellow.svg" alt="License"></a>
16
+ </p>
69
17
 
70
- For local development in this repository:
18
+ Rilo turns a story into a finished video — AI-generated script, voiceover, keyframes, and composition, all in one command.
71
19
 
72
- ```bash
73
- npm run dev -- settings
74
- npm run dev -- --project demo --story-file ./story.txt
75
- ```
76
-
77
- This opens a menu where you can edit all non-sensitive settings and manage API tokens securely. Navigate with arrow keys, select with Enter, and use "Done" or "Cancel" to exit. You can also press Ctrl+C at any time to quit.
20
+ Write your story in plain text. Rilo handles the rest: script generation, narration, visual keyframes, video segments, and final composition — with optional subtitle alignment and burn-in.
78
21
 
79
- **What gets stored where:**
22
+ Built for creators and teams who need reproducible, high-quality video at scale without manual editing.
80
23
 
81
- | Setting type | Storage |
82
- |---|---|
83
- | Replicate API Token, API Bearer Token | OS keystore (macOS Keychain, Windows Credential Manager, Linux Secret Service) — or an AES-256 encrypted file at `~/.rilo/.secrets` if no native keystore is available |
84
- | All other settings (timeouts, limits, binary paths, etc.) | `~/.rilo/config.json` |
24
+ ## Features
85
25
 
86
- **Precedence** (highestlowest): environment variable > `~/.rilo/config.json` > schema default.
87
- If an env var is set, the settings command shows it as read-only and any stored value is ignored while the env var is present.
26
+ - **Full pipeline, one command** Story script voiceover keyframes → segments → final video. `rilo --project demo --story-file ./story.txt`
27
+ - **Checkpointed runs** Every stage saves artifacts. Resume or regenerate any stage selectively. `rilo --project demo --force`
28
+ - **Your models, your control** — Choose T2I and I2V models. Override per-model options. Switch models anytime.
29
+ - **Code-driven pipeline** — Deterministic orchestration, checkpointing, and artifact management. Tokens spent on generation, not infrastructure.
30
+ - **Subtitle alignment & burn-in** — Auto-align subtitles to voiceover timing. Burn them into the final video.
31
+ - **Preview dashboard** — Web UI for project management, regeneration, and asset preview. `rilo preview`
32
+ - **HTTP API & webhooks** — Bearer-token auth, OpenAPI 3.1 spec, webhook subscriptions. Firebase or local.
33
+ - **Cross-platform** — macOS, Linux, Windows. Node.js 22+ and ffmpeg.
88
34
 
89
- **Hidden from settings UI** (env-only): Firebase credentials, webhook settings, output backend, API port, custom output/projects directories.
35
+ ## Quick Start
90
36
 
91
- ## Install from npm
37
+ Requirements: Node.js 22+, ffmpeg in PATH, and a Replicate API token.
92
38
 
93
39
  ```bash
94
40
  npm install -g @telepat/rilo
95
- rilo --help
96
- ```
97
-
98
- Or without global install:
99
-
100
- ```bash
101
- npx @telepat/rilo --help
102
- ```
103
-
104
- ## CLI Quick Reference
105
-
106
- ### Generate a video from a story
107
-
108
- ```bash
109
- rilo --project <name> --story-file <path>
110
- ```
111
-
112
- Examples:
113
- ```bash
114
- # First run: create project and start generation
115
- rilo --project wedding-case --story-file ./story.txt
116
-
117
- # On subsequent runs: reuse story
118
- rilo --project wedding-case
119
-
120
- # Force restart from earlier stages (after config change)
121
- rilo --project wedding-case --force
122
- ```
123
-
124
- ### Configure settings
125
-
126
- ```bash
127
41
  rilo settings
42
+ rilo --project demo --story-file ./story.txt
128
43
  ```
129
44
 
130
- Opens an interactive menu to set API tokens, timeouts, and binary paths.
131
-
132
- ### Open the Rilo home folder
133
-
134
- ```bash
135
- rilo home
136
- ```
137
-
138
- Opens `~/.rilo`, the default location for saved settings, projects, and generated output.
45
+ Expected outcome:
139
46
 
140
- ### Help and version
47
+ - A project folder is created under `projects/demo/`.
48
+ - The full pipeline runs through script, voiceover, keyframes, segments, and composition.
49
+ - Final video is written to `projects/demo/final.mp4`.
50
+ - Dashboard preview available via `rilo preview`.
141
51
 
142
- ```bash
143
- rilo --help # Show usage
144
- rilo --version # Show version
145
- ```
52
+ ## Requirements
146
53
 
147
- ### Invocation methods
54
+ - Node.js 22+
55
+ - ffmpeg in PATH
56
+ - Replicate API token
57
+ - macOS, Linux, or Windows
148
58
 
149
- | Method | Command |
150
- |--------|---------|
151
- | **Global install** | `rilo --project <name> --story-file <path>` |
152
- | **No install (npx)** | `npx @telepat/rilo --project <name> --story-file <path>` |
153
- | **Local dev** | `npm run dev -- --project <name> --story-file <path>` |
59
+ ## How It Works
154
60
 
155
- ### Key flags
61
+ Rilo runs a staged pipeline: script generation, voiceover synthesis, shot prompt generation, keyframe rendering, segment generation, and final video composition. Each stage writes checkpointed artifacts so you can resume or regenerate selectively.
156
62
 
157
- | Flag | Type | Notes |
158
- |------|------|-------|
159
- | `--project` | `<name>` | **Required.** Project identifier; creates `projects/<name>/` |
160
- | `--story-file` | `<path>` | Path to story text file (required on first run) |
161
- | `--force` | flag | Restart from earlier stages; used after config changes |
63
+ Configuration merges CLI flags, environment variables, and `~/.rilo/config.json` with schema defaults. The preview dashboard (`rilo preview`) starts a local API, worker, and Vite React frontend for monitoring and editing.
162
64
 
163
- ### Common tasks
65
+ ## Using With AI Agents
164
66
 
165
- **Update project config and regenerate:**
166
- ```bash
167
- # Edit projects/wedding-case/config.json (aspect ratio, models, etc.)
168
- rilo --project wedding-case --force
169
- ```
67
+ Rilo provides multiple surfaces for agentic and automated workflows:
170
68
 
171
- **Change app settings (tokens, timeouts, binary paths):**
172
- ```bash
173
- rilo settings
174
- # Arrow keys to navigate, Enter to edit, "Done" to save
175
- ```
176
-
177
- **Open the default app folder for projects/output:**
178
- ```bash
179
- rilo home
180
- # Opens ~/.rilo in your system file manager
181
- ```
182
-
183
- **Check where generated files are stored:**
184
- ```bash
185
- ls projects/wedding-case/
186
- # Outputs: config.json, story.md, final.mp4, artifacts.json, run-state.json, assets/, logs/
187
- ```
69
+ - **CLI automation** All generation is driven by CLI flags and environment variables. No interactive prompts are required after initial setup.
70
+ - **HTTP API** — `rilo preview` starts an Express API with full job and project CRUD, asset serving, and webhook endpoints. Bearer-token auth via `Authorization: Bearer <API_BEARER_TOKEN>`.
71
+ - **OpenAPI spec** — Auto-generated OpenAPI 3.1 spec for schema-driven agent integration.
72
+ - **Webhooks** Subscribe to job lifecycle events for external orchestration.
73
+ - **Firebase Functions** — Deploy `src/api/firebaseFunction.js` for serverless API hosting.
74
+ - **Agent docs** — [API Reference](https://docs.telepat.io/rilo/reference/api-reference) covers endpoints, auth, and webhooks.
188
75
 
189
- ---
76
+ ## Security And Trust
190
77
 
191
- ## CLI Documentation
78
+ - API tokens and Replicate credentials are stored in the OS keystore (macOS Keychain, Windows Credential Manager, Linux Secret Service) when available.
79
+ - Falls back to an AES-256 encrypted file at `~/.rilo/.secrets` if no native keystore is available.
80
+ - Environment variables (`RILO_REPLICATE_API_TOKEN`, `RILO_API_BEARER_TOKEN`) take highest precedence and override stored values.
81
+ - Preview `--expose` mode should only be used on trusted networks or isolated environments.
192
82
 
193
- For comprehensive CLI documentation, see:
194
- - **[Quickstart](/docs.telepat.io/rilo/getting-started/quickstart)** — Step-by-step guide to your first generation
195
- - **[CLI Reference](/docs.telepat.io/rilo/reference/cli-reference)** — All commands, flags, and invocation methods
196
- - **[Complete Config Schema](/docs.telepat.io/rilo/reference/config-schema)** — Every config key with types and defaults
197
- - **[Configuration Guide](/docs.telepat.io/rilo/guides/configuration)** — Project and app settings with examples
198
- - **[Troubleshooting](/docs.telepat.io/rilo/guides/troubleshooting)** — Common errors and solutions
199
- - **[Environment Variables](/docs.telepat.io/rilo/reference/environment-variables)** — Setting precedence and env var reference
83
+ ## Documentation And Support
200
84
 
201
- ## Full Documentation
85
+ - [Documentation site](https://docs.telepat.io/rilo)
86
+ - [Quickstart](https://docs.telepat.io/rilo/getting-started/quickstart)
87
+ - [CLI Reference](https://docs.telepat.io/rilo/reference/cli-reference)
88
+ - [Configuration Guide](https://docs.telepat.io/rilo/guides/configuration)
89
+ - [API Reference](https://docs.telepat.io/rilo/reference/api-reference)
90
+ - [Troubleshooting](https://docs.telepat.io/rilo/guides/troubleshooting)
91
+ - [Repository](https://github.com/telepat-io/rilo)
92
+ - [npm package](https://www.npmjs.com/package/@telepat/rilo)
202
93
 
203
- Guides, API reference, architecture notes, and advanced configuration:
94
+ ## Contributing
204
95
 
205
- https://docs.telepat.io/rilo/
96
+ Contributions are welcome. See [Development](https://docs.telepat.io/rilo/contributing/development) for local setup, build commands, and test workflows.
206
97
 
207
98
  ## License
208
99
 
209
- MIT
100
+ MIT. See [LICENSE](./LICENSE).
@@ -0,0 +1,100 @@
1
+ <p align="center"><img src="./assets/avatar/rilo-logo.webp" width="128" alt="Rilo"></p>
2
+ <h1 align="center">Rilo</h1>
3
+ <p align="center"><em>将故事转化为成品视频——AI 生成脚本、配音、关键帧和合成,一条命令完成。</em></p>
4
+
5
+ <p align="center">
6
+ <a href="https://docs.telepat.io/rilo">📖 文档</a>
7
+ · <a href="./README.md">🇺🇸 English</a>
8
+ · <a href="./README.zh-CN.md">🇨🇳 简体中文</a>
9
+ </p>
10
+
11
+ <p align="center">
12
+ <a href="https://github.com/telepat-io/rilo/actions/workflows/ci.yml"><img src="https://github.com/telepat-io/rilo/actions/workflows/ci.yml/badge.svg?branch=main" alt="Build"></a>
13
+ <a href="https://codecov.io/gh/telepat-io/rilo"><img src="https://codecov.io/gh/telepat-io/rilo/graph/badge.svg" alt="Codecov"></a>
14
+ <a href="https://www.npmjs.com/package/@telepat/rilo"><img src="https://img.shields.io/npm/v/@telepat/rilo" alt="npm"></a>
15
+ <a href="https://github.com/telepat-io/rilo/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-yellow.svg" alt="License"></a>
16
+ </p>
17
+
18
+ Rilo 将故事转化为成品视频——AI 生成脚本、配音、关键帧和合成,一条命令完成。
19
+
20
+ 用纯文本写下您的故事。Rilo 处理剩下的部分:脚本生成、旁白配音、视觉关键帧、视频片段和最终合成——以及可选的字幕对齐与烧录。
21
+
22
+ 专为需要大规模、可复现、高质量视频生产而无需手动编辑的创作者和团队打造。
23
+
24
+ ## 功能特性
25
+
26
+ - **完整流水线,一条命令** — 故事 → 脚本 → 配音 → 关键帧 → 片段 → 最终视频。`rilo --project demo --story-file ./story.txt`
27
+ - **检查点运行** — 每个阶段保存产物。可恢复或选择性重新生成任何阶段。`rilo --project demo --force`
28
+ - **您的模型,您做主** — 选择 T2I 和 I2V 模型。覆盖每个模型的选项。随时切换。
29
+ - **代码驱动的工作流** — 确定性编排、检查点和产物管理。Token 用于生成,而非基础设施。
30
+ - **字幕对齐与烧录** — 自动将字幕对齐到配音时间轴。烧录到最终视频中。
31
+ - **预览控制台** — Web 界面用于项目管理、重新生成和资产预览。`rilo preview`
32
+ - **HTTP API 与 Webhook** — Bearer 令牌认证、OpenAPI 3.1 规范、Webhook 订阅。支持 Firebase 或本地。
33
+ - **跨平台** — macOS、Linux、Windows。需要 Node.js 22+ 和 ffmpeg。
34
+
35
+ ## 快速开始
36
+
37
+ 环境要求:Node.js 22+、PATH 中有 ffmpeg、Replicate API token。
38
+
39
+ ```bash
40
+ npm install -g @telepat/rilo
41
+ rilo settings
42
+ rilo --project demo --story-file ./story.txt
43
+ ```
44
+
45
+ 预期结果:
46
+
47
+ - 在 `projects/demo/` 下创建项目文件夹。
48
+ - 完整流水线依次运行脚本、配音、关键帧、片段和合成。
49
+ - 最终视频写入 `projects/demo/final.mp4`。
50
+ - 可通过 `rilo preview` 打开仪表板预览。
51
+
52
+ ## 环境要求
53
+
54
+ - Node.js 22+
55
+ - PATH 中有 ffmpeg
56
+ - Replicate API token
57
+ - macOS、Linux 或 Windows
58
+
59
+ ## 工作原理
60
+
61
+ Rilo 运行分阶段流水线:脚本生成、语音合成、镜头提示生成、关键帧渲染、片段生成和最终视频合成。每个阶段都会写入检查点产物,因此你可以恢复或有选择地重新生成。
62
+
63
+ 配置会合并 CLI 标志、环境变量和 `~/.rilo/config.json`,并以模式默认值兜底。预览仪表板(`rilo preview`)启动本地 API、worker 和 Vite React 前端,用于监控和编辑。
64
+
65
+ ## 与 AI Agent 一起使用
66
+
67
+ Rilo 为智能体和自动化工作流提供多种接口:
68
+
69
+ - **CLI 自动化** — 所有生成均由 CLI 标志和环境变量驱动。初始设置后无需交互式提示。
70
+ - **HTTP API** — `rilo preview` 启动 Express API,提供完整的 job 和 project CRUD、资源服务和 webhook 端点。通过 `Authorization: Bearer <API_BEARER_TOKEN>` 进行 Bearer token 认证。
71
+ - **OpenAPI 规范** — 自动生成 OpenAPI 3.1 规范,支持基于模式的智能体集成。
72
+ - **Webhook** — 订阅 job 生命周期事件,用于外部编排。
73
+ - **Firebase Functions** — 部署 `src/api/firebaseFunction.js` 实现无服务器 API 托管。
74
+ - **Agent 文档** — [API 参考](https://docs.telepat.io/rilo/reference/api-reference) 涵盖端点、认证和 webhook。
75
+
76
+ ## 安全与信任
77
+
78
+ - API token 和 Replicate 凭证在 OS 密钥库可用时保存(macOS Keychain、Windows Credential Manager、Linux Secret Service)。
79
+ - 如果无原生密钥库可用,则回退到 `~/.rilo/.secrets` 的 AES-256 加密文件。
80
+ - 环境变量(`RILO_REPLICATE_API_TOKEN`、`RILO_API_BEARER_TOKEN`)优先级最高,会覆盖已存储的值。
81
+ - Preview `--expose` 模式应仅在可信网络或隔离环境中使用。
82
+
83
+ ## 文档与支持
84
+
85
+ - [文档站点](https://docs.telepat.io/rilo)
86
+ - [快速上手](https://docs.telepat.io/rilo/getting-started/quickstart)
87
+ - [CLI 参考](https://docs.telepat.io/rilo/reference/cli-reference)
88
+ - [配置指南](https://docs.telepat.io/rilo/guides/configuration)
89
+ - [API 参考](https://docs.telepat.io/rilo/reference/api-reference)
90
+ - [故障排查](https://docs.telepat.io/rilo/guides/troubleshooting)
91
+ - [仓库](https://github.com/telepat-io/rilo)
92
+ - [npm 包](https://www.npmjs.com/package/@telepat/rilo)
93
+
94
+ ## 贡献
95
+
96
+ 欢迎贡献。请参阅[开发指南](https://docs.telepat.io/rilo/contributing/development)了解本地环境搭建、构建命令和测试工作流。
97
+
98
+ ## 许可证
99
+
100
+ MIT。详见 [LICENSE](./LICENSE)。