Platform CLI
Learn
Developer docs User guide Quickstart CLI and AI agents Blog
Company
Services About Contact Links Get started
Open source, MIT. New in October 2026

The command line for Raytha, built for AI agents.

One binary that manages themes, content types, content, site pages, menus, media and functions. Every command prints JSON, every error says how to fix it, and the manual ships inside. Hand it to your coding agent and describe the site you want.

$curl -fsSL https://raytha.com/cli/install.sh | sh

Linux, macOS and Windows. Verifies the SHA-256 of what it downloads. Needs a Raytha site and an API key.

1 binaryNo runtime, no dependencies
JSONOut of every command
6Stable exit codes
10Guides built into the tool
One-shot a website

From a prompt to a live site

Raytha treats agents as first-class builders. The CLI gives them a protocol, a manual and a finish line; you give them the brief.

# Option 1: Railway (recommended)
# Open the Raytha template, click Deploy, wait a minute.

# Option 2: Docker, with your own PostgreSQL
docker run -p 8080:8080 raythahq/raytha
Why agents do well with it

A protocol, not a GUI

Agents fail when they have to guess. The CLI removes the guessing.

One JSON document per command

ok, data or error. Errors carry a code, a hint and the fields that failed. Exit codes 2 to 6 say what kind of problem it was.

{ "ok": false, "error": { "code": "validation", "hint": "Line 12, column 8: unknown tag 'layout'" } }

The manual ships inside

raytha guide build-a-site is the end-to-end recipe. Nine more topics cover themes, Liquid, widgets, content, pages, media, functions and errors, always for the installed version.

build-a-sitethemesliquidwidgetscontent-typessite-pagesfunctionserrors

Themes are directories

theme pull turns a theme into Liquid and JSON files. Edit, keep in git, theme push. Dry runs parse every template on the server first.

theme.json
web-templates/*.liquid
widget-templates/*.liquid + .json
media/

The content model is a document

schema export and schema import move content types, fields, choices and views as one JSON file. content import seeds hundreds of items with relationships resolved by the server.

raytha schema import site.json --dry-run raytha content import pieces \ --file pieces.jsonl

A finish line

raytha check requests every public route and exits 6 if any fail, so the agent knows when it is done.

theme pushok
63 items importedok
raytha check88 routes, 0 failing

Permissions you control

The key carries its administrator's permissions. On a 403 the CLI tells the agent which one is missing and to stop, not to work around it.

templatessitePagescontentTypesmedia

Functions too

Create and edit Raytha Functions from files, with revisions. sitemap.xml, llms.txt and this page's own install redirect are functions.

For humans as much as agents

A terminal workflow for your whole site

Pull a theme, edit it in your editor, push it back. Create content types and seed data from files. Script deployments in CI. The same tool, the same JSON.

  • Pull and push entire themes as plain files
  • Dry-run every change before it goes live
  • Partial edits: flags you leave out keep their value
  • Destructive commands need --yes
  • raytha spec lists the live API for anything not covered

Read the CLI docs

$ raytha doctor
$ raytha theme pull raytha_default_theme ./site
$ raytha theme push ./site --dry-run
$ raytha theme push ./site --activate
$ raytha content-type create pieces --label-plural Pieces --label-singular Piece
$ raytha content import pieces --file pieces.jsonl
$ raytha site-page create --title Studio --template kk_page --route-path studio \
    --sections @studio.json
$ raytha check
Install

Pick your platform

The installer downloads the release for your OS and CPU, verifies its checksum and puts one binary on your PATH. Run it again to upgrade.

Recommended

Linux and macOS

Static on Linux, native on Intel and Apple silicon Macs. Installs to ~/.local/bin.

$curl -fsSL https://raytha.com/cli/install.sh | sh

Windows

PowerShell. Installs to %LOCALAPPDATA%\raytha\bin.

$irm https://raytha.com/cli/install.ps1 | iex

From source

Rust 1.88 or newer. Clone the repository and cargo install --path .

raytha-cli on GitHub
FAQ

Good questions

Which agents work with it?

Any agent that can run shell commands: Cursor, Claude Code, Codex, OpenCode, GitHub Copilot's agent mode, or your own script. The CLI has no plugin and needs none; it is a binary that prints JSON. The repository ships a skill file for tools that read Agent Skills, and the same rules fit in an AGENTS.md.

Is it safe to let an agent loose on my site?

The API key is the boundary: it has exactly the permissions of the administrator it belongs to, so scope that role to the task. Destructive commands require --yes, theme pushes have --dry-run, and every write lands in the audit log. Do the first run against a fresh or duplicated site, then iterate.

Does it work with a site I already have?

Yes. raytha theme duplicate copies the live theme with every binding so the agent edits a copy, and you activate it when you have looked at it. Content, menus and pages are the same commands either way.

What does it cost?

Nothing. The CLI is MIT licensed like Raytha. You pay your agent's provider for tokens and your host for the site.

Where is the install script coming from?

raytha.com/cli/install.sh redirects to the installer attached to the latest GitHub release, where the binaries and SHA256SUMS live. The script verifies the checksum before it installs anything. Read it first if you like: it is short.

Give your agent a website to build

Install the CLI, create a key, describe the site. Own the result in git.