Files
home-manager/tests/modules/programs/opencode/tools-bulk-directory.nix
Thierry Delafontaine b1b1c68033 opencode: add custom tools support
Adds support for custom tools - user-defined functions that the LLM can
call during conversations. Custom tools work alongside opencode's built-in
tools and are configured through the new `tools` option.

The configuration follows the same pattern as other opencode settings like
`agents` and `commands`, supporting:
- Inline TypeScript content
- Individual file paths
- Bulk directory imports
2026-01-08 16:32:29 -05:00

16 lines
465 B
Nix

{
programs.opencode = {
enable = true;
tools = ./tools-bulk;
};
nmt.script = ''
assertFileExists home-files/.config/opencode/tool/database-query.ts
assertFileExists home-files/.config/opencode/tool/api-client.ts
assertFileContent home-files/.config/opencode/tool/database-query.ts \
${./tools-bulk/database-query.ts}
assertFileContent home-files/.config/opencode/tool/api-client.ts \
${./tools-bulk/api-client.ts}
'';
}