Deploy from a repository
Start by installing the CLI and signing in. Then pick the path that matches what you have.
Two commands do different things, and it is worth knowing which one you are running:
- A single folder’s
push—ronja wf push,ronja app pushand the others — sends the folder to your own draft. Nobody else sees it until youpublishit.ronja automation pushis the exception: an automation has no draft, so its push changes the live automation at once. ronja sync applypushes and publishes every folder under the directory it runs in. What it deploys is live as soon as it finishes.
Let an AI assistant ask before it deploys
Section titled “Let an AI assistant ask before it deploys”An AI coding assistant, such as Claude Code or Codex, working in the repository with your sign-in should not put changes live on its own. It runs ronja propose instead:
ronja proposeronja propose changes nothing in Ronja. It works out what ronja sync apply --allow-create would create and change, and which migrations a managed database folder would apply, then uploads that list with a copy of the files as a change list, and prints a link. You, the person whose sign-in the assistant uses, get a notification, check the list in Ronja and click Approve and deploy. Ronja then deploys that exact copy as you; the assistant never deploys. See Approve a change list.
It refuses, and uploads nothing, when:
- a folder is not adopted. Ronja has to keep the record of what each folder deploys, so a deploy can never create the same thing twice: run
ronja sync adopt --stack <name>once (see Adopt a repository you already deploy from). - a folder would not deploy cleanly. It prints the same reason
ronja sync apply --dry-rungives. - a database migration was changed after it was applied. Add a new migration instead of editing one that has run.
- a folder names, by address, a folder outside the directory proposed, so the copy would not hold it. Propose from a directory that holds both.
ronja sync apply is the direct deploy, with no approval: for a build server, and for you deploying by hand.
Edit one existing resource
Section titled “Edit one existing resource”For a quick change to one workflow, App, module or Feature’s tables, with no repository set up:
- Copy it into a folder:
ronja wf clone <workflow ID>, then go into the folder it names. - Edit the files in your own editor.
- Run
ronja wf pushto send them to your draft. - Run
ronja wf testto run the draft and see its result. - Run
ronja wf publishto take it live.
Apps work the same way with ronja app. Modules (ronja module clone <module ID>) and a Feature’s tables (ronja pipeline clone <Feature ID>) use clone, push and publish, with no test step. See Work on Ronja from your editor.
Adopt a repository you already deploy from
Section titled “Adopt a repository you already deploy from”If you already push folders from a repository, let Ronja keep the record of what each one deploys, so a build server needs nothing committed by hand. Each folder must already name the stack in ronja.json, with its Feature’s ID as featureID; a folder that does not is reported no_feature and left unchanged.
- Run
ronja sync adopt --stack prodat the top of the repository. - Commit the changed
ronja.jsonfiles. - Run
ronja sync apply --stack prod --dry-runto see what a deploy would do, thenronja sync apply --stack prod.
Once adopted, a folder writes and runs only inside its stack’s Feature. A workflow that writes a table in another Feature, or runs a workflow or Saved Agent there, is refused (writes_outside_target, runs_outside_target) until that dependency is declared in ronja.json with "write": true or "run": true and set in the stack’s bind map.
Running ronja sync adopt again is safe. To stop a folder keeping its records in Ronja, run ronja sync unmanage.
Import a Feature and deploy it
Section titled “Import a Feature and deploy it”To start a repository from what a Feature already holds:
mkdir sales && cd sales && git initronja import feature Sales # the Feature's folders, on stack "main"git add -A && git commit -m "Import Sales"ronja sync status --stack main # clean: the tree holds what is live
# edit files, commit, then:ronja sync apply --stack main --dry-run # what the deploy would changeronja sync apply --stack main # push and publish every changed folderIn the dry run, everything that already matches what is live is listed as unchanged — a workflow, App or module folder, and each table, metric and automation file — and the deploy changes nothing for it. (If Ronja has no record yet of a row the folder’s ronja.lock.json names, the dry run says the deploy adds that record; that changes nothing you deployed.) If someone changes something in Ronja that the repository deploys, the next deploy stops and names it; run ronja <kind> pull to take the change into the folder, and commit it.
An import names what each folder reads by the folder that builds it where it can, so the same repository can deploy elsewhere. It leaves two kinds of ID in place and lists them: a table a workflow’s code replaces by its ID, and IDs written into an App’s source. Before deploying to a second stack, change the App’s IDs by hand; ronja sync stack add turns each tools.replaceTable(df, "table-…") it lists into tools.replaceTable(df, {{ write('<name>') }}) for you. To import only part of a Feature, such as one app and what it needs, use ronja import feature --only <ID>: see Test in a dev Space. Letting Ronja keep the records of tables and metrics needs an Admin, so anyone else’s import writes no pipeline folder and lists the tables and metrics it left out.
Deploy to a second stack
Section titled “Deploy to a second stack”A second stack — a test Feature next to production, say — deploys the same repository somewhere else, from the same checkout: each stack keeps its own record of what it last deployed. A module’s name is unique within a Feature, so a stack can deploy its own copy of a module into its own Feature, or deploy to the Feature the module already lives in and share that copy. For a test stack in a dev Space of the same organization, see Test in a dev Space.
From the same checkout:
-
Run
ronja sync stack add <name> --feature <the second Feature's ID>at the top of the repository. It adds the stack to every folder’sronja.json, next tomain, and creates nothing in Ronja. Under the same confirmation, it turns every ID written into the code into a name the folder declares, kept pointing at the same row formain, somainreads and writes the same rows. A table the code replaces by its ID becomes{{ write('<name>') }}:mainstill writes that table, but its code changes in that one argument, so its next deploy is a new version. Commit the change and deploymainafter it, so an older checkout does not deploy the ID back. A module folder gets the second Feature, for a copy of its own; to share the module instead, change that folder’sfeatureIDto the Feature the module already lives in. -
sync stack addalso chooses what the new stack reads, asronja bind --stack <name>does in one folder. It fills in what the code writes ("write": true), or a workflow or Saved Agent it runs ("run": true), only when exactly one row of that name is in the new Feature itself, because a match anywhere else could be production’s: set each other one by hand in that stack’sbindmap inronja.json, to a row in the new Feature. It lists, folder by folder, every name it could not fill. A workflow’s own output ("output": true) needs nothing: its first run on the new stack makes it in the new Feature.A table one of the repository’s own workflows writes is not something to look up by name either: name it by that workflow’s folder, so each stack reads its own copy. An import already writes it that way. In the reading folder’s
ronja.json,fromis the workflow folder’s path andaddressis the name the workflow gives the table, and the folder needs"formatVersion": 7:"dependencies": {"weekly_revenue": {"kind": "table", "from": "../../workflows/compute-weekly-revenue", "address": "weekly_revenue"}}A table a pipeline folder builds is named the same way, with its
.sqlfile asaddress. -
Run
ronja sync apply --stack <name> --allow-create. Without--allow-create,sync applyonly updates what already exists and refuses to create anything. When the new Feature already has a workflow, App, module or automation of the same name, the deploy stops with name_taken rather than create a second one beside it: the message names that row and the line to add to the folder’sronja.lock.jsonso the stack deploys it instead. A folder that reads a workflow’s output is refused until that workflow has run once on the new stack: run it (ronja wf run --stack <name>in its folder), then apply again.
Take a change made in Ronja into the repository
Section titled “Take a change made in Ronja into the repository”Anyone can still change something a repository deploys — in Ronja, by asking Ronja, or from a folder of their own — and it is marked Managed in git while they do. The repository’s next deploy stops on the change. To keep it:
- Run
ronja <kind> pullin the folder:ronja wf pull,ronja app pull,ronja module pull,ronja pipeline pullorronja automation pull. - Read the diff it prints. The folder’s files now hold what is live.
- Commit the changed files.
The next ronja sync apply writes nothing for that folder. --dry-run shows the diff and changes nothing.
A pull reads only what is live, never a draft, and never replaces a change of your own that has not been deployed: it stops and names your files. Deploy your change first and combine the two by hand, or pass --force to replace your change with what is live. It also stops on changes you have not committed. Each refusal says why and what to do next.