/** * Homedir guard for destructive commands (init, uninstall). * * Running `trellis init` / `trellis uninstall` in `$HOME` is catastrophic: * platforms like Claude Code, Codex, OpenCode all store global runtime data * (`.claude/projects//*.jsonl` chat history, `.codex/sessions/`, * `.opencode/` caches, etc.) directly in the user's home directory. If * trellis manages the same `.{platform}/` config dirs and the hash manifest * picks up runtime data, uninstall would later unlink it. * * Subdirectories of home (`~/Documents/projects/foo/`) are NOT blocked — only * exact-home match. * * Bypass: `TRELLIS_ALLOW_HOMEDIR=1`. */ /** * Returns true if `process.cwd()` is exactly the user's home directory. * * Uses `realpathSync.native()` on both sides so symlinks, `..` segments, and * case differences (Windows) don't confuse the comparison. On Windows the * comparison is also case-insensitive — `C:\Users\Alice` matches * `c:\users\alice`. * * Permissive on lookup failure: if realpath fails for any reason (broken * symlink, EACCES, etc.) we return false so a safety check doesn't crash * the command. */ export declare function isCwdHomedir(): boolean; /** * Error message printed by both `trellis init` and `trellis uninstall` when * the homedir guard trips. */ export declare function homedirGuardMessage(commandName: "init" | "uninstall"): string; /** * Returns true when the bypass env var is set. */ export declare function homedirBypassEnabled(): boolean; //# sourceMappingURL=cwd-guard.d.ts.map