Get the Claude config directory based on platform.
()
| 33 | |
| 34 | |
| 35 | def get_claude_config_path() -> Path | None: # pragma: no cover |
| 36 | """Get the Claude config directory based on platform.""" |
| 37 | if sys.platform == "win32": |
| 38 | path = Path(Path.home(), "AppData", "Roaming", "Claude") |
| 39 | elif sys.platform == "darwin": |
| 40 | path = Path(Path.home(), "Library", "Application Support", "Claude") |
| 41 | elif sys.platform.startswith("linux"): |
| 42 | path = Path(os.environ.get("XDG_CONFIG_HOME", Path.home() / ".config"), "Claude") |
| 43 | else: |
| 44 | return None |
| 45 | |
| 46 | if path.exists(): |
| 47 | return path |
| 48 | return None |
| 49 | |
| 50 | |
| 51 | def get_uv_path() -> str: |
no outgoing calls
no test coverage detected