Skip to content

Add support for Claude Code CI-like detection#117

Open
sanmai wants to merge 4 commits intoOndraM:mainfrom
sanmai:feat/CLAUDECODE
Open

Add support for Claude Code CI-like detection#117
sanmai wants to merge 4 commits intoOndraM:mainfrom
sanmai:feat/CLAUDECODE

Conversation

@sanmai
Copy link
Copy Markdown
Contributor

@sanmai sanmai commented Jul 18, 2025

Detect Claude Code environment when CLAUDECODE=1 is set, allowing tools to output more concise information for LLM consumption, saving the precious context window.

Fixes #116

sanmai added 2 commits July 18, 2025 17:35
Detect Claude Code environment when CLAUDECODE=1 is set, allowing tools to output more concise information for LLM consumption, saving the precious context window.

Fixes OndraM#116
Comment thread src/CiDetector.php Outdated
Ci\TeamCity::class,
Ci\Travis::class,
Ci\Wercker::class,
Ci\ClaudeCode::class,
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be sorted

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure thing, done 👍

Repository name:
string(0) ""
Repository url:
string(0) "" No newline at end of file
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

newline at the end of the file?

var_dump($ciDetector->isCiDetected());

--EXPECT--
bool(false) No newline at end of file
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

newline at the end of the file?

Comment thread tests/phpt/Ci/CiDetector_ClaudeCode.phpt Outdated
Comment thread tests/phpt/Ci/CiDetector_ClaudeCode_not_detected.phpt Outdated
@sanmai sanmai changed the title Add support for Claude Code CI detection Add support for Claude Code CI-like detection Jul 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Detect CI-like tools like Claude Code

2 participants