API Reference
The CLI
Every torta command, every flag, and what each one exits with.
The package on npm is torta-ai, which installs the torta command. Run
torta on its own for a one-line hint.
torta start
torta start [<dir>] [--port <n>] [--no-open] [--no-engine] [--runner <mode>]
With no workspace in the directory it serves the setup wizard, then opens the board of the workspace it creates. Pointed at a workspace, it opens that board.
| Flag | Default | Meaning |
|---|---|---|
--port <n> |
5599 | the port to serve on, a whole number from 0 to 65535 |
--no-open |
off | do not open a browser |
--no-engine |
off | board only, no dispatching |
--runner <mode> |
auto |
stub, sdk, pty or auto |
<dir> is resolved against the current directory and has to exist. A
workspace is looked for there and one level below. A named directory is also
the parent the wizard offers; with nothing named, it offers
~/Documents/projects.
Ctrl-C stops the board, the engine and every pane. A second Ctrl-C exits
at once with code 130. It serves 127.0.0.1 only.
Refusals: an unknown flag, a bad port, an unknown runner name, or a directory
that does not exist. A port already in use says so and suggests --port <n>.
torta init
torta init
torta init <name> [--ios] [--android] [--web] [--desktop] [--landing] [--backend]
[--preset solo|full-team] [--role <what you are>]
[--owner <gh-owner>] [--dir <parent>] [--dry-run] [--yes]
With no name and no platform flags, it asks the wizard’s questions in the terminal and publishes the first thing you want built as a real ticket. With a name, it creates the workspace and stamps the workflow into it without asking.
| Flag | Meaning |
|---|---|
--ios, --android, --web, --desktop, --landing, --backend |
the platforms to build, opt-in |
--preset solo|full-team |
the roster: three agents, or all eight |
--role <what you are> |
what you are on this project |
--owner <gh-owner> |
the GitHub owner for the repos |
--dir <parent> |
the parent directory the name joins onto, default the current directory |
--dry-run |
work out the workspace without writing it |
--yes, -y |
take the default for every question that has one |
An unknown --flag that is not a platform is refused by name. Turning a
platform off removes its repo, its agent’s home, its wall and its queue.
torta watch
torta watch [<dir>] [--cap <n>] [--runner stub|sdk|pty|auto] [--busy <agent>] [--once]
The engine, standalone. torta start runs it for you; reach for it on a
server with no board, or for --runner stub and --runner sdk in CI.
| Flag | Default | Meaning |
|---|---|---|
--cap <n> |
3 | how many sessions may run at once, at least 1 |
--runner <mode> |
stub |
stub, sdk, pty or auto |
--busy <agent> |
none | an agent you are driving by hand. Repeatable |
--once |
off | run one pass, then stop |
--busy must name an agent in this workspace’s roster, and the refusal lists
the roster. If an engine is already running here, it refuses and names the
command that holds it.
Ctrl-C stops watching. Sessions already running are left to finish.
torta board
torta board [<dir>] [--port <n>]
The board without the engine: every queue, the statuses, the access map, the accounts this project still needs, the decisions waiting on you, and a pane per agent. Approving here starts nothing until an engine is running.
torta pending
torta pending [<dir>]
For each open decision it prints the ticket, the file, the question, the agent, the status, when it was asked, and the reason if there is one. When nothing is waiting it says so and exits 0.
torta approve and torta reject
torta approve [<dir>] <ticket> [--reason <why>]
torta reject [<dir>] <ticket> [--reason <why>] [--interrupt]
Make the transition the session stopped to ask about, or send it back for
changes. --interrupt on reject stops the running session instead of
sending the ticket back. Without a ticket, it prints the usage line and
exits 1.
torta sync
torta sync [<dir>]
Regenerate the walls and the briefs after editing torta.json. It carries the
generators across into the workspace first.
torta doctor
torta doctor [<dir>]
Check the config, and what each agent still needs to work.
torta verify
torta verify [<dir>]
Assert that the generated walls match the committed lock.
torta status
torta status
What this machine has: the torta version, the Node version, the python it found, the platform and architecture, the package root, and a file count for the engine, the profiles and the templates.
torta help and torta version
torta help, -h and --help print the manual. torta version, -v and
--version print the version. Both exit 0.
Exit codes
| Code | Meaning |
|---|---|
| 0 | it worked |
| 1 | the general refusal: a bad flag, a missing workspace, a refused decision |
| 2 | not a torta command, or a command that is not implemented yet |
| 130 | a second Ctrl-C while shutting down |
start, board, watch and the interactive init do not exit on their own.
Where a command may run
Every command except start, init and status takes an optional directory
and refuses if that directory has no torta.json, with the message
<dir> has no torta.json. With no directory, the current one is used.