3
Commands
Jaroslav Beneš edited this page 2026-11-13 09:22:47 +00:00

Commands and menus

What each slash command of the TUI shows, and what it says where there is no screen for a menu (lembas run "/name", a prompt sent over the link, which the web UI shows as a reply).

One menu

Every picker is the one component, src/tui/components/dialog.tsx, so they look and answer to keys alike:

  • a title, and optionally a few lines about what the menu is for;
  • type to filter (shown when a list is long, or always where finding is the point);
  • rows under section headings, a mark for a row's state (● on, ○ off or asks, … busy, ⚠ needs attention, ✗ failed or denied — src/tui/notices.ts);
  • a line or three about the highlighted row under the list (a tool's whole description);
  • ↑↓ move, PgUp/PgDn a screen, Home/End, Enter chooses, Esc closes — or goes back in a menu opened from another, and the footer says which;
  • the footer names the keys, and where the cursor is in a list longer than the window (7/200);
  • an empty list says what to do about it; nothing is wider than the terminal (60 columns work).

A menu's rows never carry letter shortcuts when it filters: what can be done to a row is a row of the menu Enter opens.

Lines the program says

· something happened · ✓ done · ⚠ needs attention · ✗ failed (src/tui/notices.ts, used by the transcript and by lembas run). A warning sign always means there is something to look at. An MCP server that connects says nothing; the status bar counts them (MCP 2, MCP 1/2).

The commands

Command Shows Without a menu
/help menu: every command under a heading, found by typing; Enter runs it or puts it in the box; the keys —
/status menu: server and login, model, session, project and trust, MCP servers, the terminal (copying, pasting images); Enter opens what changes a row a list
/mcp [server] menu: servers by where they come from, with state; a server's actions, tools (searchable, with each one's permission rule, changeable), prompts, last error a list; /mcp <server> its tools
/permissions menu: the rules in force by where they were made; change, add, remove a list
/reports [id or title] menu: the reports your schedules filed, unread first; a report's own menu — read it here, reply, mark read, delete; ctrl+r and ctrl+d in the list lembas run "/reports": a list, or one report
/agents menu of the subagents; /agents <name> describes one, <name> <task> hands it a task, new <name> writes a starter a list
/model, /effort, /mode, /theme, /icons, /personality menu of the choices, the current one marked —
/settings [key [value [scope]]] menu of every setting with its value and where it is set; then the values; then the scope —
/sessions (/resume), /search <words>, /plans, /checkpoints, /branch, /skills, /memory, /jobs, /schedule menu of the things; Enter opens or uses one, a named key deletes or stops where the footer says so —
/team menu for the size; the tree and the room as text text
/login, /logout, /release, /commit a menu where there is a choice to make, else lines —
/context, /usage, /voice, /terminal, /kb, /tasks, /decisions, /pages, /diff a short report as text (a diff as a diff) —
/new, /delete, /rename, /copy, /undo, /redo, /compact, /continue, /plan, /review, /init, /changelog, /decide, /checkpoint, /skill, /speak, /remote, /trust, /reload, /quit do the thing and say so in a line /compact, /undo, /plan, /review, /init, /changelog, /continue work over the link

A custom command (.agent/commands, ~/.config/lembas/commands) or a skill named like one of these is not a command: the built-in wins. The skill is reached as /skill <name>, the custom command as /command <name> (it is said once at start that the name is taken).

Where there is no menu, only the command alone is the command — /status of the build? is a prompt — and /mcp <word> only when the word is a server's name.

A rule made in a menu

/permissions and /mcp set a rule through engine.setRule:

  • choosing what is already in force changes nothing;
  • a rule your own config, or a written deny, takes in whole is refused, with the rule in the way;
  • a rule that is made holds for the session and is saved to a trusted project's .agent/config.yaml; it is a project's rule in both places, so the session and the next start judge a call the same way;
  • a rule made after the written ones — a project's, an "always" answer, one from a menu — decides what a broader rule decided and never what a narrower, stricter one did (read: allow leaves read *.env: ask asking). The menu names the stricter rules that still apply.

What a server says

Everything an MCP server supplies goes through src/mcp/clean.ts before it is drawn or printed: no control characters; in /mcp's text no credentials or query of an address, a local server by its program's name, an error by its first line; escaped where the text is a markdown reply.