Skip to content

Tools

Tools available to TurboDev agents.

Agents have access to a set of tools for interacting with your codebase. Tool availability can be controlled per-agent via the tools configuration.

Reference

ToolDescription
bashExecute shell commands
edit_fileCreate or edit files
gitExecute Git operations
githubExecute GitHub operations
grepSearch file contents with regex
list_filesList directory contents
mkdirCreate directories
questionAsk the user a question
read_fileRead file contents
taskInvoke a subagent

read_file

Read the full content of a file.

Args: { path: string }

read_file({ "path": "src/index.ts" })

edit_file

Create or edit a file. If old_str is empty, creates the file with new_str. Otherwise, finds and replaces the first occurrence of old_str with new_str.

Args: { path: string, old_str: string, new_str: string }

edit_file({ "path": "src/app.ts", "old_str": "hello", "new_str": "world" })

list_files

List files and directories in a given path.

Args: { path?: string } (defaults to current directory)

list_files({ "path": "src" })

mkdir

Create a new directory, including parent directories.

Args: { path: string }

mkdir({ "path": "src/components/ui" })

grep

Search file contents using regular expressions.

Args: { pattern: string, include?: string, path?: string }

grep({ "pattern": "TODO", "include": "*.ts" })

bash

Execute a shell command and return output.

Args: { command: string, timeout?: number, workdir?: string }

bash({ "command": "npm test", "timeout": 60000 })

question

Ask the user a question and wait for their response.

Args: { question: string, options?: string[] }

question({ "question": "Which framework?", "options": ["react", "vue"] })

task

Invoke a subagent for a specialized task.

Args: { agent: string, prompt: string, description: string }

task({ "agent": "explore", "prompt": "find all API routes", "description": "Explore API routes" })

WARNING

The task tool is disabled for the plan agent by default.

git

Execute Git operations via simple-git. Supports 26 operations including status, log, diff, add, commit, push, pull, branch, stash, remote, and more.

Args: { operation: string, args?: any }

git({ "operation": "status" })
git({ "operation": "log", "args": { "maxCount": 10 } })
git({ "operation": "commit", "args": { "message": "fix: resolve bug" } })

Available operations: status, log, diff, add, commit, push, pull, branch, checkout, stash, remote, fetch, reset, revert, tag, merge, rebase, init, clone, addRemote, removeRemote, listRemotes, raw, diffSummary, show, clean.

DANGER

Git operations that modify the repository (commit, push, reset, revert, clean, etc.) require explicit permission from the user.

github

Execute GitHub operations via the gh CLI. Supports 15 operations including PR management, issues, releases, and authentication.

Args: { operation: string, args?: any }

github({ "operation": "createPr", "args": { "title": "Fix bug", "body": "Description" } })
github({ "operation": "listPrs" })
github({ "operation": "createIssue", "args": { "title": "Bug report", "body": "Steps to reproduce" } })

Available operations: authStatus, createPr, listPrs, viewPr, mergePr, closePr, createIssue, listIssues, closeIssue, createRelease, listReleases, repoView, repoClone, runList, runView.

Requires the GitHub CLI (gh) to be installed and authenticated. Run /gh auth to set up authentication.

Controlling Tool Access

Tools can be enabled or disabled per-agent in the Markdown configuration:

yaml
tools:
  edit_file: false
  bash: false
  task: false

When a tool is disabled (false), the agent receives an error if it tries to use it: Tool "edit_file" is denied for agent "plan".

Learn more about permissions