Botxona

botxona.yaml — full schema

botxona.yaml is an optional file at the root of the archive (botxona.yml is accepted too). It lets you state explicitly what the system can't detect on its own. The bot works without it — the system will try to detect things automatically.

Fields

runtime: python       # python | node — set explicitly if the language isn't detected automatically
entry: main.py        # file to run (used together with runtime)
start: python -u main.py --prod  # full command — instead of entry, with extra arguments
always_on: true       # true — bot is always on, false — sleeps when idle
FieldTypeDescription
runtimepython \node \goUseful when the language can't be detected automatically (e.g. files for both languages are present)
entrystringPath to the file to run, e.g. src/main.py (for Go — the package path, e.g. ./cmd/bot)
startstringFull start command — when you need arguments or a custom script
always_ontrue/falseKeep the bot always on or, conversely, let it sleep even if it has a scheduler

Precedence

  1. If start is set — that exact command is used and entry is ignored.
  2. Otherwise, if entry is set — that file is run with the standard command for the runtime (python -u <entry>, node <entry>, or for Go the <entry> package is built into a binary).
  3. If neither is set — the system detects the entry point automatically via main.py/bot.py/app.py (Python) or the "start" script / main field in package.json (Node.js), or for Go the main package in the root (main.go) / a single cmd/<name>/ folder. A Go project is detected by a go.mod in the root (or runtime: go / golang).

If always_on is set, it determines the initial value of the "Auto" mode under Settings → Run mode on the bot page — the user can later change it manually in the dashboard (Sleep and wake-up).

Examples

A simple Python bot with a non-standard file name:

runtime: python
entry: src/bot.py

Go with a cmd/bot package:

runtime: go
entry: ./cmd/bot

Node.js with a custom start command:

start: node --experimental-modules src/index.mjs

A bot that must always be on (e.g. it sends payment reminders):

always_on: true

Next step

Full details on entry points and libraries: 6 rules. On environment variables: Environment variables.