/tools

Tools.

Nilux comes with a set of built-in tools that let it interact with your project. These are what turn it from a chatbot into a coding assistant — it can read files, make edits, run commands, and search across your codebase.

How tools work

When you ask Nilux to do something, the agent decides which tools to use and in what order. Each tool call is requested by the agent, executed locally on your machine via the CLI, and returned as a result for the next decision. The agent loops through this cycle until the task is complete.

Available tools

File operations

  • Read — read file contents, including images and PDFs
  • Write — create new files or overwrite existing ones
  • Edit — precise find-and-replace within files. Supports replacing all occurrences
  • Glob — find files by name pattern (e.g. **/*.test.ts)
  • Grep — search file contents with regex across the codebase

Execution

  • Bash — run shell commands with configurable timeout

External

  • Web Search — search the web for up-to-date information
  • Web Fetch — fetch and process content from URLs

Safety and approvals

By default, destructive operations require your approval before executing:

  • Bash commands — you see the command before it runs
  • File writes and edits — you see a diff preview before changes are applied
  • Read-only tools (Read, Glob, Grep) — run without approval

You can save allow-rules for trusted operations — see Permission rules in the Configuration docs.

Example flow

A typical interaction involves multiple tools chained together:

bash
rename getCwd to getCurrentWorkingDirectory everywhere
> grep · found 8 occurrences in 4 files
> edit · src/lib/utils.ts (replace_all)
> edit · src/lib/agent.ts (replace_all)
> edit · src/cli/index.ts (replace_all)
> edit · src/tests/utils.test.ts (replace_all)
> bash · npx tsc --noEmit
✓ renamed in 4 files · TypeScript check passed
TIP

Be specific about what to change and where. This helps the agent choose the right tools and reduces unnecessary file reads.

MCP tools

Beyond built-in tools, you can connect external services via MCP. MCP tools appear alongside built-in tools — the agent uses them the same way. See the MCP docs for setup.