Tools
The built-in tools and how to turn them on or off.
Built-In Tools
| Tool | What it does | Default |
|---|---|---|
read | Read a text file or image | On |
write | Create or overwrite a file | On |
edit | Replace exact text in a file | On |
bash | Run a shell command | On |
grep | Search file contents | Off |
find | Find files by glob | Off |
ls | List a directory | Off |
Relative paths resolve against the session’s working directory.
Limits
readreturns up to 2,000 lines or 50 KB, and can read a range of lines. Images (JPEG, PNG, GIF, WebP, BMP) go to the model as attachments.writecreates parent folders as needed.edittakes a list of replacements. Each original piece must appear exactly once and not overlap another.bashreturns stdout and stderr together, cut to the last 2,000 lines or 50 KB. The full output is saved to a file in the sandbox. A non-zero exit is an error. The model can set a timeout in seconds.grepuses ripgrep and returns 100 matches by default.finduses fd and returns 1,000 results by default.lsincludes dotfiles and returns 500 entries by default.
grep and find skip files in .gitignore and include hidden files. If ripgrep or fd is missing, CodeWork downloads it to ~/.codework/bin on first use, inside the sandbox for remote sessions. In a virtual sandbox, find isn’t available.
Turn Tools On or Off
Each built-in tool is a plugin with the ID codework.tool.<name>. The search tools are off, so CodeWork searches with bash instead. Turn them on in your settings:
{
"plugins": [
{ "plugin": "codework.tool.grep", "enabled": true },
{ "plugin": "codework.tool.find", "enabled": true },
{ "plugin": "codework.tool.ls", "enabled": true },
],
}Set enabled to false to turn a tool off:
{
"plugins": [{ "plugin": "codework.tool.write", "enabled": false }],
}Use ~/.codework/settings.jsonc for every project, or .codework/settings.jsonc for one. Changes apply from your next message.
More Tools From Plugins
Plugins can add tools, change how a built-in tool is described, or check calls before and after they run.