[
    {
        "role": "user",
        "content": "is%20there%20a%20command%20line%20switch%20for%20claude%20code%20to%20tell%20it%20where%20to%20look%20for%20the%20project%20.claude%20directory%20containing%20the%20local%20settings.json%20file%3F"
    },
    {
        "role": "assistant",
        "content": "I couldn\u2019t find any evidence that *Claude Code* offers a command-line switch (flag) to explicitly specify the path to a `.claude` directory containing `settings.json`. Here\u2019s what I uncovered, and your options:\n\n---\n\n### \ud83d\udd0d What *is* supported\n\nAccording to Claude Code\u2019s docs:\n\n- It looks for configuration in two primary places:  \n\u2002\u2002\u2022 The **project** directory \u2014 `.claude/settings.json` (team-shared) and `.claude/settings.local.json` (per-user overrides) ([code.claude.com](https://code.claude.com/docs/en/configuration?utm_source=openai))  \n\u2002\u2002\u2022 The **global/home** directory \u2014 `~/.claude/settings.json` etc. for your user across all projects ([code.claude.com](https://code.claude.com/docs/en/configuration?utm_source=openai))\n\n- There *are* some CLI flags and environment variables that **override** settings (for example, things like `--permission-mode`) but nothing that changes where Claude Code looks for its `.claude` folder. ([code.claude.com](https://code.claude.com/docs/en/claude-directory?utm_source=openai))\n\n- There *is* an environment variable called `CLAUDE_CONFIG_DIR` \u2014 setting that changes where the \u201cglobal\u201d (`~/.claude`)-level files live, but not the project directory lookup. Claude Code still expects `.claude/` inside your project root. ([code.claude.com](https://code.claude.com/docs/en/claude-directory?utm_source=openai))\n\n---\n\n### \u26a0\ufe0f Why there\u2019s no \u201cswitch to locate `.claude` somewhere else\u201d\n\nFrom the internals and documentation:\n\n- The `.claude` folder in a project is tied to the working directory / repo root \u2014 it's part of how Claude Code finds \u201cproject settings\u201d (shared settings, instructions, skills, etc.). ([code.claude.com](https://code.claude.com/docs/en/claude-directory?utm_source=openai))\n\n- While you *can* override settings per session using CLI flags or environment variables, there is no documented flag to say \u201cuse this path as project config directory\u201d. In the \u201cExplore the .claude directory\u201d documentation, it explicitly states the project scope is \u201c`.claude/` in your repository\u201d ([code.claude.com](https://code.claude.com/docs/en/claude-directory?utm_source=openai)).\n\n---\n\n### \u2705 What you *can* do instead\n\nIf your goal is to use a specific `.claude` settings folder in some non-standard place, here are workarounds:\n\n- Try changing your working directory to where your desired `.claude` is, and run `claude` there.\n\n- Use `CLAUDE_CONFIG_DIR` to redirect your global config folder to a different path. But note: that affects just the user/global scope, *not* project-level `.claude` detection. ([code.claude.com](https://code.claude.com/docs/en/claude-directory?utm_source=openai))\n\n- Possibly symlink the `.claude` folder from where you want it into the project root.\n\n- Use a wrapper script (shell script or alias) that sets appropriate environment vars or copies necessary `settings.json` into the project root before launching Claude Code.\n\n---\n\nIf you want, I can check the very latest version change logs to see whether this is planned or added \u2014 want me to dig into that?"
    }
]