Skip to content

Writing Recipes

Tobias Vorwachs edited this page Nov 23, 2026 · 2 revisions

Writing Recipes

A recipe is a small TOML file with an install script and the network destinations the software needs.

Boxquell ships no recipes itself. On first use it adds the official repositories (agents, languages, tools and operating systems). You can add any number of others.

boxquell repo ls
boxquell repo add https://example.com/someone/boxquell-extras
boxquell repo add <git URL or local path> --name extras
boxquell repo update            # all, or name one
boxquell repo rm extras
boxquell add mybox extras:some-tool

A recipe is named <repository>:<id>. The short form works when it is unambiguous. The official repositories win, so a third-party repository cannot take over a name like claude.

Warning

Recipes run their own scripts inside the sandbox and open the destinations they list. Add only repositories you trust.

Make a repository

A recipe repository is any git repository with *.toml files in a recipes directory (or at its top level). The file name is the recipe's id.

name = "Node.js"                       # shown in lists
category = "language"                  # agent, language, tool or ide
description = "Node.js with npm"
icon = "nodedotjs.svg"                 # optional; a file in the repository's icons/ directory
icon_color = "#5FA04E"                 # optional; the brand's colour behind the icon

versions = ["24", "22"]                # optional; first is the default, chosen as node@22
os = ["debian", "ubuntu"]              # optional; systems the script works on, debian when left out
requires = ["build-essential"]         # optional; installed first, may name a version: ["node>=22"]
install_allow = ["nodejs.org", "@packages"]   # open only while the install script runs
allow = ["registry.npmjs.org"]         # destinations the software needs afterwards
secrets = ["anthropic"]                # optional; host secrets this software can use
command = "node"                       # agents only: the command that starts it
ports = [3000]                         # optional; forwarded from the same port on 127.0.0.1

install = '''
# Runs in the sandbox as user `dev` with passwordless sudo, under `set -euo pipefail`.
# $BOXQUELL_VERSION holds the chosen version when the recipe has versions.
curl -fsSL "https://nodejs.org/dist/latest-v$BOXQUELL_VERSION.x/..." | ...
'''

[env]                                  # optional; variables for sessions in the sandbox
EXAMPLE = "1"
Key Meaning
name, category, description Shown in lists. Category is agent, language, tool or ide.
icon, icon_color Optional icon and its brand colour
versions First is the default; choose with node@22
os Systems the script works on; Debian when left out
requires Recipes installed first (same repository first, then the others). May name a version, see below.
install_allow Opened only while the install script runs. @packages means the system's package hosts.
allow Destinations the software needs afterwards
secrets Host secrets this software can use
command Agents only: the command that starts it
task Agents only: the command that works through one task, see Tasks
model_env Agents only: the variable that selects the model
uninstall Script that takes the software out again
[[config]] A setting shown as a field on the Config tab
[[credential]] A key shown as a field on the Config tab
ports Forwarded from the same port on 127.0.0.1 of the host
[env] Variables for sessions in the sandbox

Requirements, removal and updates

  • requires = ["node>=22"] asks for that version or a newer one, requires = ["node@22"] for exactly that one, requires = ["node"] for any. The install picks a version of the required recipe that fits, or stops and says why.
  • uninstall = '''...''' is a script that takes the software out again (boxquell remove <sandbox> <recipe>, or Remove on its card). Without one, removing a recipe only takes it off the list. Software that something else installed requires cannot be removed first.
  • When a recipe offers a newer version than the one installed, or the recipe file changed since the install, its card offers Update (boxquell add <sandbox> <recipe> --again).

Agents: tasks and model

command = "claude"
task = "claude -p {prompt} --dangerously-skip-permissions"
model_env = "ANTHROPIC_MODEL"
  • task names the command that works through one task without a terminal and then ends. {prompt} is replaced by the task's text, quoted for the shell. The agent must not wait for answers: nobody is there, and the sandbox is what limits it. See Tasks.
  • model_env names the variable that selects the model. The UI then offers a model field for it.

Settings

Software that is configured through environment variables can describe them. The sandbox's Config tab shows a field for each. See Config Tab and Credentials.

[[config]]
env = "NPM_CONFIG_REGISTRY"            # the variable
label = "Package registry"             # what the field is called
help = "Where npm downloads packages from."
placeholder = "https://registry.npmjs.org"
options = ["https://registry.npmjs.org"]   # optional: suggestions, or the values of a choice

[[config]]
env = "DISABLE_TELEMETRY"
label = "No usage statistics"
help = "Do not send usage statistics."
kind = "switch"                        # text (default), number, switch or choice
on = "1"                               # for a switch: the value that means on

A value the user sets is stored with the sandbox and exported in every session; an empty field removes the variable. Only describe variables the software documents. An agent's model_env shows up there too, as a field called Model.

Credentials

A recipe names the secrets it can use with secrets = ["gitlab"]. Describe each one, and the Config tab offers a field for its value:

[[credential]]
name = "gitlab"
label = "GitLab access token"
help = "A personal access token with the api scope."
url = "https://gitlab.com/-/user_settings/personal_access_tokens"
hosts = ["gitlab.com"]                 # where the real value may be sent
env = ["GITLAB_TOKEN"]                 # variables that hold the placeholder in the sandbox

The names anthropic, claude-oauth, openai, openrouter and github are built in; for them hosts and env can be left out. A credential works where the software sends the variable's value in a request header to those hosts.

Rules of thumb

  • List every host the install script contacts in install_allow. Anything else is blocked, and boxquell logs <sandbox> --blocked shows what was refused.
  • Keep allow as small as possible: these destinations are open for a sandbox for as long as the recipe is installed. Users see them before the install and can switch each one off under Network.
  • The guest is Debian. Install to system paths (/usr/local) so every session finds the software.
  • An icon is a small single-colour SVG (under 64 KB, no scripts or links); the UI paints it in the text colour. icon_color sets the brand's colour behind it. System definitions in os/ take the same icon line.
  • Never put credentials into a recipe. Name a secret instead; its value stays on the host.

Full reference: docs/recipes.md. Repositories also check their recipes in CI. Systems are defined the same way: see Writing OS Definitions.

Next: Writing OS Definitions | Software | Contributing

Clone this wiki locally