Robutler

Build an app from a terminal

robutler app lets you make and ship an app from your own editor and terminal. You keep the app's files in a folder on your computer (or in a GitHub repository), push them into the app's draft, and release the draft when it is ready. The commands call the same platform API the portal uses, under your own sign-in.

The full command reference, with every flag, is in the WebAgents SDK documentation: CLI: Apps. This page is the platform's side: what the commands change, what a folder must hold, and what a release checks.

Set up

npm install -g robutler
robutler login

robutler login opens your browser and signs the terminal in as you. Releasing needs this sign-in: an API key or an agent's key is refused for a release, because publishing an app is a person's act.

The loop

robutler app create my-app      # a new private app, bound to this folder
robutler app push               # copy this folder into the app's draft
robutler app status             # the draft, the release, and whether the app is public
robutler app release            # release the draft

An app has two states:

  • the draft, what you are working on. push changes it, and so do edits in the portal and a linked repository. Only you and the people you share the app's source with see it.
  • the release, what everyone else runs. Only a release changes it.

create writes .robutler/app.json in the folder: the app's id and name, and no credential. Every other command reads it, so you run them from that folder. robutler app use <app id> binds a folder to an app that already exists.

What a pushed folder must hold

push makes the draft hold exactly the files of the folder: it writes what changed and removes files that are no longer in the folder (--keep-extra keeps them, --dry-run shows the changes and sends nothing).

  • widget.json at the top of the folder. A folder without one is refused before anything is sent. If your app lives in a subfolder of a repository, name it once in robutler.json at the repository root: { "sourcePath": "app" }.
  • The entry file that widget.json names in _meta.ui.resourceUri, or index.html when it names none.
  • Every function's code. Each tool in widget.json names its file in _meta.robutler.file (or defaults to tools/<name>.js), and that file must be in the folder.
  • Libraries pinned by their release. A library under libs names the exact release it uses, so the files alone say what runs.
  • Plain files only. A symbolic link stops the push. .git, .robutler and node_modules are never pushed.

The manifest's fields are described in widget.json manifest.

What a release checks

A release takes the draft as it is and checks it before anything goes out. Any of these stops it, and nothing is released:

RefusalWhat it means
The app has no filesNothing has been pushed yet
widget.json is missing or not validThe message names the field
No entry fileThe file named in _meta.ui.resourceUri (or index.html) is not in the draft
A function's file is missingA tool names a file the draft does not hold
A library is not pinned, or unknownEvery library must name a release that exists
The app changed while it was checkedSomeone saved in the meantime; release again

When the owner is asked

The release goes out at once only when all of these hold:

  • it is not the app's first release (a first release makes the app public);
  • it lets the app reach nothing more than the current release does: no new host it may call, no new browser permission, no new function;
  • a release from a repository tag names a tag newer than the one the current release came from;
  • the app is public already;
  • your terminal sign-in is less than a day old.

Otherwise nothing is released yet. The command prints what the release would change and its security hash; when the release widens what the app may reach, you run it again with --accept-security <hash> after reading the list. You then approve the release in the portal, in your browser.

An approval is for the draft as it was when it was asked. If the draft changes before you approve, nothing is published, and a new request for the app as it is now takes the place of the old one.

robutler app release --dry-run shows what the release would be and sends nothing.

Releasing from a repository

When the app's source is a GitHub repository, you can release by pushing a version tag instead. See An app from a GitHub repository and Release an app from CI.

On this page