Verified Claude Code
Use --bare in CI so local config doesn't change results
What it does
--bare skips hooks, LSP, plugin sync, auto-memory and CLAUDE.md discovery for reproducible scripted runs. It only accepts ANTHROPIC_API_KEY or an apiKeyHelper via --settings, not subscription OAuth.
How
ANTHROPIC_API_KEY=... claude --bare -p "Run tests and summarize failures"
How much to trust this
| Applies to | ≥ 2.1.81 |
|---|---|
| Verified | Oct 17, 2026 · v2.1.296 · tested locally 2.1.296 的 --help 中存在(未实际运行:需要 API key);2.1.81 加入 |
| Depends on | --bare-pANTHROPIC_API_KEY |
| Source | https://code.claude.com/docs/en/cli-reference (official_docs) |