Get started

Quickstart: build a record app

Run a private Superbot server on your machine, write a record app, approve it as its reviewer and use it with a bot. Everything stays on loopback, so you can repeat it as often as you like.

Requirements

Step 1: Start a local server

From the checkout root:

shell
node infra/superbot/host.mjs init
node infra/superbot/host.mjs up
node infra/superbot/host.mjs status

The first run builds the API, worker and web app, starts Postgres and applies migrations. Open http://127.0.0.1:5173 when the containers report healthy. init writes a private .env.superbot.local; keep it out of version control. Your server also publishes the bundled Calorie diary and T3 Code inbox.

Make yourself the reviewer. Approving needs a verified account, so create one with the bootstrap command and list it as an admin. The password needs at least 16 characters.

  1. In .env.superbot.local, set SUPERBOT_ADMIN_EMAILS=you@example.com.
  2. Export OWNER_EMAIL=you@example.com and OWNER_PASSWORD in your shell, run the command below, then remove both variables from your shell.
shell
node infra/superbot/host.mjs account
node infra/superbot/host.mjs up

Step 2: Install the tools

shell
cargo install --path native/cli --locked
cargo install --path native/plugin-kit --locked
superbot server http://127.0.0.1:5173
superbot login

The desktop installers build and install both tools too: scripts/install-native.ps1 on Windows, bash scripts/install-native-macos.sh on macOS, and bash scripts/install-native-linux.sh on Linux. On a Linux machine without a desktop, bash scripts/install-native-linux.sh --cli-only installs just the two commands in ~/.local/bin; sign-in needs an unlocked Secret Service in your D-Bus session.

Both programs share the server address and the saved session, which lives in your system credential store. If your account belongs to more than one Space, add --space with the Space's exact name or ID to each command.

Step 3: Create the app

shell
mkdir water-log
cd water-log
superbot-plugin init water-log --template kcal-diary --name "Water log"

This writes plugin.json: a copy of the Calorie diary with your name. Open it and change the fields. A water log could keep a date, a drink and millilitres:

plugin.json
{
  "schemaVersion": 1,
  "name": "Water log",
  "description": "Log drinks and see how much water you had in a day.",
  "parts": [
    {
      "kind": "app",
      "id": "drinks",
      "fields": [
        { "id": "date", "label": "Date", "type": "date", "required": true },
        { "id": "drink", "label": "Drink", "type": "text", "required": false },
        { "id": "ml", "label": "Amount (ml)", "type": "number", "required": true }
      ],
      "summaryField": "ml"
    }
  ]
}

Check it locally. validate applies the server's limits without contacting it:

shell
superbot-plugin validate

Prefer a form? Create plugin → Add app in the store builds the same part. On desktop, Open file… loads this plugin.json into the form.

Step 4: Publish and review

shell
superbot-plugin publish water-log 1
superbot-plugin list submissions
superbot-plugin review VERSION_ID approved

publish prints the new version as JSON with status pending. Copy its id into VERSION_ID. Your first submission reserves the slug water-log on this server. On a shared server, a deployment admin reviews instead of you.

Step 5: Install and grant

shell
superbot-plugin install VERSION_ID
superbot-plugin agents
superbot-plugin set-grants INSTALLATION_ID BOT_ID drinks

Copy the installation's id and one bot's id from the output. If agents lists no bots, create one in the app first. Installing adds nothing to any bot; set-grants gives this one bot the drinks part. You can do both in the store instead: Discover → Water log → Install, then turn on the part for a bot under Installed.

Step 6: Try it

  1. As a person. Open http://127.0.0.1:5173, then choose Store → Plugins → Installed → Water log. You can open the same app from the desktop Store and add two entries for today. The total shows their sum.
  2. As a bot. In a direct chat with the bot you granted, ask how much water you had today. It reads the entries without asking. Ask it to log a 250 ml glass, check the values on the approval card and choose Allow once.
  3. With a local model. If that bot answers through a model CLI on your computer, use Apps in the desktop composer or /apps in superbot BOT_NAME. See local models.

Stop the server with node infra/superbot/host.mjs down. It keeps its data volumes for next time.

Next steps