xeet
Social posts rendered to PNG without a browser, from WebAssembly, a Rust crate or the CLI.
Created by Guillermo Rauch. All credit for the original Xeet goes to him. This fork extends his interface and Rust engine to five platforms.
- One engine, five feeds. X, Threads, Facebook, Instagram and TikTok each get their own post layout.
- Real post data. Public links resolve through research, including profile photos, media and counts when available.
- No screenshot browser. Open Noto fonts and a Rust rasterizer paint the PNG. Video posts render as stills; this fork does not inherit upstream’s pixel-parity certification.
Examples #
Post ID 20 (March 21, 2006) — The root post of X: twenty-year timestamp formatting across web and iOS, plus the Square affiliate badge.
Or write a custom quoted post (defaults to @vercel when handle is empty):
Downloading WebAssembly core…
The exact data behind the previews above. Image bytes are shortened here.
Use it #
One Rust renderer, five platforms. Pass post JSON to the WebAssembly SDK to produce a PNG offline. Public links are resolved separately through research; videos become still images.
Download TypeScript / Node package · Download source · Original Xeet
Install
npm install https://xeet.sharenow.today/asyncfuncai-xeet-0.2.1.tgz
# In a new TypeScript project:
npm pkg set type=module
npm install --save-dev typescript @types/node
This fork ships as a directly installable package, with TypeScript declarations and Node WASM bindings. It is not published to the npm registry. Node 20 or later.
Render a post
import { writeFileSync } from 'node:fs';
import { loadXeet, type Post } from '@asyncfuncai/xeet/node';
const xeet = await loadXeet();
const post: Post = {
platform: 'threads',
text: 'One engine, five platforms.',
author: { name: 'You', handle: 'you' },
};
const { png, report } = xeet.render(post, { width: 600, theme: 'dark', dpr: 2 });
writeFileSync('post.png', png);
console.log(report.size);
npx tsc render.ts --module nodenext --target es2022 --types node
node render.js
Load once; render synchronously. The package keeps Xeet’s render, explain, renderRgba, renderMany and sheet APIs. Set platform to x, threads, facebook, instagram or tiktok.
Resolve any public post link
import { resolvePublicPost } from '@asyncfuncai/xeet/node';
const { post, warnings } = await resolvePublicPost(
'https://www.threads.com/@sharenow_today/post/Dfyjw3KjZAe'
);
const { png } = xeet.render(post, { width: 600, theme: 'dark' });
Public-link lookup uses the hosted research service and its rate limits. Rendering supplied JSON is offline. The upstream xeet.resolve method remains X-specific.
Prepare the Rust workspace
git clone https://github.com/AsyncFuncAI/xeet.git
cd xeet
bash scripts/prepare.sh
The build fetches the pinned upstream workspace, applies the five-platform changes and installs open fonts. It needs Rust, Node, Python 3 with venv and git. The resulting crate is a local path dependency:
[dependencies]
xeet-core = { path = "/absolute/path/to/xeet/.vendor/xeet/crates/xeet-core" }
Render without a browser or WASM
use xeet_core::{model::{Post, RenderOptions, Theme}, render};
fn main() -> Result<(), Box<dyn std::error::Error>> {
let post = Post {
platform: "threads".into(),
text: "One engine, five platforms.".into(),
..Default::default()
};
let options = RenderOptions { width: 600.0, theme: Theme::Dark, dpr: 2.0, ..Default::default() };
let (png, report) = render::render(&post, &options)?;
std::fs::write("rust-post.png", png)?;
println!("{} × {}", report.size.width, report.size.height);
Ok(())
}
cargo run --manifest-path .vendor/xeet/Cargo.toml -p xeet-core --example multiplatform --profile fast
Install and render
npm install https://xeet.sharenow.today/asyncfuncai-xeet-0.2.1.tgz
npx xeet render post.json --out post.png --width 600 --theme dark
npx xeet explain post.json
npx xeet sheet post.json --out sheet.png --widths 390,600 --themes light,dark
Start from a link
npx xeet resolve 'https://www.threads.com/@sharenow_today/post/Dfyjw3KjZAe' --out post.json
npx xeet render post.json --out post.png
The npm command uses the same Rust/WASM renderer. For a native binary, prepare the Rust workspace above, then install:
cargo install --path .vendor/xeet/crates/xeet-cli --bin xeet --locked
xeet render post.json --out post.png --width 600 --theme dark
The native CLI keeps upstream’s render, explain and sheet commands. Resolve non-X links with the npm resolver first, then render the resulting JSON natively.
API #
Rendering
await render(post, options) // { png, report }
await explain(post, options) // layout report
await renderRgba(post, options) // { width, height, rgba, report }
await renderBatch(post, options) // one rendered result per options object
await resolve(publicPostUrl) // { post, warnings, source }; hosted API
Options and limits
Choose light or dark, width, device-pixel ratio, font scale and surface. X retains Xeet's timeline/detail behavior. The other platforms use their own single-post layouts; TikTok uses a portrait video still. Instagram and Facebook show the first carousel image. The example snapshots are public posts fetched on November 16, 2026.
Live lookup is cached for one hour and limited to 12 requests per address per hour and 150 new posts daily. It depends on the studio computer's research service. Drafts, examples and JSON rendering remain available if that service is offline.