Better FS Tools

Better FS Tools

The best read, write, edit, patch, and bash tools your agent can have.

Better FS Tools puts the best features of the filesystem tools in every harness and framework into one package.

Features

  • Use it anywhere. Framework adapters for AI SDK 7, the Pi coding agent, Pi agent core, and Pi durable. For any other host, createFsTools() gives you the tools to wrap.
  • Any filesystem. Local files on Node or Bun, files in memory, a just-bash sandbox, or a Cloudflare Shell or Computer workspace. See Filesystems.
  • Fully configurable. Change the tool names, the parameter names, and the descriptions with a signature. Formatters, messages, limits, and hooks change the text that the model sees.
  • Bounded reads. The read tool stops at line, byte, and line-length limits, and at an optional token budget. It also reads images, notebooks, PDFs, and folders.
  • Read before write. edit and write can refuse a change to a file that the model has not read, or that changed after the read. See Read before write.
  • Edits that find the text. When the old text does not match exactly, edit tries a normalized match and tells the model. See Matching.
  • Safe patches. apply_patch checks the whole patch before it changes a file. See Patches.
  • Permissions. Refuse paths, protect AGENTS.md, CLAUDE.md, and .git, or ask the user before a change. See Permissions.
  • A bash tool with limits. Set timeouts and output caps, save the full output to a file, and refuse or rewrite commands. See Bash tool.

How it compares

We read the file tools of 19 agent harnesses and frameworks, for example Claude Code, Codex, Gemini CLI, OpenCode, and Pi. Each comparison page shows the file and shell tools of one harness.

On this page