Render Anything Engine: tell your AI what to make. Videos, motion graphics, 3D and games as React and TypeScript, rendered on your own GPU. Rust + Bevy, macOS, Linux and Windows.
TypeScript 3dagent-skillsai-agentsai-videobevyclaude-codegame-enginegpulinuxmacosmotion-designmotion-graphicsreactrusttypescriptvideo-editingvideo-renderingwgpuwindows
A project names its client, raea cloud's tag, instead of sitting inside another project: raea project new NAME --client C, raea project tag [NAME] --client C | --no-client; raea project and raea workspace --json say it (and the workspace's clients). raea.app files every card raea show makes from the folder under it
shinyobjectz16abfb08b72e
diff --git a/apps/workspace/src/tests.rs b/apps/workspace/src/tests.rsindex c99a046b..129474e4 100644--- a/apps/workspace/src/tests.rs+++ b/apps/workspace/src/tests.rs@@ -229,3 +229,30 @@ fn a_workspace_0_1_6_broke_is_repaired() {assert!(status().status.success(), "git status after the repair: {}", String::from_utf8_lossy(&status().stderr));let _ = std::fs::remove_dir_all(&ws);}++#[test]+fn a_project_names_its_client() {+ // Shane 11-24: projects relate by raea cloud's tags (a client), not by nesting; raea.app files `raea show`'s cards+ // under the client the folder names (host/local-cloud/clients.ts)+ use crate::workspace::{client_of, new_project_in, tag_in};+ let ws = scratch("client");+ crate::workspace::make_workspace(&ws, "Clients", "monorepo").unwrap();+ new_project_in(&ws, "Launch", None).unwrap();+ new_project_in(&ws, "Teaser", None).unwrap();+ assert_eq!(client_of(&ws, "launch"), None);+ // named, from inside the project; then by name; cleared+ let inside = ws.join("projects/launch/compositions");+ assert!(tag_in(&ws, &inside, None, Some("Acme"), false, false).unwrap().contains("client Acme"));+ assert_eq!(client_of(&ws, "launch").as_deref(), Some("Acme"));+ let j: serde_json::Value = serde_json::from_str(&tag_in(&ws, &ws, Some("Teaser"), Some(" Acme "), false, true).unwrap()).unwrap();+ assert_eq!(j, serde_json::json!({"project": "teaser", "client": "Acme"}));+ assert!(tag_in(&ws, &ws, Some("nope"), Some("Acme"), false, false).is_err());+ assert!(tag_in(&ws, &ws, Some("launch"), Some(" "), false, false).is_err());+ tag_in(&ws, &ws, Some("launch"), None, true, false).unwrap();+ assert_eq!(client_of(&ws, "launch"), None);+ // committed, so the workspace's history has it+ let log = std::process::Command::new("git").args(["log", "--format=%s"]).current_dir(&ws).output().unwrap();+ let log = String::from_utf8_lossy(&log.stdout);+ assert!(log.contains("project teaser: client Acme") && log.contains("project launch: no client"), "{log}");+ let _ = std::fs::remove_dir_all(&ws);+}diff --git a/apps/workspace/src/workspace.rs b/apps/workspace/src/workspace.rsindex 3449a732..8e9bf879 100644--- a/apps/workspace/src/workspace.rs+++ b/apps/workspace/src/workspace.rs@@ -5,7 +5,7 @@use super::*;use std::process::Command;-const USAGE: &str = "usage: raea workspace [--json] | raea workspace init [NAME] [--layout monorepo|submodules] | raea workspace adopt DIR [--name NAME] [--layout monorepo|submodules]\n raea project [--json] | raea project new NAME [--storage inline|submodule] | raea project split NAME [--remote URL] | raea project join NAME | raea project scan [DIR] [--json]";+const USAGE: &str = "usage: raea workspace [--json] | raea workspace init [NAME] [--layout monorepo|submodules] | raea workspace adopt DIR [--name NAME] [--layout monorepo|submodules]\n raea project [--json] | raea project new NAME [--storage inline|submodule] [--client NAME] | raea project tag [NAME] [--client NAME | --no-client] [--json] | raea project split NAME [--remote URL] | raea project join NAME | raea project scan [DIR] [--json]";/// git for raea's own commits. A new Mac has no user.email and a hostname git can't make one from, so every commit/// failed with "Author identity unknown" and the person's first project was never made. git reads $EMAIL only when@@ -95,7 +95,7 @@ pub(crate) fn flag<'a>(args: &'a [String], name: &str) -> Option<&'a str> {/// The words of a command that aren't flags or a flag's value.fn words(args: &[String]) -> Vec<&str> {- raea_app_check::words(args, &["--layout", "--storage", "--name", "--remote"])+ raea_app_check::words(args, &["--layout", "--storage", "--name", "--remote", "--client"])}// a name as a folder (slug), and the nearest folder holding a marker (up): the registry's, which reads projects with@@ -344,12 +344,17 @@ fn show_workspace(json_out: bool) -> R<String> {let file = ws.join(".raea/workspace");let ps = projects(&ws);if json_out {- let projects: Vec<_> = ps.iter().map(|(n, p, s)| json!({"name": n, "path": p, "storage": s, "id": get(&file, &format!("project.{n}.id"))})).collect();- return Ok(json!({"path": ws, "id": get(&file, "workspace.id"), "name": get(&file, "workspace.name"), "layout": get(&file, "workspace.layout"), "projects": projects}).to_string());+ let projects: Vec<_> = ps.iter().map(|(n, p, s)| json!({"name": n, "path": p, "storage": s, "id": get(&file, &format!("project.{n}.id")), "client": client_of(&ws, n)})).collect();+ // the clients its projects name, so a new one joins an existing client rather than a near-twin of it+ let mut clients: Vec<String> = ps.iter().filter_map(|(n, _, _)| client_of(&ws, n)).collect();+ clients.sort_by_key(|c| c.to_lowercase());+ clients.dedup_by(|a, b| a.eq_ignore_ascii_case(b));+ return Ok(json!({"path": ws, "id": get(&file, "workspace.id"), "name": get(&file, "workspace.name"), "layout": get(&file, "workspace.layout"), "clients": clients, "projects": projects}).to_string());}let mut out = format!("{} ({}, {})\n{}\n", get(&file, "workspace.name").unwrap_or_default(), get(&file, "workspace.id").unwrap_or_default(), get(&file, "workspace.layout").unwrap_or_default(), ws.display());for (n, p, s) in &ps {- out.push_str(&format!(" {n} {p} {s}\n"));+ let c = client_of(&ws, n).map(|c| format!(" client {c}")).unwrap_or_default();+ out.push_str(&format!(" {n} {p} {s}{c}\n"));}Ok(out.trim_end().to_string())}@@ -359,7 +364,15 @@ pub fn project(args: &[String]) -> R<String> {let w = words(args);match w.first().copied() {None => show_project(args.iter().any(|a| a == "--json")),- Some("new") => new_project(w.get(1).ok_or(USAGE)?, flag(args, "--storage")),+ Some("new") => {+ let name = *w.get(1).ok_or(USAGE)?;+ let said = new_project(name, flag(args, "--storage"))?;+ match flag(args, "--client") {+ Some(c) => Ok(format!("{said}\n{}", tag(Some(name), Some(c), false, false)?)),+ None => Ok(said),+ }+ }+ Some("tag") => tag(w.get(1).copied(), flag(args, "--client"), args.iter().any(|a| a == "--no-client"), args.iter().any(|a| a == "--json")),Some("split") => storage::split(w.get(1).ok_or(USAGE)?, flag(args, "--remote")),Some("join") => storage::join(w.get(1).ok_or(USAGE)?),// PJ8: the folder's compositions and components, and what isn't connected@@ -372,6 +385,65 @@ pub fn project(args: &[String]) -> R<String> {}}+/// What a project is filed under in raea cloud (Shane 11-24: raea cloud's tags, not folders inside folders): its+/// client, `project.<name>.client` in .raea/workspace. raea.app files every card `raea show` makes from the folder under+/// it, with a board showing it; a folder naming none is its own client, named for it. Projects don't nest: an old+/// workspace's `parent` is read as "the same client as the parent" and nothing writes it.+pub fn client_of(ws: &Path, name: &str) -> Option<String> {+ get(&ws.join(".raea/workspace"), &format!("project.{name}.client")).filter(|c| !c.trim().is_empty())+}++/// `raea project tag [NAME] [--client C | --no-client]`: a project's client set, cleared, or said (NAME: the project+/// this folder is in when left out)+fn tag(name: Option<&str>, client: Option<&str>, clear: bool, json_out: bool) -> R<String> {+ let here = std::env::current_dir().map_err(|e| e.to_string())?;+ let ws = up(&here, ".raea/workspace").ok_or("not in a workspace: raea workspace init NAME makes one")?;+ tag_in(&ws, &here, name, client, clear, json_out)+}++/// `tag` in the workspace at `ws`, from the folder `here`+pub(crate) fn tag_in(ws: &Path, here: &Path, name: Option<&str>, client: Option<&str>, clear: bool, json_out: bool) -> R<String> {+ // (both resolved: a folder reached through a link, /var for /private/var, is still the workspace's)+ let real = |p: &Path| dunce::canonicalize(p).unwrap_or_else(|_| p.to_path_buf());+ let ws = real(ws);+ let name = match name {+ Some(n) => {+ let s = slug(n);+ if projects(&ws).iter().any(|p| p.0 == s) { s } else if projects(&ws).iter().any(|p| p.0 == n) { n.to_string() } else { return Err(format!("no project {n} in this workspace: raea workspace lists them")) }+ }+ None => {+ let dir = up(here, ".raea/project").map(|d| real(&d)).filter(|d| *d != ws).ok_or("not in a project: name one (raea project tag NAME --client C)")?;+ let rel = relative(&ws, &dir);+ projects(&ws).into_iter().find(|p| p.1 == rel).map(|p| p.0).ok_or_else(|| format!("{} isn't one of this workspace's projects", dir.display()))?+ }+ };+ let file = ws.join(".raea/workspace");+ let key = format!("project.{name}.client");+ if clear {+ if client_of(&ws, &name).is_some() {+ config(Some(&file), &["--unset", &key])?;+ commit(&ws, &[".raea/workspace"], &format!("project {name}: no client"))?;+ }+ } else if let Some(c) = client {+ let c = c.trim();+ if c.is_empty() {+ return Err("a client has a name: --client NAME (--no-client clears it)".into());+ }+ if client_of(&ws, &name).as_deref() != Some(c) {+ set(&file, &key, c)?;+ commit(&ws, &[".raea/workspace"], &format!("project {name}: client {c}"))?;+ }+ }+ let now = client_of(&ws, &name);+ if json_out {+ return Ok(json!({"project": name, "client": now}).to_string());+ }+ Ok(match now {+ Some(c) => format!("{name}: client {c} (raea show files its work under {c}, on {c}'s board)"),+ None => format!("{name}: no client named, so its work is filed under one named for it (raea project tag {name} --client NAME names one)"),+ })+}+fn new_project(name: &str, storage: Option<&str>) -> R<String> {let here = std::env::current_dir().map_err(|e| e.to_string())?;let ws = up(&here, ".raea/workspace").ok_or("not in a workspace: raea workspace init NAME makes one")?;@@ -429,7 +501,8 @@ fn show_project(json_out: bool) -> R<String> {let file = dir.join(".raea/project");let ws = up(&dir, ".raea/workspace").filter(|w| *w != dir);if json_out {- return Ok(json!({"path": dir, "id": get(&file, "project.id"), "name": get(&file, "project.name"), "workspace": ws}).to_string());+ let client = ws.as_ref().and_then(|w| projects(w).into_iter().find(|p| p.1 == relative(w, &dir)).and_then(|p| client_of(w, &p.0)));+ return Ok(json!({"path": dir, "id": get(&file, "project.id"), "name": get(&file, "project.name"), "workspace": ws, "client": client}).to_string());}let mut out = format!("{} ({})\n{}\n", get(&file, "project.name").unwrap_or_default(), get(&file, "project.id").unwrap_or_default(), dir.display());if let Some(ws) = &ws {diff --git a/engine/cli/src/cli.rs b/engine/cli/src/cli.rsindex 21e46d36..a05d2503 100644--- a/engine/cli/src/cli.rs+++ b/engine/cli/src/cli.rs@@ -144,7 +144,7 @@ pub fn run(args: &[String]) -> R<String> {let usage = format!("{usage}\n raea bug TITLE... --text TEXT [--command CMD] [--error TEXT] [--agent NAME] [--dry-run] (a bug in raea itself, not in your own composition, sent to raea's server with raea's version and the OS, no account needed: words only, paths, emails and keys taken out before it goes; five a day from a machine, the same bug again counted on the first report; --dry-run prints what would go and sends nothing)");let usage = format!("{usage}\n {} ({})\n {} ({})", raea_sys_fixes::USAGE, raea_sys_fixes::ABOUT, raea_app_voice::USAGE, raea_app_voice::ABOUT); // a problem looked up before it's guessed at (systems/fixes); speech to speech (apps/voice)// a workspace's files and specs (docs/projects.feature), listed under render's usage like library- let usage = format!("{usage}\n raea spec FILE.ts [--as brief|script|taste|parts] (a spec's default export as JSON, checked against its schema: brief.ts, script.ts, taste.ts, NAME.parts.ts)\n raea workspace init [NAME] [--layout LAYOUT] | raea workspace adopt DIR [--name NAME] | raea workspace [--json] (a workspace: a git repo of projects under raea.root, ~/Documents/raea unless git config says)\n raea project new NAME [--storage inline|submodule] | raea project split NAME [--remote URL] | raea project join NAME | raea project [--json] (a project in the workspace: its folder, brief.ts, media/, out/; split and join keep its history)\n raea check EDIT.tsx --quick [--shape S] [--platform P] [--taste T] [-o check.json] (three stills of a composition checked for text: clipped, cramped, safe areas, sizes; about a second)\n raea hook [claude|codex|gemini|kimi] (every agent's tool hooks, which raea skills install adds: before a shell command, media opened in the Mac's viewer while the raea app is installed is stopped once for raea show (the same command again goes through); after a save, the quick check on a composition)\n raea next [DIR] (the two or three useful next steps for the project, from its brief, compositions, renders and checks)\n raea doctor [--fix] [DIR] (what doesn't match this raea: old brief files, an older workspace format, an agent's skill from another version)\n raea app run|check|bundle APP.tsx [--target web|native] [--size WxH] [--script steps.json] [--png DIR] [-o App.app] (a TSX app on @raea/ui: its window, the headless check, a Mac app; web is Blitz on Bevy, native is Rune; the app's `export const app` sets the target, web when it doesn't; raea rune ... is --target native)\n {}\n {}\n {} ({})\n {}\n {}\n {}", skill::USAGE, tools::blender::USAGE, tools::motion::SETUP_USAGE, tools::motion::SETUP_ABOUT, raea_app_engines::godot::USAGE, raea_app_engines::shot::USAGE, raea_app_engines::round::USAGE);+ let usage = format!("{usage}\n raea spec FILE.ts [--as brief|script|taste|parts] (a spec's default export as JSON, checked against its schema: brief.ts, script.ts, taste.ts, NAME.parts.ts)\n raea workspace init [NAME] [--layout LAYOUT] | raea workspace adopt DIR [--name NAME] | raea workspace [--json] (a workspace: a git repo of projects under raea.root, ~/Documents/raea unless git config says)\n raea project new NAME [--storage inline|submodule] [--client NAME] | raea project tag [NAME] [--client NAME] [--no-client] | raea project split NAME [--remote URL] | raea project join NAME | raea project [--json] (a project in the workspace: its folder, brief.ts, media/, out/; its client, what raea.app files every card shown from it under (raea cloud's tags: projects don't nest); split and join keep its history)\n raea check EDIT.tsx --quick [--shape S] [--platform P] [--taste T] [-o check.json] (three stills of a composition checked for text: clipped, cramped, safe areas, sizes; about a second)\n raea hook [claude|codex|gemini|kimi] (every agent's tool hooks, which raea skills install adds: before a shell command, media opened in the Mac's viewer while the raea app is installed is stopped once for raea show (the same command again goes through); after a save, the quick check on a composition)\n raea next [DIR] (the two or three useful next steps for the project, from its brief, compositions, renders and checks)\n raea doctor [--fix] [DIR] (what doesn't match this raea: old brief files, an older workspace format, an agent's skill from another version)\n raea app run|check|bundle APP.tsx [--target web|native] [--size WxH] [--script steps.json] [--png DIR] [-o App.app] (a TSX app on @raea/ui: its window, the headless check, a Mac app; web is Blitz on Bevy, native is Rune; the app's `export const app` sets the target, web when it doesn't; raea rune ... is --target native)\n {}\n {}\n {} ({})\n {}\n {}\n {}", skill::USAGE, tools::blender::USAGE, tools::motion::SETUP_USAGE, tools::motion::SETUP_ABOUT, raea_app_engines::godot::USAGE, raea_app_engines::shot::USAGE, raea_app_engines::round::USAGE);let (export_game, capcut, layers, xml, scene, physics, splat, wear, bake) = (raea_app_game::USAGE, raea_app_capcut::USAGE, raea_app_layers::USAGE, raea_app_layers::USAGE_XML, raea_app_scene::USAGE, motion::physics::USAGE, tools::splat::USAGE, raea_runtime_wear::USAGE, raea_app_lightbake::USAGE);let apps = format!(" {}\n {}\n {}\n {}\n {}\n {}\n {}\n {}\n {}\n {}\n {}\n", raea_app_direction::check::USAGE, raea_app_check::USAGE, raea_app_solid::USAGE, raea_app_judge::USAGE, raea_app_ask::USAGE, raea_app_make::USAGE, raea_app_direction::USAGE, raea_app_direction::findings::USAGE, raea_app_notes::USAGE, raea_app_fingerprint::USAGE, raea_sys_index::cli::USAGE);return Ok(format!("raea: renders, plays and checks raea compositions (React and TypeScript) on the GPU.\n\nusage: {usage}\n raea init (a project's files where they're missing: edit.tsx, cuts.ts, components/, AGENTS.md)\n raea cut TAKE \"line\" ... | --at A-B ... [--append] (cuts.ts and words.json: a take under media/ cut in the pauses around each line it says, transcribed first if it has no TAKE.words.json; or at those seconds)\n raea frame TAKE [--at S] (how a take fits the edit: a talking take for <FaceFrame>, a screen for <ScreenFit>, from where its face is)\n raea component list | raea component add NAME ... [--shared] [--force] | raea part list | raea part add NAME ... [--shared] [--force] (a ready component or set copied into components/, or the workspace's shared/components/ with --shared, yours to change; raea part is its old name)\n raea brand DOMAIN|URL (the brand kit read from its website on this machine: brand/brand.css, brand/brand.json, BRAND.md, logos in media/brand; says when a plain fetch saw too little)\n raea guide [NAME] (craft, the floor read before any edit; the modes: pitch, explain, story, play, tool; motion, music, layout and the rest; bevy and bevy/NAME for 3D)\n raea context PROJECT (what to read before working on a project: taste, brief, look, the floor and its modes' guides)\n{apps} raea play EDIT.tsx [--input | --input-script KEYS.json] [--size WxH] [--seconds N|end] (a game, live; also: --input-log FILE --offscreen --snapshot T FILE --json FILE --seek F FILE --pick X,Y --view YAW,PITCH,DISTANCE --scrub N --baked --autoplay --no-vsync --master --3d)\n {export_game} (a game as a program of its own: a Mac app or a command)\n {capcut}\n {layers}\n {xml}\n {scene} (what each 3D part rests on: floating, sunk and clipping parts; light: the scene's lighting)\n {physics} (the bakes <Physics> and <Goo> make)\n {bake}\n {wear} (a .glb's weathering causes for raea/wear: the model with a second UV set and its cause maps, made once in the asset store)\n {splat} (footage trained into a Gaussian splat for <Splat>; setup installs its tools)\n raea run SCRIPT.ts (a TypeScript program on the engine, headless: its default export is called, what it prints is the answer; a check like a room's checkLayout; also: --timeout S)\n raea gen image|video|music|sfx|speech|mesh|text \"PROMPT\" | gen plan|run FLOW.ts|FLOW.json | gen comfy import|export|run|schema FILE | gen models | gen balance (generated media through made.app, fal, Replicate, OpenRouter, Modal or ComfyUI; ComfyUI workflows both ways: raea gen alone lists its flags)\n {neural_usage} (DLSS 5 neural rendering on a `render --aov` folder, with its motion and depth: your own MLX-DLSS build and weights, RAEA_MLXDLSS and RAEA_DLSS_MODEL)\n {light_usage} (each scene on each light path against its path-traced reference: distance in stops, the worst tile, a moving shot's flicker, a frame's cost; DIR/report.json)\n {} (each case on each denoiser against its converged truth: FLIP, RMSE, bias, flicker, blotches, lag after a disocclusion or a light going out, a frame's cost, and how many of MetalFX's numbers each meets; DIR/report.json)\n raea mezz [--check] PATH... (an intra-only ProRes copy of each long-GOP source over 1080p, for smooth scrubbing; --check says which would get one)\n raea traces [show [N|last|DIR]] (the sessions raea left, newest first: how each ended, its glitches; show tells one in full)", raea_denoise_bench::USAGE));