Foldline
概要
作者による説明(英語の原文)
Render HTML canvas animations to MP4 fast on a Mac, with 66 code-made film styles for agents.
PopNx MCPの3つの柱
この3つを1つのスコアにまとめることはしません。意見、測定、人気はそれぞれ別のものだからです。
- 利用者の声iレビューはまだありませんレビューは今後のステップで、アカウント機能と一緒に始まります
- 私たちの基本チェックi1項目中1項目に合格公開情報からチェック。コードはまだスキャンしていません
- 利用状況iとても新しい★ –
できること
このサーバーのやさしい解説はまだ書いていません。以下はレジストリから読み取った事実です。
- 接続方法: パソコンで動く
- トランスポート: stdio
- カテゴリ: ゲーム・スポーツ・料理・学習
インストール
使っているAIアプリを選んで、設定をコピーしてください。
インストールの前に
- 基本チェック:1項目中1項目に合格
- あなたのパソコンで、あなたのユーザーと同じ権限(ファイル、ネットワーク、アプリ)で動きます。
- 自分で入力するもの:
FOLDLINE_PYTHON,PLAYWRIGHT_CHROME
必要なもの
- npmNode.jsのインストール(npxコマンドに必要)
どのアプリを使っていますか?
上でアプリを選んでください。選んだアプリを覚えておくので、次からはボタンに「…にインストール」と表示されます。
Claude Desktop → Settings → Developer → Edit Config を開き、claude_desktop_config.json にこれを貼り付けます
{
"mcpServers": {
"foldline": {
"command": "npx",
"args": [
"-y",
"foldline-mcp"
],
"env": {
"FOLDLINE_PYTHON": "your-value",
"PLAYWRIGHT_CHROME": "your-value"
}
}
}
}ターミナルでこれを実行します
claude mcp add foldline --env FOLDLINE_PYTHON=your-value --env PLAYWRIGHT_CHROME=your-value -- npx -y foldline-mcp動かす前に、空欄の値を入力してください。
または、設定を自分でコピーする
プロジェクトの .cursor/mcp.json、または ~/.cursor/mcp.json に貼り付けます
{
"mcpServers": {
"foldline": {
"command": "npx",
"args": [
"-y",
"foldline-mcp"
],
"env": {
"FOLDLINE_PYTHON": "your-value",
"PLAYWRIGHT_CHROME": "your-value"
}
}
}
}ブラウザがアプリを開いてよいか確認し、そのあとアプリが設定を表示して確認を求めます。キーの値は空欄のままなので、自分で入力してください。
または、設定を自分でコピーする
プロジェクトの .vscode/mcp.json に貼り付けます
{
"servers": {
"foldline": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"foldline-mcp"
],
"env": {
"FOLDLINE_PYTHON": "your-value",
"PLAYWRIGHT_CHROME": "your-value"
}
}
}
}ブラウザがアプリを開いてよいか確認し、そのあとアプリが設定を表示して確認を求めます。キーの値は空欄のままなので、自分で入力してください。
これはパソコンで動くサーバーですが、ChatGPTがつなげるのはインターネット上のサーバーだけです。ほかのアプリを選んでください。
選んだアプリは、この端末のCookieに保存されます。アカウントは不要です。
自分で入力する値
FOLDLINE_PYTHONenvPython for the voice, music and sheet tools (default: the library .venv, then ~/lemo-opuscar/.venv)PLAYWRIGHT_CHROMEenvA chrome-headless-shell to use instead of the one Playwright installs
この設定は、作者のレジストリ登録情報から作成しています。READMEと違う場合は、READMEに従ってください。
できること
パソコンで動くサーバーです。インストールすると、ツール一覧がAIアプリに表示されます。
基本チェックi
誰でも見られる情報をチェックしており、コードは読んでいません。当てはまらない項目は数に入れていません。 · 2026年11月9日にチェック
- ✓ 合格
作者とリポジトリが一致
レジストリ名は、リポジトリを所有するGitHubアカウント alireza12t で確認済みです
- … 未チェック
今もメンテナンスされている
このリポジトリはまだGitHubから読み取っていません
- … 未チェック
ライセンスがある
このリポジトリはまだGitHubから読み取っていません
- – 対象外
エンドポイントが応答する
これはパソコンで動くため、インターネット上のエンドポイントはありません
- – 対象外
OAuthでサインイン
パソコンで動き、代わりにローカルの設定を使います
- … 未チェック
ツールの説明に隠れた指示がない
パソコンで動くサーバーです。ツール一覧を読み取れるのは、インターネット上のエンドポイントがある場合だけです
ゲーム・スポーツ・料理・学習のほかのサーバーとの比較i
- このカテゴリのほかの1317件のうち0%よりスターが多い
- このカテゴリのほかの1317件のうち100%より最近レジストリに公開
- 基本チェックの結果が、このカテゴリのほかの1317件のうち100%と同じかそれ以上
レジストリでこのカテゴリにある有効なすべてのサーバーと比較しています。スターは、公開者がリポジトリの所有者である場合だけ数えます。
よくある質問
Foldlineは安全ですか?
当てはまる基本チェック1項目のうち1項目に合格しました。コードは読んでいません。キーやトークンを追加する前に、サーバーがどんなアクセスを求めているかを確認し、必要な権限だけを持つキーを使ってください。
どんなキーやコードが必要ですか?
レジストリには必須のキーは載っていません。ただし、最初に使うときにサインインを求めるサーバーもあります。
パソコンで動きますか、それともクラウドですか?
あなたのパソコンで動きます。必要なときにAIアプリが起動し、データは作者のサーバーを通りません(サーバー自体がオンラインサービスを呼び出す場合を除きます)。
今もメンテナンスされていますか?
GitHubリポジトリの最終更新は–、最新バージョン(1.0.0)がレジストリに届いたのは今日です。
どのアプリで使えますか?
Claude Desktop、Claude Code、Cursor、VS CodeなどのMCP対応アプリで使えます。パソコンにNode.jsも必要です。
代わりに使えるものは?
同じカテゴリには:diglabo(漢字・算数の学習), Foodbe, Gameye
代わりの候補
同じカテゴリで、ほかの作者が作ったサーバー。スターの多い順。
カードの見方:↓ 週あたりのダウンロードi★ GitHubスターi3つの柱:レビュー · チェック · 利用状況i更新=最新バージョンをレジストリに公開した日i
作者のREADME
READMEを開く
作者のリポジトリから書かれたとおりにコピーしたものです。PopNx MCPは内容を確認・推奨していません。HTML、画像、スクリプトは取り除いています。リンクはこのサイトの外へ移動します。
Foldline
Render HTML canvas animations to MP4, fast, on a Mac.
With the full lemo-opuscar library of 66 film styles made in code.
Made for Unfold, an animated "What if" channel in a paper pop-up book style.
https://github.com/user-attachments/assets/05724852-c9ae-4762-90a9-634315b2b016
▶ Watch on YouTube · download the MP4 · read the deep dive on Medium
Made with Foldline itself: every frame drawn in code, a local text-to-speech voice, music synthesised in code. It renders in 34 s. Source in examples/foldline-explainer .
What it is
Foldline turns a web page that draws a film in code into an H.264 MP4. You write an HTML page with a and a render(t) function. Foldline opens it in headless Chrome, draws every frame, and encodes the video inside the page with WebCodecs on the Mac's hardware encoder, so frames never leave the GPU. On an M1 Pro, an 8.4-minute 1080p 60 fps video renders in 161 s instead of 426 s (see Results). It's open source and free for non-commercial use, and it works well with coding agents like Claude Code.
Foldline is a project by Alireza Toghiani, built for the Unfold channel. It isn't a GitHub fork. It ships the full lemo-opuscar library by LemoLab:
- all 66 film styles in
styles/, each with a style prompt and a demo film made in code - the toolkit in
core/(render, voice, music, mix) - the guides
DIRECTOR.md,TECHNIQUE.mdandMY-STYLES.md - lemo's Claude Code plugin in
plugin/
lemo's original README is kept as LEMO-README.md. It has the style list, how to make a style your own, and the full requirements.
What Foldline adds is a faster video renderer, core/render/video.mjs, and an MCP server for coding agents, core/mcp/server.mjs.
What's new vs lemo-opuscar
- The page encodes the video itself. By default
video.mjsencodes H.264 inside the page with WebCodecs, on the Mac's hardware encoder. Each frame goes from the canvas to the encoder on the GPU. No screenshot, no JPEG, no ffmpeg decode. - It works when the film draws into one visible ` ` of the render size. 35 of the 66 lemo demos do, and Unfold's videos do.
- Automatic fallback. If the page doesn't fit that, or the browser has no hardware H.264 encoder, it falls back to the screenshot path with the Mac hardware encoder (VideoToolbox). If that isn't available either, it uses x264.
- `FOLDLINE_ENC=auto|wc|vt|x264` picks the encoder.
autois the default.x264is lemo's original path.LEMO_ENCstill works. - `FOLDLINE_MBPS` sets the bitrate for the WebCodecs path, in Mbit/s (default 20).
- New flag `--audio ` muxes a sound file in (AAC 192k). It runs as a second ffmpeg pass from the finished mp4. The renderer refuses to finish if the file is missing its video or audio stream.
- Output is standard bt709 limited-range H.264 mp4.
- MCP server in
core/mcp/: agents get the styles, guides, renders and sound tools as MCP tools with short results. See MCP server.
Everything else in the library works the way lemo describes it.
How it compares
Foldline is a renderer plus a style library, not a framework or a timeline editor. You write the page, Foldline renders it.
| Foldline | lemo-opuscar (original) | Remotion | Motion Canvas | HyperFrames | |
|---|---|---|---|---|---|
| You write | an HTML page with render(t) | an HTML page with render(t) | React components | TypeScript scenes | HTML, CSS and seekable animations (GSAP, Lottie, three.js and others) |
| How frames are made | Chrome draws the canvas, and the page hands each frame to the encoder (WebCodecs). Frames stay on the GPU. | Chrome draws the page, and each frame is taken as a JPEG screenshot | Chrome draws each frame, and FFmpeg encodes them | the browser saves each frame as an image file (PNG, JPEG or WebP) | headless Chrome (Puppeteer) seeks each frame, and FFmpeg encodes them |
| Video encoder by default | Mac hardware H.264, falling back to VideoToolbox, then x264 | x264 (software) | FFmpeg, H.264. Hardware encoding (VideoToolbox on Mac, NVENC) is available but off by default. | none built in: you turn the images into a video yourself, for example with ffmpeg | FFmpeg |
| Ready-made looks | 66 film styles, each with a demo film (lemo's library) | the same 66 film styles | starter templates | none in the core | about 450 blocks and components, plus design templates |
| Code licence | PolyForm Noncommercial: free for non-commercial use, commercial licence on request (lemo's original code stays MIT) | MIT | Remotion License: free for individuals, non-profits and companies of up to 3 employees, paid above that | MIT | Apache-2.0 |
| Speed, measured here | 2.5x faster than lemo on its Pixel RPG demo, 2.6x faster on an 8.4 min film | the baseline | not measured here | not measured here | not measured here |
Sources, checked Nov 6 2026: Remotion's encoding and hardware acceleration docs, Motion Canvas's rendering docs and the HyperFrames README. Projects change, so check their docs for the latest. Foldline's speed numbers are in Results.
Install
You need:
- macOS on Apple Silicon (recommended). The fast path needs Chrome's hardware H.264 encoder. Other systems fall back to the screenshot path.
- Node 20+
- ffmpeg 7+
- Python 3.11+, for the voice and music tools
git clone https://github.com/alireza12t/foldline.git
cd foldline npm ci node node_modules/playwright-core/cli.js install chromium-headless-shell
The last line installs the headless Chrome the renderer uses, the same way lemo's setup script does it. To use a different Chrome or headless-shell executable, set PLAYWRIGHT_CHROME=/path/to/chrome-headless-shell.
For the Python tools (sound effects, mix, subtitles, voice), lemo's setup script makes the .venv in tiers. Run it from the repo folder:
| Command | Adds |
|---|---|
sh plugin/skills/lemo-opuscar/scripts/setup.sh deps | npm packages, headless browser, Python .venv core tier |
sh plugin/skills/lemo-opuscar/scripts/setup.sh deps voice | Kokoro, edge-tts, faster-whisper, and the Kokoro model |
sh plugin/skills/lemo-opuscar/scripts/setup.sh deps music | numba, for pluck.py |
Optional big assets
These aren't in git. Fetch them only when a film needs them. tools/fetch.sh downloads them from lemo-opuscar's assets release on GitHub.
| Command | What it gets | Size |
|---|---|---|
sh tools/fetch.sh voice | Kokoro TTS model (English, offline) into core/tts/ | about 354 MB |
sh tools/fetch.sh hdri | Poly Haven HDRIs for the 3D styles into core/assets/polyhaven/ | 12 MB |
sh tools/fetch.sh instruments | one sample library (freepats, karoryfer, salamander, vcsl, vsco2ce, or all) | 70 to 400 MB each |
Full sizes and details are in TECHNIQUE.md §1.
Usage
Run every command from the repo folder.
Render a library demo
node core/render/video.mjs styles/rubber-hose/demo --fps 24 --out out/rubber-hose.mp4
Some demos need a one-time setup in their own folder first:
npm ciif the demo has apackage.jsonnode fetch_fonts.mjsif it has one
Render your own page
node core/render/video.mjs my-film --size 1080x1920 --fps 60 --audio my-film/mix.wav --out my-film/out/video.mp4
my-film is any folder with an index.html that follows the page contract below.
Stills
node core/render/still.mjs <dir> 3 20 --out <dir>
This writes review JPEGs at 3 s and 20 s. See core/README.md for --range and --prefix.
Flags
| Flag | Default | Meaning |
|---|---|---|
--fps | 24 | frames per second |
--size WxH | 1920x1080 | render size, even numbers |
--workers | 3 | parallel browsers; up to 6 for a single render |
--out | /out/video.mp4 | output file; each parallel render needs its own |
--q 'k=v&…' | none | reaches the page as location.search |
--audio | none | mux a sound file in (AAC 192k); new in Foldline |
Environment variables
| Variable | Default | Meaning |
|---|---|---|
FOLDLINE_ENC | auto | auto (WebCodecs, else VideoToolbox, else x264), wc, vt, or x264 (lemo's original path). LEMO_ENC still works |
FOLDLINE_MBPS | 20 | bitrate in Mbit/s for the WebCodecs path |
LEMO_VTQ | 72 | quality for the VideoToolbox screenshot path |
The rest of lemo's variables (PLAYWRIGHT_CHROME, LEMO_ANGLE, RENDER_SLOTS and more) are listed in core/README.md.
The page contract
This comes from lemo. Each film is a folder with an index.html that sets:
window.DUR = 54.2; // film length in seconds
window.render = (t) => { ... }; // draw the frame at t seconds; may be async window.READY = true; // set once fonts and assets are loaded
For the fast path, draw the whole film into one visible of the render size. Any other page still renders, through the screenshot path.
Using it with a coding agent
lemo's plugin and skill are for Claude Code. How to install them, and how to ask for a film, is in LEMO-README.md, How to use. The plugin installs lemo's own library into ~/lemo-opuscar. lemo's setup script uses the clone you're standing in when it's a library, so to work with Foldline's renderer, start your agent inside this folder (lemo's "clone the repo" option).
MCP server
Foldline has an MCP server, so Claude Code, Codex, Cursor and other agents can call its tools directly instead of reading the guides and running commands by hand. It's on npm as foldline-mcp, and it's listed in the MCP Registry as io.github.alireza12t/foldline.
You need Node 20+, ffmpeg (brew install ffmpeg) and Chrome's headless shell, installed once with npx playwright-core@1.63.0 install chromium-headless-shell. The server tells you if one is missing.
Claude Code, as a plugin:
claude plugin install foldline --marketplace alireza12t/foldline
or as a plain MCP server:
claude mcp add --scope user foldline -- npx -y foldline-mcp
Codex, in ~/.codex/config.toml:
[mcp_servers.foldline]
command = "npx" args = ["-y", "foldline-mcp"]
Cursor (~/.cursor/mcp.json), Claude Desktop and most other clients:
{ "mcpServers": { "foldline": { "command": "npx", "args": ["-y", "foldline-mcp"] } } }
VS Code (.vscode/mcp.json):
{ "servers": { "foldline": { "command": "npx", "args": ["-y", "foldline-mcp"] } } }
To use your own clone instead of npm, point the command at it: `node /path/to/foldline/core/mcp/server.mj
冒頭だけを表示しています。続きはリポジトリで読めます