{"_id":"agent-cli-detector","_rev":"12-432bf936067a56cc7d84b4cff020c246","name":"agent-cli-detector","dist-tags":{"latest":"0.1.7"},"versions":{"0.1.0":{"name":"agent-cli-detector","version":"0.1.0","keywords":["agent","cli","detection","codex","claude","opencode"],"license":"MIT","_id":"agent-cli-detector@0.1.0","maintainers":[{"name":"davidmokos","email":"davidmokos@gmail.com"}],"bin":{"detect-agent":"dist/cli.js"},"dist":{"shasum":"883353890cf32b18908275ff1d63fa5b783a1472","tarball":"https://registry.npmjs.org/agent-cli-detector/-/agent-cli-detector-0.1.0.tgz","fileCount":31,"integrity":"sha512-h28CqF7yOoeBukFq7wUWTbMnb4sPrdSuibMFfxXgLlDsBUxAusxbn1jyYme+Fa5IHbNH8VALxB3RT+QmouTHeA==","signatures":[{"sig":"MEUCIQDRBSUFdESucPM6DT1LBe6eX3JVDNN1HB9ezomlDAZrGgIgFEShdJu3MOwdMFQLBmU+qBORxejaWfErSGhO6YAQduM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":42137},"type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"test":"npm run build && node --test test/*.test.mjs","build":"tsc -p tsconfig.json","clean":"node -e \"require('node:fs').rmSync('dist', { recursive: true, force: true })\"","prepack":"npm run clean && npm test"},"_npmUser":{"name":"davidmokos","email":"davidmokos@gmail.com"},"_npmVersion":"11.6.2","description":"Detect whether a JavaScript CLI is running inside a coding agent.","directories":{},"sideEffects":false,"_nodeVersion":"24.11.1","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.8.3","@types/node":"^24.0.4"},"_npmOperationalInternal":{"tmp":"tmp/agent-cli-detector_0.1.0_1782250493303_0.010668710525587377","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"agent-cli-detector","version":"0.1.1","keywords":["agent","cli","detection","codex","claude","opencode"],"license":"MIT","_id":"agent-cli-detector@0.1.1","maintainers":[{"name":"davidmokos","email":"davidmokos@gmail.com"}],"bin":{"detect-agent":"dist/cli.js"},"dist":{"shasum":"86eef3146ab2aa5cc06670955a9b1a6b1d4187ff","tarball":"https://registry.npmjs.org/agent-cli-detector/-/agent-cli-detector-0.1.1.tgz","fileCount":31,"integrity":"sha512-i+4jQyWSCPAJ5riXOibNcaU4LkORxrO/umZW0mKzxsY9h8KOl2rqk3MzDc4VUp+MfIDrd9wzCdsm3s+t3rBHXw==","signatures":[{"sig":"MEUCIQDlbDvAS3AiOT/SIA4V8a/wmk04QubqUIfriwfbZrnUFQIgYH5SWtOEtuUhw1NZ4ytWtpajbQMhfZ90nLtQjwCXhOI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":35156},"type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"test":"npm run build && node --test test/detector.test.mjs test/package.test.mjs","build":"tsc -p tsconfig.json && node -e \"require('node:fs').chmodSync('dist/cli.js', 0o755)\"","clean":"node -e \"require('node:fs').rmSync('dist', { recursive: true, force: true })\"","prepack":"npm run clean && npm run build && node --test test/detector.test.mjs"},"_npmUser":{"name":"davidmokos","email":"davidmokos@gmail.com"},"_npmVersion":"11.6.2","description":"Detect whether a JavaScript CLI is running inside a coding agent.","directories":{},"sideEffects":false,"_nodeVersion":"24.11.1","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.8.3","@types/node":"^24.0.4"},"_npmOperationalInternal":{"tmp":"tmp/agent-cli-detector_0.1.1_1782471154274_0.6782616038301734","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"agent-cli-detector","version":"0.1.2","keywords":["agent","cli","detection","codex","claude","opencode"],"license":"MIT","_id":"agent-cli-detector@0.1.2","maintainers":[{"name":"davidmokos","email":"davidmokos@gmail.com"}],"bin":{"agent-cli-detector":"dist/cli.js"},"dist":{"shasum":"d86b6624adeffb6841cc524d592a02bedfda507e","tarball":"https://registry.npmjs.org/agent-cli-detector/-/agent-cli-detector-0.1.2.tgz","fileCount":15,"integrity":"sha512-qdZ/9JFORtTKJNhT/IczMeEfEUbUU0K5umYeiIQHX+AjHs+Y9SXVzSgaYlpZeyNMrvuh2HpZiOTpvS57iPfBkQ==","signatures":[{"sig":"MEYCIQDwc1iW2qU8qCkc3ZLte9YHAGzlNqsvaQ4GaDJQASd2PAIhAKeGKB+6PgS/xI8nqOH34WpA7ZUnXSgampGRhHpNZf1U","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":113452},"main":"./dist/index.cjs","type":"module","_from":"file:/tmp/agent-cli-detector-0.1.2.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"scripts":{"test":"npm run build && node --test test/detector.test.mjs test/package.test.mjs","build":"tsup && node -e \"require('node:fs').chmodSync('dist/cli.js', 0o755)\"","clean":"node -e \"require('node:fs').rmSync('dist', { recursive: true, force: true })\"","prepack":"npm run clean && npm run build && node --test test/detector.test.mjs"},"_npmUser":{"name":"davidmokos","email":"davidmokos@gmail.com"},"_resolved":"/tmp/agent-cli-detector-0.1.2.tgz","_integrity":"sha512-qdZ/9JFORtTKJNhT/IczMeEfEUbUU0K5umYeiIQHX+AjHs+Y9SXVzSgaYlpZeyNMrvuh2HpZiOTpvS57iPfBkQ==","_npmVersion":"11.6.2","description":"Detect whether a JavaScript CLI is running inside a coding agent.","directories":{},"sideEffects":false,"_nodeVersion":"24.11.1","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","typescript":"^5.8.3","@types/node":"^24.0.4"},"_npmOperationalInternal":{"tmp":"tmp/agent-cli-detector_0.1.2_1782486795130_0.761119216510366","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"agent-cli-detector","version":"0.1.3","keywords":["agent","cli","detection","codex","claude","opencode"],"license":"MIT","_id":"agent-cli-detector@0.1.3","maintainers":[{"name":"davidmokos","email":"davidmokos@gmail.com"}],"homepage":"https://github.com/davidmokos/detect-agent#readme","bugs":{"url":"https://github.com/davidmokos/detect-agent/issues"},"bin":{"agent-cli-detector":"dist/cli.js"},"dist":{"shasum":"650cd8863d9d56e97a483bdc6a16655f72f5eecc","tarball":"https://registry.npmjs.org/agent-cli-detector/-/agent-cli-detector-0.1.3.tgz","fileCount":15,"integrity":"sha512-XjBe6lT5sK9xhAn0ToFvdwicsaGvzZkax1iviPnL8sFFYHoagnTTn2E4YTFiyM956iqkOkFcgcWCiER0kkShbQ==","signatures":[{"sig":"MEUCIQDxYVTCTOgBud6glFZtF91pB7Wz22I8jGmtIfjuAIFCOQIgbGqfr0bo1JLBulMkitFmOAtlnOfvIGclhrz6OnwRijo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/agent-cli-detector@0.1.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":119384},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.18"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"gitHead":"238a06ac5fdaa9cd7d2082a6d2b64f509c4ddc7b","scripts":{"test":"npm run build && node --test test/detector.test.mjs test/package.test.mjs","build":"tsup && node -e \"require('node:fs').chmodSync('dist/cli.js', 0o755)\"","clean":"node -e \"require('node:fs').rmSync('dist', { recursive: true, force: true })\"","prepack":"npm run clean && npm run build && node --test test/detector.test.mjs"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:9074b7ff-995c-4043-beec-8455061b833c"}},"repository":{"url":"git+https://github.com/davidmokos/detect-agent.git","type":"git"},"_npmVersion":"12.0.1","description":"Detect whether a JavaScript CLI is running inside a coding agent.","directories":{},"sideEffects":false,"_nodeVersion":"24.18.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","typescript":"^5.8.3","@types/node":"^24.0.4"},"_npmOperationalInternal":{"tmp":"tmp/agent-cli-detector_0.1.3_1784303481107_0.191412405755919","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"name":"agent-cli-detector","version":"0.1.4","keywords":["agent","cli","detection","codex","claude","opencode"],"license":"MIT","_id":"agent-cli-detector@0.1.4","maintainers":[{"name":"davidmokos","email":"davidmokos@gmail.com"}],"homepage":"https://github.com/davidmokos/detect-agent#readme","bugs":{"url":"https://github.com/davidmokos/detect-agent/issues"},"bin":{"agent-cli-detector":"dist/cli.js"},"dist":{"shasum":"13f74d20dd48007043afd436bef26594b05f6e9e","tarball":"https://registry.npmjs.org/agent-cli-detector/-/agent-cli-detector-0.1.4.tgz","fileCount":15,"integrity":"sha512-qPgevFvpaQoBaRJVKzr8R7h1WPvV3DtbgRIQlne4le66KBzXx5hNBwo/+NTw67LgkKBlhCzksrdautpUdlls0Q==","signatures":[{"sig":"MEUCIQDoYi28k2VOi3GYAoRtlKNB5IvF/0it6VDISz9BbM2Q1QIge9GqR8uXJhxHKrvmzHxtT4lSVgrw2l4g0s2W2Ln46OA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/agent-cli-detector@0.1.4","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":120544},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.18"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"gitHead":"8e4fdd3c6f8091543cf5ad079db5fed80210565a","scripts":{"test":"npm run build && node --test test/detector.test.mjs test/package.test.mjs","build":"tsup && node -e \"require('node:fs').chmodSync('dist/cli.js', 0o755)\"","clean":"node -e \"require('node:fs').rmSync('dist', { recursive: true, force: true })\"","prepack":"npm run clean && npm run build && node --test test/detector.test.mjs"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:9074b7ff-995c-4043-beec-8455061b833c"}},"repository":{"url":"git+https://github.com/davidmokos/detect-agent.git","type":"git"},"_npmVersion":"12.0.1","description":"Detect whether a JavaScript CLI is running inside a coding agent.","directories":{},"sideEffects":false,"_nodeVersion":"24.18.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","typescript":"^5.8.3","@types/node":"^24.0.4"},"_npmOperationalInternal":{"tmp":"tmp/agent-cli-detector_0.1.4_1784385960486_0.7744628416713504","host":"s3://npm-registry-packages-npm-production"}},"0.1.5":{"name":"agent-cli-detector","version":"0.1.5","keywords":["agent","cli","detection","codex","claude","opencode"],"license":"MIT","_id":"agent-cli-detector@0.1.5","maintainers":[{"name":"ide","email":"ide+npm@jameside.com"},{"name":"brentvatne","email":"brentvatne@gmail.com"},{"name":"expoadmin","email":"support@expo.io"},{"name":"exponent","email":"exponent.team@gmail.com"},{"name":"bycedric","email":"me@bycedric.com"},{"name":"kudochien","email":"ckchien@gmail.com"},{"name":"alanhughes","email":"hughesno1@gmail.com"},{"name":"tsapeta","email":"npm@tsapeta.com"},{"name":"expo-bot","email":"brent+expobotnpm@expo.io"},{"name":"philpl","email":"phil@kitten.sh"},{"name":"ccheever","email":"ccheever@gmail.com"},{"name":"wschurman","email":"wschurman@gmail.com"},{"name":"davidmokos","email":"davidmokos@gmail.com"}],"homepage":"https://github.com/expo/agent-cli-detector#readme","bugs":{"url":"https://github.com/expo/agent-cli-detector/issues"},"bin":{"agent-cli-detector":"dist/cli.js"},"dist":{"shasum":"7b6a9b7fb3c1e6e99fbd868b93cef4f2fce680ef","tarball":"https://registry.npmjs.org/agent-cli-detector/-/agent-cli-detector-0.1.5.tgz","fileCount":15,"integrity":"sha512-6xvLw0EGPuxoYGZeqyMV4AK+WoZ31jsqb7a5pln1BTf6oDFsrgvfCJT7E7y9oAqifJZhJ3fZ0J36H7o6JzrB0Q==","signatures":[{"sig":"MEYCIQDQ5svfucPiphD4gmFfYWAZ+stMmkruDq7yWfO3vzO5agIhAL8NfF9XW78N12ni5O+2PIB5jbw8hoNoM0rZ99EQqS4+","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIBbooRZp7aqU6+MWdy0N77cd4Nm4au1Ol6tHjwy6X/csAiEAhcd+3UbloCs+vbgAJN475pb44fsaTsnRUjO0DJZSnqc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/agent-cli-detector@0.1.5","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":121585},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.18"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"gitHead":"cf68eb6e0c5c8786db6b743447c4ba2ee1797969","scripts":{"test":"npm run build && node --test test/detector.test.mjs test/package.test.mjs","build":"tsup && node -e \"require('node:fs').chmodSync('dist/cli.js', 0o755)\"","clean":"node -e \"require('node:fs').rmSync('dist', { recursive: true, force: true })\"","prepack":"npm run clean && npm run build && node --test test/detector.test.mjs"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:65727961-c973-4a20-9055-53898204fc62"}},"repository":{"url":"git+https://github.com/expo/agent-cli-detector.git","type":"git"},"_npmVersion":"12.0.2","description":"Detect whether a JavaScript CLI is running inside a coding agent.","directories":{},"sideEffects":false,"_nodeVersion":"24.18.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","typescript":"^5.8.3","@types/node":"^24.0.4"},"_npmOperationalInternal":{"tmp":"tmp/agent-cli-detector_0.1.5_1785853071471_0.9295590343743223","host":"s3://npm-registry-packages-npm-production"}},"0.1.6":{"name":"agent-cli-detector","version":"0.1.6","keywords":["agent","cli","detection","codex","claude","opencode"],"license":"MIT","_id":"agent-cli-detector@0.1.6","maintainers":[{"name":"ide","email":"ide+npm@jameside.com"},{"name":"brentvatne","email":"brentvatne@gmail.com"},{"name":"expoadmin","email":"support@expo.io"},{"name":"exponent","email":"exponent.team@gmail.com"},{"name":"bycedric","email":"me@bycedric.com"},{"name":"kudochien","email":"ckchien@gmail.com"},{"name":"alanhughes","email":"hughesno1@gmail.com"},{"name":"tsapeta","email":"npm@tsapeta.com"},{"name":"expo-bot","email":"brent+expobotnpm@expo.io"},{"name":"philpl","email":"phil@kitten.sh"},{"name":"ccheever","email":"ccheever@gmail.com"},{"name":"wschurman","email":"wschurman@gmail.com"},{"name":"davidmokos","email":"davidmokos@gmail.com"}],"homepage":"https://github.com/expo/agent-cli-detector#readme","bugs":{"url":"https://github.com/expo/agent-cli-detector/issues"},"bin":{"agent-cli-detector":"dist/cli.js"},"dist":{"shasum":"92b1d24146d15ef902f832cc3ac639d91a304044","tarball":"https://registry.npmjs.org/agent-cli-detector/-/agent-cli-detector-0.1.6.tgz","fileCount":15,"integrity":"sha512-vKrPeEVN3upDF3GjWxsWBbwQgMtNJ8VB1cduPvK3svmmz4ENpS7yaPxbogsbe3w+xp9xp2Cu+0Ar41rjAR4+lA==","signatures":[{"sig":"MEUCIQDDD2r4BS/9OP20Z8Eu75iZ7/7YNN+tVrs54dwQikvFAwIgBuvgfPxCg++qxGD2zDgxFVTM72s93O5tzFDBxQDOXBU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEQCICh2EOQ9c3o/XVTj8DZtW/UPKP4mnpvzJ9ZC3Dxg6DtAAiBp11iFqOof1SE0MxlHe1Pvh0bXBowkmPv19MV/M145jQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/agent-cli-detector@0.1.6","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":122896},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.18"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"gitHead":"9205525ad47b60efab611b47cf870ff90d87ce22","scripts":{"test":"npm run build && node --test test/detector.test.mjs test/package.test.mjs","build":"tsup && node -e \"require('node:fs').chmodSync('dist/cli.js', 0o755)\"","clean":"node -e \"require('node:fs').rmSync('dist', { recursive: true, force: true })\"","prepack":"npm run clean && npm run build && node --test test/detector.test.mjs"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:65727961-c973-4a20-9055-53898204fc62"}},"repository":{"url":"git+https://github.com/expo/agent-cli-detector.git","type":"git"},"_npmVersion":"12.0.2","description":"Detect whether a JavaScript CLI is running inside a coding agent.","directories":{},"sideEffects":false,"_nodeVersion":"24.19.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","typescript":"^5.8.3","@types/node":"^24.0.4"},"_npmOperationalInternal":{"tmp":"tmp/agent-cli-detector_0.1.6_1786982674735_0.9131679383734879","host":"s3://npm-registry-packages-npm-production"}},"0.1.7":{"name":"agent-cli-detector","version":"0.1.7","keywords":["agent","cli","detection","codex","claude","opencode"],"license":"MIT","_id":"agent-cli-detector@0.1.7","maintainers":[{"name":"ide","email":"ide+npm@jameside.com"},{"name":"brentvatne","email":"brentvatne@gmail.com"},{"name":"expoadmin","email":"support@expo.io"},{"name":"exponent","email":"exponent.team@gmail.com"},{"name":"bycedric","email":"me@bycedric.com"},{"name":"kudochien","email":"ckchien@gmail.com"},{"name":"alanhughes","email":"hughesno1@gmail.com"},{"name":"tsapeta","email":"npm@tsapeta.com"},{"name":"expo-bot","email":"brent+expobotnpm@expo.io"},{"name":"philpl","email":"phil@kitten.sh"},{"name":"ccheever","email":"ccheever@gmail.com"},{"name":"wschurman","email":"wschurman@gmail.com"},{"name":"davidmokos","email":"davidmokos@gmail.com"}],"homepage":"https://github.com/expo/agent-cli-detector#readme","bugs":{"url":"https://github.com/expo/agent-cli-detector/issues"},"bin":{"agent-cli-detector":"dist/cli.js"},"dist":{"shasum":"9d0b5d8cccaec3f207efa478890f189b773fae0b","tarball":"https://registry.npmjs.org/agent-cli-detector/-/agent-cli-detector-0.1.7.tgz","fileCount":15,"integrity":"sha512-d8OWDVdZMgjhLUT9ZPgSv/BdFFF9pVuscC0JdUSz3bjwE15gcp6u/o0/JooM2yyAWC49KThFhXlgTXRa9B7yng==","signatures":[{"sig":"MEYCIQDlkbepiUcB3t5M0ggsjZ/opP/7K1W63FgPsazAX0m3WQIhAJ/AKN8fu8nk5NS2vTyWxDE8iEAWpQHBDfDrYycjpPCP","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIQCZjtmZ2OrqJNHePJwr4Fio0zwJso/CQP44voBlciTaxwIgLC6mESCCBMMFmAe0rv7zogs4u1HnP7owaZFMCcCB5j8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/agent-cli-detector@0.1.7","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":125329},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.18"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"gitHead":"09f4c420adc07027189252988eceec9df85e41a7","scripts":{"test":"npm run build && node --test test/detector.test.mjs test/package.test.mjs","build":"tsup && node -e \"require('node:fs').chmodSync('dist/cli.js', 0o755)\"","clean":"node -e \"require('node:fs').rmSync('dist', { recursive: true, force: true })\"","prepack":"npm run clean && npm run build && node --test test/detector.test.mjs"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:65727961-c973-4a20-9055-53898204fc62"}},"repository":{"url":"git+https://github.com/expo/agent-cli-detector.git","type":"git"},"_npmVersion":"12.0.2","description":"Detect whether a JavaScript CLI is running inside a coding agent.","directories":{},"sideEffects":false,"_nodeVersion":"24.19.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","typescript":"^5.8.3","@types/node":"^24.0.4"},"_npmOperationalInternal":{"tmp":"tmp/agent-cli-detector_0.1.7_1787607113053_0.9194848259207806","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2026-06-23T21:34:53.083Z","modified":"2026-09-23T11:27:30.774Z","0.1.0":"2026-06-23T21:34:53.472Z","0.1.1":"2026-06-26T10:52:34.415Z","0.1.2":"2026-06-26T15:13:15.276Z","0.1.3":"2026-07-17T15:51:21.273Z","0.1.4":"2026-07-18T14:46:00.659Z","0.1.5":"2026-08-04T14:17:51.571Z","0.1.6":"2026-08-17T16:04:34.832Z","0.1.7":"2026-08-24T21:31:53.199Z"},"bugs":{"url":"https://github.com/expo/agent-cli-detector/issues"},"license":"MIT","homepage":"https://github.com/expo/agent-cli-detector#readme","keywords":["agent","cli","detection","codex","claude","opencode"],"repository":{"url":"git+https://github.com/expo/agent-cli-detector.git","type":"git"},"description":"Detect whether a JavaScript CLI is running inside a coding agent.","maintainers":[{"email":"ide+npm@jameside.com","name":"ide"},{"email":"brentvatne@gmail.com","name":"brentvatne"},{"email":"support@expo.io","name":"expoadmin"},{"email":"exponent.team@gmail.com","name":"exponent"},{"email":"me@bycedric.com","name":"bycedric"},{"email":"ckchien@gmail.com","name":"kudochien"},{"email":"hughesno1@gmail.com","name":"alanhughes"},{"email":"npm@tsapeta.com","name":"tsapeta"},{"email":"brent+expobotnpm@expo.io","name":"expo-bot"},{"email":"phil@kitten.sh","name":"philpl"},{"email":"ccheever@gmail.com","name":"ccheever"},{"email":"sz.dziedz@gmail.com","name":"szdziedzic"},{"email":"wschurman@gmail.com","name":"wschurman"},{"email":"davidmokos@gmail.com","name":"davidmokos"}],"readme":"# agent-cli-detector\n\nDetect whether a JavaScript CLI is running inside a coding agent.\n\nPlease [open an issue](https://github.com/expo/agent-cli-detector/issues/new)\nif your coding agent isn't properly detected :)\n\n[![npm](https://img.shields.io/npm/v/agent-cli-detector.svg)](https://www.npmjs.com/package/agent-cli-detector)\n[![Tests](https://github.com/expo/agent-cli-detector/actions/workflows/test.yml/badge.svg)](https://github.com/expo/agent-cli-detector/actions)\n\n## Installation\n\n```bash\nnpm install agent-cli-detector\n```\n\n## Usage\n\n```js\nimport { detectAgent } from \"agent-cli-detector\";\n\nconst result = detectAgent();\n\nif (result.detected) {\n  console.log(\"The name of the coding agent is:\", result.agent.name);\n} else {\n  console.log(\"This program is not running inside a coding agent\");\n}\n```\n\n## Supported agents\n\nOfficially supported coding agents:\n\n| Name                                                              | ID            | Session ID |\n| ----------------------------------------------------------------- | ------------- | ---------- |\n| [Antigravity](https://antigravity.google/)                        | `antigravity` | ✅         |\n| [Bolt](https://bolt.new/)                                          | `bolt`        | 🚫         |\n| [Claude Code](https://claude.com/claude-code)                     | `claude-code` | ✅         |\n| [Cline](https://cline.bot/)                                       | `cline`       | 🚫         |\n| [Codex](https://developers.openai.com/codex/)                     | `codex`       | ✅         |\n| [Cursor](https://cursor.com/)                                     | `cursor`      | ✅         |\n| [Devin](https://devin.ai/)                                        | `devin`       | 🚫         |\n| [Gemini CLI](https://github.com/google-gemini/gemini-cli)         | `gemini`      | 🚫         |\n| [GitHub Copilot CLI](https://github.com/github/copilot-cli)       | `copilot`     | ✅         |\n| [Grok](https://x.ai/build)                                        | `grok`        | ✅         |\n| [Kilo Code](https://kilocode.ai/)                                 | `kilocode`    | ✅         |\n| [Kiro](https://kiro.dev/)                                         | `kiro`        | ✅         |\n| [Muse Code][muse-code]                                            | `muse`        | 🚫         |\n| [OpenCode](https://opencode.ai/)                                  | `opencode`    | 🚫         |\n| [Pi](https://github.com/badlogic/pi-mono)                         | `pi`          | 🚫         |\n| [Replit](https://replit.com/)                                      | `replit`      | ✅         |\n| [Rork](https://rork.com/)                                          | `rork`        | 🚫         |\n\n[muse-code]: https://developer.meta.com/ai/products/muse-code/\n\nDetection is data-driven: the exact environment variables and process\npatterns for each agent live in [`src/agents.ts`](src/agents.ts).\n\nOpenCode 1.0.19 and later is detected from environment variables by default.\nOpenCode 0.x requires experimental process-tree detection.\n\n## API\n\n### `detectAgent([options])`\n\nRuns detection and returns a `DetectionResult`:\n\n```js\n{\n  detected: true,\n  agent: {\n    id: \"cursor\",\n    name: \"Cursor\",\n    sessionId: \"d9e9cd60-2e1c-487c-9bc7-fceee5e9c3a2\"\n  }\n}\n```\n\n### `result.detected`\n\nA boolean. Will be `true` if the code is running inside a coding agent,\notherwise `false`.\n\n### `result.agent.id`\n\nA stable identifier for the detected agent (see the ID column in the\nsupport table above). Prefer comparing against this instead of\n`result.agent.name`.\n\n### `result.agent.name`\n\nA string containing the display name of the detected coding agent.\n\nDon't depend on the value of this string not to change for a specific\nagent. If you find yourself writing `result.agent.name === \"Claude Code\"`,\nyou most likely want to use `result.agent.id === \"claude-code\"` instead.\n\n### `result.agent.sessionId`\n\nA string containing the agent's session identifier, normalized from\nagent-specific environment variables such as `CODEX_THREAD_ID`,\n`CURSOR_CONVERSATION_ID`, `CLAUDE_CODE_SESSION_ID`,\n`ANTIGRAVITY_TRAJECTORY_ID`, `KIRO_SESSION_ID`, `KILO_RUN_ID`, and\n`COPILOT_AGENT_SESSION_ID`, `REPLIT_SESSION`, and `GROK_SESSION_ID`.\nOmitted when the agent doesn't expose one\n(see the Session ID column in the support table above).\n\n### `isRunningFromAgent([options])`\n\nA convenience shortcut that returns `result.detected` as a boolean:\n\n```js\nimport { isRunningFromAgent } from \"agent-cli-detector\";\n\nif (isRunningFromAgent()) {\n  // Adjust CLI behavior for agent-driven execution.\n}\n```\n\n## CLI\n\nThe package also ships a CLI:\n\n```bash\nnpx agent-cli-detector\nnpx agent-cli-detector --json\n```\n\nExit codes:\n\n- `0`: a coding agent was detected\n- `1`: no coding agent was detected\n\n## Process-tree detection (experimental)\n\nDetection uses environment variables by default. Parent-process\ninspection is available as an opt-in for callers that can tolerate\nbest-effort process-tree matching:\n\n```js\nconst result = detectAgent({ experimentalProcessTree: true });\n```\n\nSome sandboxes block `ps`, and process names can vary by launcher, so\nprocess-tree detection should be treated as experimental. It has only\nbeen tested on macOS and does not work on Windows.\n\n## Custom agents\n\nAdd an agent by supplying an `AgentDefinition`:\n\n```js\nimport { detectAgent, defaultAgents } from \"agent-cli-detector\";\n\nconst result = detectAgent({\n  agents: [\n    ...defaultAgents,\n    {\n      id: \"my-agent\",\n      name: \"My Agent\",\n      env: [{ name: \"MY_AGENT\", value: \"1\" }],\n      process: [{ pattern: /^my-agent$/i }]\n    }\n  ]\n});\n```\n\n## Custom strategies\n\nAdd a detection strategy by implementing `DetectionStrategy`:\n\n```ts\nimport type { DetectionStrategy } from \"agent-cli-detector\";\n\nconst strategy: DetectionStrategy = {\n  name: \"my-strategy\",\n  detect(context) {\n    return [];\n  }\n};\n```\n\n## License\n\n[MIT](LICENSE)\n","readmeFilename":"README.md"}