Files
raea/docs/manual/reference/cli/component.md
T
shaneandshinyobjectz 8dfd71eb92 The component library says when to use each piece: search by how people ask, show NAME, props and upstream names (#315)
An agent asked for "the effect template for composer animations with Claude" found nothing: the catalog had one thin
line per item and the search only read names and that line. Now:

- tools/library-meta.sh (enrich.ts, props.ts, upstream.ts, words.ts, hand.json) matches each of the 609 items by
  content to the upstream component it came from (all 609 match; snapcn's terminal-simulator and text-highlight are
  ui/terminal-session and text/highlight-sweep here) and writes into catalog.json: upstream (a search alias only),
  what (what it draws and how it moves), use_when and avoid_when (upstream's useWhen/avoidWhen in plain words, other
  libraries' names out, pointers rewritten to our category/name or dropped), asked_as (upstream's askedAs plus the
  words people use for its kind: template, effect, composer, chat input, AI prompt, terminal, Claude Code...), props
  (name, type, default and a line each, read from its Props type with the TypeScript parser), length, fps, size,
  aspect and vibe. snapcn's and React Video Editor's items have no when-to-use upstream: hand.json holds those, 134.
- raea make component list WORDS searches names, upstream names and asked_as heavily, what and use_when once; filler
  words are skipped and "template"/"effect"/"preset" alone list the items that are one with how to narrow it.
- raea make component show NAME prints one item in full; list/show --json give the same as JSON.
- sdk/guides/craft/components.md: a template, an effect or a branded screen goes to the library first.

Co-authored-by: shinyobjectz <[email protected]>
2026-12-03 12:29:09 -08:00

3.3 KiB
Raw Blame History

title, summary, order, sources
title summary order sources
raea make component Copy a ready-made component or set into the project's components/, or the workspace's shared/components/, to use and change as your own. 103
engine/cli/src/index.ts
engine/cli/src/registry.gen.ts
engine/cli/src/catalog.ts

Components are ready-made pieces of a composition (captions, lower thirds, end cards and the like) and sets of them. raea make component list shows them; raea make component add copies one into components/NAME/, where it's yours: raea never updates or overwrites it unasked. With --shared it goes into the workspace's shared/components/ instead, for every project to import as @shared/components/NAME. raea part is the old name and still works.

Beside raea's own sets is the library: several hundred open-source components (text reveals, counters, charts, transitions, product-screen demos, game HUDs and more), sorted by what they're for rather than who made them. raea make component list ends with its categories; list WORDS searches it by a category (text), a category and type (text/reveal), a name or the name it had upstream, the phrases people ask for it with ("chat input", composer, "lower third", template), or words in what it does ("count up"). show NAME tells one in full: what it draws and how it moves, when to use it and when not, the size and length it was designed at, and each prop with its type, default and what it does; --json gives the same as JSON, for every hit of a list. add NAME copies the component into components/CATEGORY/NAME/, with the shared helpers it needs under components/_lib/. Each file's first line names the library it came from, and CREDITS.md in sdk/raea/library/components holds their licences.

raea make component list
raea make component add captions end-card
raea make component add reel --shared
raea make component list text/reveal
raea make component list count up
raea make component list chat input
raea make component show prompt-send
raea make component add soft-blur-in

Usage

raea make component list [WORDS] [--json] | raea make component show NAME [--json] | raea make component add NAME ... [--shared] [--force]   (a ready component or set copied into components/, or the workspace's shared/components/ with --shared, yours to change; WORDS search the library by use and by how people ask: text/reveal, "count up", "chat input", template; show tells one in full: what it draws, when to use it and when not, its props)

Headless: it needs nothing running and opens no window. Takes any number of arguments besides its flags.

Flags

Flag Takes What it does
--force – Replace a component's files that are already there. Without it, an existing component is left alone and the command stops.
--json – The library's items as JSON (list: every hit, best first; show: the one), each with its props, when to use it and when not, and the phrases it's asked for with.
--shared – Copy into the workspace's shared/components/ instead, where every project in the workspace imports it as /components/NAME.