Get it for macOS

Edit a markdown file in the tab you were already reading it in, and save it with Cmd+S. Preview renders the file the way bb renders a chat message, including the images it points at, and Raw gives you the source in an editable pane, with unsaved text carrying between the two. Selecting text in Preview offers an Add to chat button that quotes it into the composer under the file's path. A pencil on markdown files in the changes panel opens the one you are reading a diff of. Every save checks the file's hash first, so an edit an agent made while you were typing gives you a choice between reloading and overwriting instead of a silent clobber. Works on files in a project workspace, on a host, or in a thread's storage. Requires bb 0.43 or later, and needs no account or external service.


Overview

View source

What you get

A markdown file opens the way it always did, rendered and readable. A Raw segment in the tab header switches the same file to its source in an editable textarea, and Preview switches back. The buffer is shared, so text you have typed and not yet saved shows up rendered in Preview before it reaches disk.

Images the file points at render in Preview. A reference like screenshots/a.png resolves against the file's own directory and is served from the host the file lives on, so a README shows its own screenshots.

The header carries the file path, the Preview/Raw pair, a reload button, a Save button, and one word of state: Unsaved changes, Saving, or Saved.

Selecting text in Preview offers an Add to chat button under the selection. It appends what you selected to the thread's composer draft as a blockquote whose first line is the file's path, so a paragraph lifted out of a document arrives with a note of where it came from. It writes to the same draft bb's own Add to chat affordances do.

Saving

Saving is explicit. Press Cmd+S or click Save; both do nothing while the file is unchanged, so there is no way to write by accident and no autosave writing half-finished sentences to a file an agent is watching.

Discard appears next to the save state while a file has unsaved changes and puts the buffer back to the text last read from disk. It arms on the first click and acts on the second, because the edits it throws away cannot be recovered.

When something else edits the same file

Every read records the file's hash, and every save tells the host which hash it expects to find. If the bytes on disk are no longer the bytes that were read — an agent edited the file while you were typing — the write is refused before it happens and a banner offers the two honest choices: reload and discard your edits, or overwrite and discard theirs. Until you pick, your text stays exactly as you typed it. Nothing is merged, and nothing is lost quietly.

Opening from a diff

A markdown file in a thread's changes panel gets a pencil in its card header, after bb's copy and open-in-editor icons, and it opens that file in this editor. Clicking the file's path in the same header already did this, so the pencil is there to say so.

Where it works

Registers for md, mdx, markdown, and txt. Files in a project workspace, in a thread's storage, and anywhere on a host you have connected all open the same way.

bb chooses one opener per extension under Settings, Files, and a tab's Open with menu overrides that choice for a single file. bb's read-only preview stays available in the same menu.

Limits

Reads UTF-8 text up to 2 MB. A binary file that happens to end in .md is refused rather than mangled. A preview image is read up to 4 MB, in the formats a browser shows inline.

Saves to a path whose parent directory is missing fail instead of creating it: this edits files, it does not make them.

A file viewed as of a git commit always uses bb's preview, because a snapshot of history has nothing to save to.

Closing a tab with unsaved changes cannot be intercepted, since a bb tab is not a browser navigation. Quitting or reloading bb does prompt.

Requirements

bb 0.42 or later. No account, no external service, no separate install, and no network access: the plugin reads and writes through bb's own file API on the host the file already lives on.

More from Daniel Bachhuber

More in File Viewers & Editors 12

Browse, open, preview, or edit files and document vaults.

View all
File ManagerManage the files on the machine bb runs on without a terminal: browse, upload, move, rename, extract and hand them to the agent. Opens as a sidebar page, as a tab beside a thread that can start in that thread's folder, and from a file link in a message. Double-click shows images, PDF, video, Markdown and code; Space looks inside zip, tar, 7z and rar archives without extracting them. Multi-gigabyte uploads resume after a dropped connection. On a phone, selected rows get an Actions bar with the whole row menu. Access stays inside the home folder of the user bb runs as; tar, 7z and rar archives need tar and 7z on that machine.Foma353
FilesA VS Code-style file explorer and editor for the workspace behind a thread. Search in files finds a word across every file in the project: results are grouped by file with each hit highlighted, and clicking one opens the file on that line. It is smart case, with match-case, whole-word and regex toggles, and built for typing — file contents stay in memory between searches, so refining a query re-runs in tens of milliseconds, and a regex runs in its own worker so a runaway pattern cannot freeze BB. Around it: a file tree that shows dotfiles, editor tabs, a go-to-file palette (Cmd+P), find in the open file (Cmd+F), syntax highlighting in your BB code theme, and edit and save guarded so a change an agent made underneath you is never clobbered. Two pickers choose the project and then its checkout or one of its worktrees; beside a thread it is pinned to that thread's worktree. Adds a `bb files` command so agents can browse and read the same workspace from the CLI, on whichever machine it lives.AbdElrahman Telb242
File TreeFind the file an agent mentions and keep the workspace tree beside the conversation. Search by name or path, open previews, add relative paths to drafts, create a blank markdown file, delete a file after confirmation, and reveal or copy files from the machine that owns them. Files show Seti-style type icons for markdown, JSON, gitignore, env, and other common names. Project threads stay rooted in their checkout; personal threads can browse a configured folder. Requires local file access on the BB machine; Finder reveal is macOS-only.Yuriy Egorov43