Skip to content

Commit 0cbd266

Browse files
taeoldjoehan
andauthored
feat: add cline agent tracking (#9272)
Co-authored-by: Joe Hanley <[email protected]>
1 parent c82cbb6 commit 0cbd266

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/track.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@ const pkg = require("../package.json");
99

1010
// Detect if the CLI was invoked by a coding agent, based on well-known env vars.
1111
function detectAIAgent(): string {
12-
if (process.env.CODEX_SANDBOX) return "codex_cli";
1312
if (process.env.CLAUDECODE) return "claude_code";
14-
if (process.env.GEMINI_CLI) return "gemini_cli";
13+
if (process.env.CLINE_ACTIVE) return "cline";
14+
if (process.env.CODEX_SANDBOX) return "codex_cli";
1515
if (process.env.CURSOR_AGENT) return "cursor";
16+
if (process.env.GEMINI_CLI) return "gemini_cli";
1617
if (process.env.OPENCODE) return "open_code";
1718
return "unknown";
1819
}

0 commit comments

Comments
 (0)