This page lists every command group in the raytha CLI and what each subcommand does. Each group and subcommand has --help with the exact flags, and raytha guide <topic> has the longer explanation. Install and connect first: The Raytha CLI.
Global flags
| Flag | Meaning |
--url <URL> | Site root. Overrides RAYTHA_URL. |
--api-key <KEY> | Administrator API key. Overrides RAYTHA_API_KEY. |
--pretty | Indent the JSON output. |
--timeout <SECONDS> | Request timeout, default 60. |
--yes | Required by delete and purge commands. |
--dry-run | On theme push and schema import: report, write nothing. |
--all, --page <N>, --page-size <N> | On list commands: fetch every page, or one page of a given size (default 50). |
Flags that take JSON accept inline JSON, @path to read a file, or - for standard input.
Diagnostics and docs
| Command | What it does |
raytha doctor | Checks the URL, the key, the server version, and which command groups the key may use. |
raytha guide [topic] | Prints the built-in docs: overview, build-a-site, themes, liquid, widgets, content-types, site-pages, media, functions, errors. |
raytha check | Requests every public route (home, published views, items, site pages, an unknown path) and exits 6 if any fail. --types, --max-items, --no-items, --no-pages, --all. |
raytha spec [--summary] [--path text] | Lists the site's live OpenAPI operations, for anything the curated commands do not cover. |
raytha task get|wait <id> | Background jobs started by theme duplicate, theme match-templates and content import. |
Themes
| Command | What it does |
theme list, get | List themes (isActive marks the live one) or get one by developer name. |
theme create, edit, delete | Create an empty theme, edit title or description, delete (the active theme cannot be deleted). |
theme pull <theme> <dir> | Download a theme into a directory of plain files: theme.json, web-templates/, widget-templates/, media/. |
theme push <dir> | Sync a directory up. Creates or updates; --dry-run, --activate, --prune, --theme other, --no-media, --replace-media. |
theme activate | Make a theme the one the public site renders with. |
theme duplicate <src> <new> [--wait] | Copy templates, widget templates, media and view bindings under a new name. |
theme match-templates <theme> | Tell Raytha which template of this theme replaces each template of the active theme. |
theme usage <theme> [--template NAME | --unused] | Which views, items, site pages and child templates use each web template. |
theme media list|upload|delete | Theme media: images, CSS and JS referenced by templates. |
Templates and widgets
| Command | What it does |
web-template list|get|create|edit|delete | Layouts and page templates in Liquid. edit keeps omitted values; --content-types and --allow-new-content-types control access. |
web-template validate --file x.liquid | Check Liquid syntax on the server without saving. Errors carry line and column. |
web-template preview <theme> <name> --view <id> | --content-item <id> | Render a template on the server with real data and return the HTML, without publishing. |
widget-template list|get|create|edit|delete | Reusable blocks with a settings form. create takes a Liquid file and a field list. |
widget-template field-types | The field types a widget's settings form can use. |
Site pages
| Command | What it does |
site-page list [--full], get <id> | List pages (compact by default) or get one with its sections and widgets. |
site-page create --title T --template X [--route-path p] [--sections JSON] [--home] | Create a page, optionally with its route, widgets and home-page flag in one step. |
site-page edit, settings | Change title or template; change the URL path. |
site-page sections <id> --sections JSON [--replace] [--publish] | Replace or add whole sections of widgets. Saved to the draft unless --publish. |
site-page widgets save|edit|delete | Replace all widgets in one section, change one widget's settings, or remove one widget. |
site-page publish, unpublish, discard-draft, set-home, delete | Lifecycle. |
site-page widget-definitions | Widget types usable in the active theme, with their settings fields. |
Content model
| Command | What it does |
content-type list|get|create|edit|delete | Content types. create starts with title and content fields and a public list view. |
content-type fields create|edit|delete|reorder | Fields: --type, --label, --required, --choices, --related-content-type, --sub-fields for repeaters. content-type get lists them. |
content-type field-types | The field types a content type field can use. |
content-type views list|get|create|delete|set-home | Views: public filtered and sorted lists. list is compact; --full adds field definitions. |
content-type views settings|filter|sort|sort-reorder | settings sets publishing, URL path, template and page size; filter takes a JSON array of conditions ([] clears); sort sets a column's sort and visibility. |
schema export [--out FILE] [--summary] | Every content type with its fields, choices and views as one document. |
schema import FILE [--dry-run] | Create or update content types, fields, choices and views from an exported document. |
Content
| Command | What it does |
content list <type>, get, get-by-path | Items of a content type, by id or by URL path. |
content create <type> --data JSON [--template X] [--route-path p] [--draft] | Create an item. @file:path values upload attachments. |
content edit <type> <id> --data JSON | Edit field values. Published unless --draft. |
content import <type> --file rows.json|jsonl | Create many items in batches of 500; waits for the job and lists failed rows by index. Relationships resolve by id, route path or primary field value. |
content publish, unpublish, discard-draft, settings, set-home | Lifecycle, URL path and template, home page. |
content assign-template <type> --template X [--all] | Point items at one detail template of the active theme, after a theme switch. |
content delete, delete-many, trash, restore, purge | Trash one or several items, list the trash, restore, or delete permanently. |
Media, menus, functions, users
| Command | What it does |
media list|upload|get-url|delete | The media library. upload returns the object key and URL. |
menu list|get|create|edit|delete|set-main | Navigation menus. set-main chooses what get_main_menu() returns in Liquid. |
menu items list|create|edit|delete|reorder <menu> | Items: --label, --link, --parent for nesting, --new-tab, --disabled. |
function list|get|create|edit|delete | Raytha Functions in JavaScript. create takes --trigger, --file and --route-path. |
function revisions, revert | Earlier versions of a function's code; restore one. |
user list|get|create|edit|delete|password|set-active | Public users. |
user-group list|get|create|edit|delete | Public user groups. |
Next steps