pub enum ToolFilter {
All,
Only(Vec<String>),
Skip(Vec<String>),
}Expand description
Which tools sqz init should configure.
By default sqz init writes hook configs for every supported tool (Claude Code, Cursor, Windsurf, Cline, Gemini CLI, OpenCode, Codex). Users who only use one agent have asked (issue #11, @shochdoerfer) for a way to say “just OpenCode, please, leave the rest alone.” This filter is the plumbing for that.
Matching is by canonical tool name. The canonicalize_tool_name
helper normalises user input (lowercase, hyphens/underscores/spaces
collapsed, known aliases) so Opencode, open-code, opencode,
OPENCODE all refer to the same tool.
Variants§
All
Install hook configs for every supported tool. The historical
default of sqz init.
Only(Vec<String>)
Install hook configs only for the named tools. Unknown names are surfaced to the caller as errors by the canonicalisation layer so we don’t silently ignore typos.
Skip(Vec<String>)
Install hook configs for every supported tool EXCEPT the named
tools. Useful when the user is fine with everything but wants
one integration skipped (e.g. a project shared with collaborators
who don’t want a .windsurfrules file in the repo).
Implementations§
Source§impl ToolFilter
impl ToolFilter
Sourcepub fn includes(&self, tool_name: &str) -> bool
pub fn includes(&self, tool_name: &str) -> bool
Return true if tool_name (as produced by generate_hook_configs)
should be installed under this filter.
tool_name is the display name sqz uses internally:
"Claude Code","Cursor","Windsurf","Cline","Gemini CLI","OpenCode","Codex".
The caller is expected to have already canonicalised the filter
entries via canonicalize_tool_name so the strings line up
case- and alias-wise.
Trait Implementations§
Source§impl Clone for ToolFilter
impl Clone for ToolFilter
Source§fn clone(&self) -> ToolFilter
fn clone(&self) -> ToolFilter
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ToolFilter
impl Debug for ToolFilter
Source§impl Default for ToolFilter
impl Default for ToolFilter
Source§impl PartialEq for ToolFilter
impl PartialEq for ToolFilter
Source§fn eq(&self, other: &ToolFilter) -> bool
fn eq(&self, other: &ToolFilter) -> bool
self and other values to be equal, and is used by ==.impl Eq for ToolFilter
impl StructuralPartialEq for ToolFilter
Auto Trait Implementations§
impl Freeze for ToolFilter
impl RefUnwindSafe for ToolFilter
impl Send for ToolFilter
impl Sync for ToolFilter
impl Unpin for ToolFilter
impl UnsafeUnpin for ToolFilter
impl UnwindSafe for ToolFilter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.