Commands
Reference for the buff console and the commands inside Buff Code: context, modes, goal, side conversation, undo, Git, automations, workflows, extensions.
Here are the buff console commands and the commands inside Buff Code that you need to work with
the organisation: sign-in, context, models, connections. /help shows the full list of the other
interface commands.
Console
| Command | What it does |
|---|---|
buff | open Buff Code in the current folder |
buff <folder> | open Buff Code in another folder |
buff -c | continue the last session in this folder |
buff -s <id> | continue a specific session |
buff run "<message>" | run one task without the interface and print the answer |
buff models | show the organisation’s models |
buff upgrade [version] | update Buff Code (buff update does the same) |
buff uninstall | remove the console |
buff session list | the local sessions of this folder |
buff session export [id] | export a local session to JSON |
buff stats | usage statistics on this machine |
buff --version | the version |
buff run
A task in one command — for scripts, checks and questions on the go:
buff run "Find where the discount is calculated and explain the formula"
buff run -c "Now show the tests for it" # continue the last session
buff run --format json "..." # the answer and tool calls as JSON
buff run -f docs/spec.md "Check the code against this document"| Flag | What it does |
|---|---|
-c, --continue | continue the last session |
-s, --session <id> | continue a specific session |
--fork | fork the session before continuing |
-m, --model | the model as buff/<name> — only from the organisation’s models |
-f, --file | attach a file to the message (up to 100 times) |
--format json | output as JSON events: text, tool calls, results |
--title | the session title |
--thinking | show the model’s reasoning |
Things about buff run worth knowing:
- it needs a terminal: if there is no sign-in and context yet,
buff runasks for them on the spot, and without a terminal it refuses — do the first sign-in throughbuff; - confirmation forms are cancelled:
buff runworks without asking a person anything, so the model’s proposal to write to the knowledge base is not carried out in this mode — writing is possible only in the interface; - a
buff runsession is recorded in the workspace just like any other.
Commands inside Buff Code
Typed with / in the input line; also available in the command palette.
Ours
| Command | What it does |
|---|---|
/org | switch the organisation |
/project | switch the project or choose “No project — organization only” |
/space | choose the organisation’s knowledge spaces |
In detail — Sign-in and working context.
Working in a session
| Command | What it does |
|---|---|
/mode | permission mode: “Ask”, “Edit on its own”, “Full access” — see Modes |
/goal <what must be true> | goal: the agent takes turns until a check confirms the result — see Goal |
/side [question] | side conversation: a question along the way, the main session does not change — see Side conversation |
/todos | the agent’s to-do list |
/queries | jump to one of your requests in a long session |
/btw <question> | a one-off answer from the session’s context; it does not go into the conversation |
/undo, /redo | undo a turn with a preview, or bring back what was undone — see Changes and undo |
/compact | compress a long conversation: the recent part stays verbatim, the earlier part becomes a summary for the model |
/diff | view the changes |
/commit, /push | commit the checked files with confirmation, push the branch |
/models, /variants | the organisation’s model and the reasoning level |
/new, /sessions | a new session, another session (in the list: ctrl+f — pin, alt+a — archive, ctrl+y — the archive) |
Automations, workflows, usage
| Command | What it does |
|---|---|
/automations, /automation-new | scheduled automations: the list and a new one — see Automations |
/workflows | saved workflows and runs — see Workflows |
/balance | the organisation’s balance, runway, plan, the session estimate and your usage by day |
Extensions
| Command | What it does |
|---|---|
/mcps, /mcp-add, /mcp-edit, /mcp-remove | MCP servers: buff, knowledge, repos from the organisation, and your own |
/skills, /skill-attach, /skill-detach | skills and skill directories |
/command-add, /command-edit, /command-remove, /command-toggle | your own commands |
/agent-add, /agent-edit, /agent-remove, /agent-toggle | subagents |
/hook-add, /hook-remove, /hook-toggle | hooks |
/memory | the AGENTS.md memory: a note, turn it on or off |
/trust | what from the project awaits a check — hooks and commands |
In detail — Extensions.
Everything else
| Command | What it does |
|---|---|
/connect | sign-in to Buff and your own providers: the line “Buff · your login · organisation”, or sign-in if there is none yet; below — the catalogue providers |
/settings, /themes | settings and theme |
/phone | connect a phone with a QR code or with a link and a code, rename or disconnect connected ones |
/update | update Buff Code |
/help | all commands and shortcuts |
The palette with all commands — ctrl+p; switching the agent (Build ↔ Plan) — shift+tab.
Environment variables
| Variable | What it does |
|---|---|
BUFF_CONNECTOR_URL | the connector gateway address; the sign-in form will not ask for it |
NODE_EXTRA_CA_CERTS | the path to your certificate authority’s certificate if it is not in the system store |
Sign-in and working context
Buff Code’s first launch: the connector address and the sign-in code confirmed in the workspace; organisation, project, spaces; per-folder memory; devices.
Working in Buff Code
Everyday work in Buff Code: a session with the agent, changes and undo, plan and goal, side conversation, Git, automations, workflows, extensions.