Buff Development
Buff Code

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

CommandWhat it does
buffopen Buff Code in the current folder
buff <folder>open Buff Code in another folder
buff -ccontinue 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 modelsshow the organisation’s models
buff upgrade [version]update Buff Code (buff update does the same)
buff uninstallremove the console
buff session listthe local sessions of this folder
buff session export [id]export a local session to JSON
buff statsusage statistics on this machine
buff --versionthe 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"
FlagWhat it does
-c, --continuecontinue the last session
-s, --session <id>continue a specific session
--forkfork the session before continuing
-m, --modelthe model as buff/<name> — only from the organisation’s models
-f, --fileattach a file to the message (up to 100 times)
--format jsonoutput as JSON events: text, tool calls, results
--titlethe session title
--thinkingshow the model’s reasoning

Things about buff run worth knowing:

  • it needs a terminal: if there is no sign-in and context yet, buff run asks for them on the spot, and without a terminal it refuses — do the first sign-in through buff;
  • confirmation forms are cancelled: buff run works 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 run session 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

CommandWhat it does
/orgswitch the organisation
/projectswitch the project or choose “No project — organization only”
/spacechoose the organisation’s knowledge spaces

In detail — Sign-in and working context.

Working in a session

CommandWhat it does
/modepermission 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
/todosthe agent’s to-do list
/queriesjump 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, /redoundo a turn with a preview, or bring back what was undone — see Changes and undo
/compactcompress a long conversation: the recent part stays verbatim, the earlier part becomes a summary for the model
/diffview the changes
/commit, /pushcommit the checked files with confirmation, push the branch
/models, /variantsthe organisation’s model and the reasoning level
/new, /sessionsa new session, another session (in the list: ctrl+f — pin, alt+a — archive, ctrl+y — the archive)

Automations, workflows, usage

CommandWhat it does
/automations, /automation-newscheduled automations: the list and a new one — see Automations
/workflowssaved workflows and runs — see Workflows
/balancethe organisation’s balance, runway, plan, the session estimate and your usage by day

Extensions

CommandWhat it does
/mcps, /mcp-add, /mcp-edit, /mcp-removeMCP servers: buff, knowledge, repos from the organisation, and your own
/skills, /skill-attach, /skill-detachskills and skill directories
/command-add, /command-edit, /command-remove, /command-toggleyour own commands
/agent-add, /agent-edit, /agent-remove, /agent-togglesubagents
/hook-add, /hook-remove, /hook-togglehooks
/memorythe AGENTS.md memory: a note, turn it on or off
/trustwhat from the project awaits a check — hooks and commands

In detail — Extensions.

Everything else

CommandWhat it does
/connectsign-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, /themessettings and theme
/phoneconnect a phone with a QR code or with a link and a code, rename or disconnect connected ones
/updateupdate Buff Code
/helpall commands and shortcuts

The palette with all commands — ctrl+p; switching the agent (Build ↔ Plan) — shift+tab.

Environment variables

VariableWhat it does
BUFF_CONNECTOR_URLthe connector gateway address; the sign-in form will not ask for it
NODE_EXTRA_CA_CERTSthe path to your certificate authority’s certificate if it is not in the system store

On this page