feat: add --tools flag to limit available tools by paralin · Pull Request #5339 · anomalyco/opencode
Add --tools flag to serve, web, and TUI commands to enable selective tool access control. The flag accepts comma-separated patterns to enable/disable tools. Usage examples: # Only allow read, write, and webfetch tools opencode serve --tools='-*,read,write,webfetch' # Disable specific tools opencode web --tools='-bash,-edit' # Use in TUI mode opencode --tools='-*,read,write,webfetch' Changes: - Add --tools flag to serve, web, and TUI thread commands - Implement Wildcard.parseToolsPattern() to parse tool enable/disable patterns - Update Server.listen() to accept tools option - Pass default tools to SessionPrompt.prompt() in server - Add tests for parseToolsPattern() Fixes: anomalyco#9386 Signed-off-by: Christian Stewart <christian@aperture.us>