ButtonFuStop hunting through menus. Put your most-used actions one click away. ButtonFu adds a fully customisable button panel to the VS Code sidebar. Run terminal commands, trigger palette actions, execute tasks, or fire off a Copilot prompt - all without leaving your flow.
InstallOpen VS Code, press DevelopmentOpen the repository root in VS Code and press F5. The checked-in launch configuration in For a live end-to-end check against a real Extension Development Host, run The repository-root Installer builds also read their version and repository URL from What can a button do?
Global & Workspace buttonsButtons come in two scopes. Global buttons are stored in your VS Code user settings and appear in every workspace - perfect for commands you use everywhere, like reloading the window or opening a terminal profile. Workspace buttons live in workspace state and are scoped to the current project - handy for project-specific build scripts, deployment commands, or Copilot prompts tailored to your codebase. Both scopes show up together in the sidebar panel, clearly labelled, so you always know what you're clicking. Repo-committed buttons (
|
| Token | Resolves to |
|---|---|
$WorkspacePath$ |
Root path of the workspace |
$ActiveFileName$ |
File name of the active editor |
$SelectedText$ |
Currently selected text |
$GitBranch$ |
Current git branch |
$Clipboard$ |
Current clipboard contents |
$DateTime$ |
ISO 8601 timestamp |
$RandomUUID$ |
A freshly generated UUID |
…and more: active file extension, directory, relative path, line/column number, current line text, platform, hostname, username, home/temp directories, path separator, EOL, and button name/type.
User tokens let you define your own per-button inputs with a name, data type (String, Multi-Line String, Integer, or Boolean), label, description, optional default, and a Required flag. When you click a button that has unresolved user tokens, a questionnaire panel appears to collect their values before execution - with a live preview showing every token fully resolved.
Tokens can be dragged directly from the token table into the command field, inserting them at the cursor.
Copilot integration
Copilot Command buttons let you build reusable AI workflows. Choose your model (with autocomplete across all your available models), set the mode (Agent, Ask, Edit, or Plan), and attach files that should always be part of the conversation - including a toggle to automatically attach whichever file you currently have open.
Tokens work in Copilot prompts too, letting you build dynamic prompts built around the active file, selected text, or any user-provided input.
When you click the button, ButtonFu opens a fresh chat session, sets the mode and model, attaches any files, and submits your prompt - all in one click.
Claude integration
Claude Command buttons start a Claude Code session with your prompt already sent, so one click gets you a working session rather than an empty prompt box. Pick where it runs, and the rest of the button works exactly like the others: tokens are resolved, categories group it, and warnBeforeExecution still asks first if you turn it on.
Where it can run
| Destination | What happens |
|---|---|
| Terminal in this window | Opens a terminal here and runs the prompt in it |
| Terminal in its own window | Opens a terminal and tears it off into a separate window, running the prompt |
| External terminal | Runs the prompt in a terminal outside VS Code, which survives reloading the window |
| New VS Code window | Opens another folder in a new VS Code window and runs the prompt there, with no second click |
| Background agent | Starts the session in the background and returns straight away. Find it again with ButtonFu: Show Claude Background Agents |
| Headless, then open the panel | Runs the prompt with no interface, then opens the finished conversation in the Claude panel |
| Claude panel | Opens the Claude panel with the prompt typed into the box, ready for you to send. Where a new button starts |
A new Claude button starts on the Claude panel, which types your prompt into the box and waits for you to press Enter. That is deliberate: the first click on a button you have just written shows you the prompt rather than setting an unattended session off against your files. When you are happy with it, switch the destination to one of the other six and the button runs it on one click.
The panel is also the one destination that cannot take a model, an effort level or a permission mode: those are chosen inside the panel itself, so the editor hides them when it is selected. There is no way for one extension to submit a prompt inside another extension's panel, or to set its model from outside, which is why Headless, then open the panel exists: it runs the prompt through the CLI with everything you set, then opens the finished conversation in the panel for you to carry on in.
A terminal ButtonFu opens is a real VS Code session: /ide reports connected, diffs open in the editor, and Claude can see your selection. The same is true of an external terminal. A background agent is deliberately not connected, because it is meant to outlive the window that started it.
Permissions
A new Claude button runs unattended by default: it never stops to ask before editing a file or running a command. That is what makes a one-click button useful, and it is also worth knowing before you point one at something important. Change the mode per button in the editor, or change what new buttons start with using buttonfu.claude.defaultPermissionMode.
Extra arguments
The Extra Arguments box is one argument per line, and a value goes on its own line. Nothing there is split on spaces or read by a shell, so this is two lines:
--append-system-prompt
Answer in British English.
Settings
| Setting | What it does |
|---|---|
buttonfu.claude.executablePath |
Full path to the Claude CLI. Empty uses claude from PATH, falling back to the binary bundled with the Claude Code extension |
buttonfu.claude.defaultPermissionMode |
What a newly created Claude button starts with. Existing buttons keep whatever they were saved with |
buttonfu.claude.externalTerminalCommand |
The command that opens an external terminal, as an array of arguments. Empty uses Windows Terminal, macOS Terminal, or x-terminal-emulator |
buttonfu.claude.handoffTimeoutSeconds |
How long a queued new-window launch waits for its window before it is discarded |
buttonfu.claude.allowBridgeRun |
Lets the Agent Bridge run Claude buttons. Off by default, and only ever Claude buttons |
Organise with categories
Group related buttons under a category label. Categories appear as section headers in both the editor list and the sidebar panel, so your workspace stays tidy even as your button collection grows. Buttons can be reordered within their group using the up/down arrows in the editor.
Development
The extension package lives in buttonfu-extension.
npm testruns the full local verification path: compile, lint, a test-only TypeScript emit, and Node-based integration tests for activation, flat-note storage, sidebar split-button actions, preview flows, and token resolutionnpm run vsce-packagebuilds a VSIX from the extension package
Agent Bridge
ButtonFu includes an optional Agent Bridge - a named-pipe JSON-RPC 2.0 server that lets external agents (including AI coding agents) create, read, update, and delete buttons and notes programmatically. Enable it via Settings → ButtonFu → Enable Agent Bridge.
Agents discover the bridge by reading ~/.buttonfu/bridge-{pid}.json, which includes the pipe name, authentication token, describeMethod, version metadata, and bridge limits. Call buttonfu.api.describe through the bridge to get the full self-describing API schema - all methods, parameter types, validation rules, examples, and error codes - without reading source files.
⚠️ Automation rule - bridge-first, always.
All button and note mutations MUST go through the ButtonFu Agent Bridge or the registered
buttonfu.api.*VS Code commands. Do not mutate ButtonFu data by editing VS Code storage directly - includingstate.vscdb, workspace state, thenullcity.buttonfumemento, or thebuttonfu.globalButtons/buttonfu.globalNotessettings keys. Direct writes bypass validation, provenance tracking, UI refresh, and may corrupt or lose data. The internal storage format is not a stable API and may change without notice.
Helper scripts
The repo includes helper scripts in buttonfu-extension/scripts/ that handle bridge discovery, authentication, and named-pipe communication automatically:
PowerShell:
# List all buttons
.\buttonfu-extension\scripts\buttonfu-bridge.ps1 -Method listButtons
# Create a button
.\buttonfu-extension\scripts\buttonfu-bridge.ps1 -Method createButton `
-Params '{"name":"Run Tests","locality":"Global","type":"TerminalCommand","executionText":"npm test"}'
# Describe the full API schema
.\buttonfu-extension\scripts\buttonfu-bridge.ps1 -Method describe
Node.js:
# List all buttons
node buttonfu-extension/scripts/buttonfu-bridge.js listButtons
# Create a button
node buttonfu-extension/scripts/buttonfu-bridge.js createButton '{"name":"Run Tests","locality":"Global","type":"TerminalCommand","executionText":"npm test"}'
In-product help
Use these Command Palette commands for bridge-first automation workflows:
- ButtonFu: Agent Bridge Status
- ButtonFu: Agent Bridge Doctor
- ButtonFu: Copy Agent Bridge Quick Start
- ButtonFu: Copy Agent Bridge Instructions
These commands are intentionally oriented toward agents and automation diagnostics. They copy bridge metadata and ready-to-run examples for the current VS Code window.
The repository root copilot-instructions.md contains the full protocol reference for contributors working inside this codebase.


