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 | shLinux, macOS and Windows. Verifies the SHA-256 of what it downloads. Needs a Raytha site and an API key.
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
curl -fsSL https://raytha.com/cli/install.sh | sh
export RAYTHA_URL=https://your-site.example.com
export RAYTHA_API_KEY=your-key
raytha doctor
## Using the raytha CLI
1. `raytha doctor` first; it checks the URL, the key and permissions.
2. Read `raytha guide build-a-site` before touching anything.
3. Work from files: theme pull, edit, theme push --dry-run, push.
4. Read ok, error.code and error.hint. Never guess around a 403.
5. After a change, fetch the public page and read the HTML.
You have the `raytha` CLI installed and RAYTHA_URL and RAYTHA_API_KEY set.
Run `raytha doctor`, then read `raytha guide build-a-site` and follow it.
Build a complete website for Kiln & Kettle, a pottery studio and tea room
in a converted mill. Pull raytha_default_theme into ./site, redesign it
(warm paper and clay colours, a serif display face), push and activate.
Model makers, pieces, workshops, teas and a journal; seed realistic content
with images. Build home, studio, visit and classes pages from widgets you
create, plus a main menu. Finish with `raytha check` and fix what it reports.
raytha check
git -C ./site log --oneline
# iterate
# "Make the hero taller and add a newsletter widget to the home page."
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.
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.
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.
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.
A finish line
raytha check requests every public route and exits 6 if any fail, so the agent knows when it is done.
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.
Functions too
Create and edit Raytha Functions from files, with revisions. sitemap.xml, llms.txt and this page's own install redirect are functions.
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
$ 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
Two sites built with nothing but the CLI
Both start from an empty Raytha install. Every command the agent ran is in the repository.
Aurora Observatory
A dark-sky expedition company: guides, expeditions, instruments, field notes, a themed design system and seven site pages.
Browse the buildKiln & Kettle
A pottery studio and tea room: five content types using all 13 field types, 63 items, 19 custom widgets, 17 views, six pages and six functions.
Browse the buildThe agent skill
A short SKILL.md in the Agent Skills format for Cursor and Claude Code, plus the AGENTS.md rules. Copy either into your project.
Open the skillPick 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.
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 | shWindows
PowerShell. Installs to %LOCALAPPDATA%\raytha\bin.
irm https://raytha.com/cli/install.ps1 | iexGood 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.