Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ This package can detect the following AI agents and development environments:
- **Codex** (OpenAI)
- **Antigravity** (Google DeepMind)
- **Augment**
- **Cline**
- **OpenCode**
- **OpenClaw**
- **Goose** (Block)
- **Junie** (JetBrains)
- **Kiro** (AWS)
Expand Down Expand Up @@ -162,7 +164,7 @@ We welcome contributions!
To add support for a new AI agent:

1. Add the agent's detection rule to [`agents.json`](./agents.json), following the structure defined in [`agents.schema.json`](./agents.schema.json). Agents are evaluated in array order — the first match wins, so place more specific rules before more general ones.
2. Add test cases in `src/determine-agent.test.ts` (TypeScript) and `detect_test.go` / `evaluate_condition_test.go` (Go). Go test files live alongside the source at the repo root.
2. Add test cases in `testcases.json`.
3. Add the agent to the **Supported Agents** list above.

## Links
Expand Down
24 changes: 22 additions & 2 deletions agents.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@
"conditions": [{ "type": "env_set", "name": "GEMINI_CLI" }]
}
},
{
"key": "CLINE",
"name": "cline",
"match": {
"type": "anyOf",
"conditions": [{ "type": "env_set", "name": "CLINE_ACTIVE" }]
}
},
{
"key": "CODEX",
"name": "codex",
Expand All @@ -43,7 +51,8 @@
"conditions": [
{ "type": "env_set", "name": "CODEX_SANDBOX" },
{ "type": "env_set", "name": "CODEX_CI" },
{ "type": "env_set", "name": "CODEX_THREAD_ID" }
{ "type": "env_set", "name": "CODEX_THREAD_ID" },
{ "type": "env_set", "name": "CODEX_SANDBOX_NETWORK_DISABLED" }
]
}
},
Expand All @@ -52,7 +61,10 @@
"name": "antigravity",
"match": {
"type": "anyOf",
"conditions": [{ "type": "env_set", "name": "ANTIGRAVITY_AGENT" }]
"conditions": [
{ "type": "env_set", "name": "ANTIGRAVITY_AGENT" },
{ "type": "env_set", "name": "ANTIGRAVITY_CLI_ALIAS" }
]
}
},
{
Expand Down Expand Up @@ -169,6 +181,14 @@
]
}
},
{
"key": "OPENCLAW",
"name": "openclaw",
"match": {
"type": "anyOf",
"conditions": [{ "type": "env_set", "name": "OPENCLAW_SHELL" }]
}
},
{
"key": "DEVIN",
"name": "devin",
Expand Down
Loading