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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ Officially supported coding agents:
| [Codex](https://developers.openai.com/codex/) | `codex` | ✅ |
| [Cursor](https://cursor.com/) | `cursor` | ✅ |
| [Devin](https://devin.ai/) | `devin` | 🚫 |
| [Factory Droid](https://docs.factory.ai/droid-cli/overview) | `droid` | 🚫 |
| [Gemini CLI](https://github.com/google-gemini/gemini-cli) | `gemini` | 🚫 |
| [GitHub Copilot CLI](https://github.com/github/copilot-cli) | `copilot` | ✅ |
| [Grok](https://x.ai/build) | `grok` | ✅ |
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "agent-cli-detector",
"version": "0.1.7",
"version": "0.1.8",
"description": "Detect whether a JavaScript CLI is running inside a coding agent.",
"type": "module",
"sideEffects": false,
Expand Down
5 changes: 5 additions & 0 deletions src/agents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ export const defaultAgents = [
name: "Devin",
process: [{ pattern: /devin/i }]
},
{
id: "droid",
name: "Factory Droid",
env: [{ name: "FACTORY_ENV", value: "production" }]
},
{
id: "gemini",
name: "Gemini CLI",
Expand Down
1 change: 1 addition & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export type AgentId =
| "copilot"
| "cursor"
| "devin"
| "droid"
| "gemini"
| "grok"
| "kiro"
Expand Down
14 changes: 14 additions & 0 deletions test/detector.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,20 @@ test("detects grok and normalizes its session id", () => {
});
});

test("detects Factory Droid from FACTORY_ENV", () => {
const result = detectAgent({
env: {
FACTORY_ENV: "production"
}
});

assert.equal(result.detected, true);
assert.deepEqual(result.agent, {
id: "droid",
name: "Factory Droid"
});
});

test("detects rork from RORK_API_URL", () => {
const result = detectAgent({
env: {
Expand Down
Loading