pub enum InstallScope {
Project,
Global,
}Expand description
Where hooks should be written.
The Claude Code scope table (docs.claude.com/en/docs/claude-code/settings)
defines four settings locations: managed, user, project, and local.
sqz init cares about the last three:
-
Project— writes.claude/settings.local.json(per-project, gitignored). This is what the baresqz inithas always done. Good for “I only want sqz active inside this repo”, but a common foot-gun because the user expects it to work everywhere and then sees “caching nothing” in every other project. Reported by 76vangel. -
Global— writes~/.claude/settings.json(user scope, applies to every Claude Code session on this machine regardless of cwd). This is what RTK’srtk init -gdoes and what most users actually want on first install. Verified against the official Anthropic scope table; verified against rtk-ai/rtk’sresolve_claude_dirhelper.
Precedence in Claude Code (highest to lowest): managed > local > project > user.
That means a project-level install can still override a global one —
and a user with .claude/settings.local.json in their worktree will
silently shadow the global setting. We do NOT auto-delete the local
file; the uninstall flow is responsible for whichever scope was asked for.
Variants§
Project
Project-local (gitignored): .claude/settings.local.json, .cursor/rules/,
etc. under project_dir.
Global
User-level: ~/.claude/settings.json and similar home-directory paths.
Applies to every project on this machine.
Trait Implementations§
Source§impl Clone for InstallScope
impl Clone for InstallScope
Source§fn clone(&self) -> InstallScope
fn clone(&self) -> InstallScope
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 InstallScope
impl Debug for InstallScope
Source§impl PartialEq for InstallScope
impl PartialEq for InstallScope
Source§fn eq(&self, other: &InstallScope) -> bool
fn eq(&self, other: &InstallScope) -> bool
self and other values to be equal, and is used by ==.impl Copy for InstallScope
impl Eq for InstallScope
impl StructuralPartialEq for InstallScope
Auto Trait Implementations§
impl Freeze for InstallScope
impl RefUnwindSafe for InstallScope
impl Send for InstallScope
impl Sync for InstallScope
impl Unpin for InstallScope
impl UnsafeUnpin for InstallScope
impl UnwindSafe for InstallScope
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.