Skip to main content

find_root

Function find_root 

Source
pub fn find_root(cwd: &Path) -> PathBuf
Expand description

Resolve the directory in which to create .claude/.

Walks upward from cwd looking for a .git directory — this is the git root and the natural home for agent configuration. Falls back to cwd when no git repo is found, so the command works outside repos too.