Skip to content

[FEATURE]: specify --tools on command-line for enabling/disabling tools #9386

Closed

Description

@paralin

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

When running with opencode run I want to be able to specify --tools '-*,read,write,webfetch' to define which tools the model can use. The proposed syntax is -* (disable all), or enable by listing them, or * to enable all. See #5339

Activity

  1. added
    discussionUsed for feature requests, proposals, ideas, etc. Open discussion
    on Jan 19, 2026
  2. paralin commented on Jan 19, 2026

    @paralin
    ContributorAuthor

    #5339

    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'
    
  3. github-actions commented on Jan 19, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Feel free to ignore if none of these address your specific case.

  4. smola commented on Jan 24, 2026

    @smola

    This would be very useful, but to be fully functional, it should probably support bash patterns. Something like --tools '-*,bash/ls*,bash/cat*'.

  5. added a commit that references this issue on Jan 31, 2026
    fe5d884
  6. github-actions commented on Mar 27, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

discussionUsed for feature requests, proposals, ideas, etc. Open discussion

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions