{"versions":{"0.1.0":{"name":"agent-cli-detector","version":"0.1.0","description":"Detect whether a JavaScript CLI is running inside a coding agent.","type":"module","sideEffects":false,"bin":{"detect-agent":"dist/cli.js"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"types":"./dist/index.d.ts","engines":{"node":">=18.18"},"scripts":{"build":"tsc -p tsconfig.json","clean":"node -e \"require('node:fs').rmSync('dist', { recursive: true, force: true })\"","test":"npm run build && node --test test/*.test.mjs","prepack":"npm run clean && npm test"},"keywords":["agent","cli","detection","codex","claude","opencode"],"license":"MIT","devDependencies":{"@types/node":"^24.0.4","typescript":"^5.8.3"},"_id":"agent-cli-detector@0.1.0","_nodeVersion":"24.11.1","_npmVersion":"11.6.2","dist":{"integrity":"sha512-h28CqF7yOoeBukFq7wUWTbMnb4sPrdSuibMFfxXgLlDsBUxAusxbn1jyYme+Fa5IHbNH8VALxB3RT+QmouTHeA==","shasum":"883353890cf32b18908275ff1d63fa5b783a1472","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/agent-cli-detector/-/agent-cli-detector-0.1.0.tgz","fileCount":31,"unpackedSize":42137,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDRBSUFdESucPM6DT1LBe6eX3JVDNN1HB9ezomlDAZrGgIgFEShdJu3MOwdMFQLBmU+qBORxejaWfErSGhO6YAQduM="}],"size":11278},"_npmUser":{"name":"anonymous","email":"davidmokos@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"davidmokos@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/agent-cli-detector_0.1.0_1782250493303_0.010668710525587377"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-06-23T21:34:53.472Z","publish_time":1782250493472,"_source_registry_name":"default","contributors":[]},"0.1.1":{"name":"agent-cli-detector","version":"0.1.1","description":"Detect whether a JavaScript CLI is running inside a coding agent.","type":"module","sideEffects":false,"bin":{"detect-agent":"dist/cli.js"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"types":"./dist/index.d.ts","engines":{"node":">=18.18"},"scripts":{"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 })\"","test":"npm run build && node --test test/detector.test.mjs test/package.test.mjs","prepack":"npm run clean && npm run build && node --test test/detector.test.mjs"},"keywords":["agent","cli","detection","codex","claude","opencode"],"license":"MIT","devDependencies":{"@types/node":"^24.0.4","typescript":"^5.8.3"},"_id":"agent-cli-detector@0.1.1","_nodeVersion":"24.11.1","_npmVersion":"11.6.2","dist":{"integrity":"sha512-i+4jQyWSCPAJ5riXOibNcaU4LkORxrO/umZW0mKzxsY9h8KOl2rqk3MzDc4VUp+MfIDrd9wzCdsm3s+t3rBHXw==","shasum":"86eef3146ab2aa5cc06670955a9b1a6b1d4187ff","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/agent-cli-detector/-/agent-cli-detector-0.1.1.tgz","fileCount":31,"unpackedSize":35156,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDlbDvAS3AiOT/SIA4V8a/wmk04QubqUIfriwfbZrnUFQIgYH5SWtOEtuUhw1NZ4ytWtpajbQMhfZ90nLtQjwCXhOI="}],"size":9794},"_npmUser":{"name":"anonymous","email":"davidmokos@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"davidmokos@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/agent-cli-detector_0.1.1_1782471154274_0.6782616038301734"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-06-26T10:52:34.415Z","publish_time":1782471154415,"_source_registry_name":"default","contributors":[]},"0.1.2":{"name":"agent-cli-detector","version":"0.1.2","description":"Detect whether a JavaScript CLI is running inside a coding agent.","type":"module","sideEffects":false,"main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","bin":{"agent-cli-detector":"dist/cli.js"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"engines":{"node":">=18.18"},"scripts":{"build":"tsup && node -e \"require('node:fs').chmodSync('dist/cli.js', 0o755)\"","clean":"node -e \"require('node:fs').rmSync('dist', { recursive: true, force: true })\"","test":"npm run build && node --test test/detector.test.mjs test/package.test.mjs","prepack":"npm run clean && npm run build && node --test test/detector.test.mjs"},"keywords":["agent","cli","detection","codex","claude","opencode"],"license":"MIT","devDependencies":{"@types/node":"^24.0.4","tsup":"^8.5.0","typescript":"^5.8.3"},"_id":"agent-cli-detector@0.1.2","_integrity":"sha512-qdZ/9JFORtTKJNhT/IczMeEfEUbUU0K5umYeiIQHX+AjHs+Y9SXVzSgaYlpZeyNMrvuh2HpZiOTpvS57iPfBkQ==","_resolved":"/tmp/agent-cli-detector-0.1.2.tgz","_from":"file:/tmp/agent-cli-detector-0.1.2.tgz","_nodeVersion":"24.11.1","_npmVersion":"11.6.2","dist":{"integrity":"sha512-qdZ/9JFORtTKJNhT/IczMeEfEUbUU0K5umYeiIQHX+AjHs+Y9SXVzSgaYlpZeyNMrvuh2HpZiOTpvS57iPfBkQ==","shasum":"d86b6624adeffb6841cc524d592a02bedfda507e","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/agent-cli-detector/-/agent-cli-detector-0.1.2.tgz","fileCount":15,"unpackedSize":113452,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDwc1iW2qU8qCkc3ZLte9YHAGzlNqsvaQ4GaDJQASd2PAIhAKeGKB+6PgS/xI8nqOH34WpA7ZUnXSgampGRhHpNZf1U"}],"size":11868},"_npmUser":{"name":"anonymous","email":"davidmokos@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"davidmokos@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/agent-cli-detector_0.1.2_1782486795130_0.761119216510366"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-06-26T15:13:15.276Z","publish_time":1782486795276,"_source_registry_name":"default","contributors":[]},"0.1.3":{"name":"agent-cli-detector","version":"0.1.3","description":"Detect whether a JavaScript CLI is running inside a coding agent.","type":"module","sideEffects":false,"main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","bin":{"agent-cli-detector":"dist/cli.js"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"engines":{"node":">=18.18"},"scripts":{"build":"tsup && node -e \"require('node:fs').chmodSync('dist/cli.js', 0o755)\"","clean":"node -e \"require('node:fs').rmSync('dist', { recursive: true, force: true })\"","test":"npm run build && node --test test/detector.test.mjs test/package.test.mjs","prepack":"npm run clean && npm run build && node --test test/detector.test.mjs"},"keywords":["agent","cli","detection","codex","claude","opencode"],"license":"MIT","devDependencies":{"@types/node":"^24.0.4","tsup":"^8.5.0","typescript":"^5.8.3"},"repository":{"type":"git","url":"git+https://github.com/davidmokos/detect-agent.git"},"bugs":{"url":"https://github.com/davidmokos/detect-agent/issues"},"homepage":"https://github.com/davidmokos/detect-agent#readme","gitHead":"238a06ac5fdaa9cd7d2082a6d2b64f509c4ddc7b","_id":"agent-cli-detector@0.1.3","_nodeVersion":"24.18.0","_npmVersion":"12.0.1","dist":{"integrity":"sha512-XjBe6lT5sK9xhAn0ToFvdwicsaGvzZkax1iviPnL8sFFYHoagnTTn2E4YTFiyM956iqkOkFcgcWCiER0kkShbQ==","shasum":"650cd8863d9d56e97a483bdc6a16655f72f5eecc","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/agent-cli-detector/-/agent-cli-detector-0.1.3.tgz","fileCount":15,"unpackedSize":119384,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/agent-cli-detector@0.1.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDxYVTCTOgBud6glFZtF91pB7Wz22I8jGmtIfjuAIFCOQIgbGqfr0bo1JLBulMkitFmOAtlnOfvIGclhrz6OnwRijo="}],"size":12726},"_npmUser":{"name":"anonymous","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:9074b7ff-995c-4043-beec-8455061b833c"}},"directories":{},"maintainers":[{"name":"anonymous","email":"davidmokos@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/agent-cli-detector_0.1.3_1784303481107_0.191412405755919"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-07-17T15:51:21.273Z","publish_time":1784303481273,"_source_registry_name":"default","contributors":[]},"0.1.4":{"name":"agent-cli-detector","version":"0.1.4","description":"Detect whether a JavaScript CLI is running inside a coding agent.","type":"module","sideEffects":false,"main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","bin":{"agent-cli-detector":"dist/cli.js"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"engines":{"node":">=18.18"},"scripts":{"build":"tsup && node -e \"require('node:fs').chmodSync('dist/cli.js', 0o755)\"","clean":"node -e \"require('node:fs').rmSync('dist', { recursive: true, force: true })\"","test":"npm run build && node --test test/detector.test.mjs test/package.test.mjs","prepack":"npm run clean && npm run build && node --test test/detector.test.mjs"},"keywords":["agent","cli","detection","codex","claude","opencode"],"license":"MIT","devDependencies":{"@types/node":"^24.0.4","tsup":"^8.5.0","typescript":"^5.8.3"},"repository":{"type":"git","url":"git+https://github.com/davidmokos/detect-agent.git"},"bugs":{"url":"https://github.com/davidmokos/detect-agent/issues"},"homepage":"https://github.com/davidmokos/detect-agent#readme","gitHead":"8e4fdd3c6f8091543cf5ad079db5fed80210565a","_id":"agent-cli-detector@0.1.4","_nodeVersion":"24.18.0","_npmVersion":"12.0.1","dist":{"integrity":"sha512-qPgevFvpaQoBaRJVKzr8R7h1WPvV3DtbgRIQlne4le66KBzXx5hNBwo/+NTw67LgkKBlhCzksrdautpUdlls0Q==","shasum":"13f74d20dd48007043afd436bef26594b05f6e9e","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/agent-cli-detector/-/agent-cli-detector-0.1.4.tgz","fileCount":15,"unpackedSize":120544,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/agent-cli-detector@0.1.4","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDoYi28k2VOi3GYAoRtlKNB5IvF/0it6VDISz9BbM2Q1QIge9GqR8uXJhxHKrvmzHxtT4lSVgrw2l4g0s2W2Ln46OA="}],"size":12805},"_npmUser":{"name":"anonymous","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:9074b7ff-995c-4043-beec-8455061b833c"}},"directories":{},"maintainers":[{"name":"anonymous","email":"davidmokos@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/agent-cli-detector_0.1.4_1784385960486_0.7744628416713504"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-07-18T14:46:00.659Z","publish_time":1784385960659,"_source_registry_name":"default","contributors":[]},"0.1.5":{"_id":"agent-cli-detector@0.1.5","bin":{"agent-cli-detector":"dist/cli.js"},"bugs":{"url":"https://github.com/expo/agent-cli-detector/issues"},"dist":{"shasum":"7b6a9b7fb3c1e6e99fbd868b93cef4f2fce680ef","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/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"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIBbooRZp7aqU6+MWdy0N77cd4Nm4au1Ol6tHjwy6X/csAiEAhcd+3UbloCs+vbgAJN475pb44fsaTsnRUjO0DJZSnqc="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/agent-cli-detector@0.1.5","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":121585,"size":12849},"main":"./dist/index.cjs","name":"agent-cli-detector","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","license":"MIT","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"},"version":"0.1.5","_npmUser":{"name":"anonymous","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:65727961-c973-4a20-9055-53898204fc62"}},"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"},"_npmVersion":"12.0.2","description":"Detect whether a JavaScript CLI is running inside a coding agent.","directories":{},"maintainers":[{"name":"anonymous","email":"ide+npm@jameside.com"},{"name":"anonymous","email":"brentvatne@gmail.com"},{"name":"anonymous","email":"support@expo.io"},{"name":"anonymous","email":"exponent.team@gmail.com"},{"name":"anonymous","email":"me@bycedric.com"},{"name":"anonymous","email":"ckchien@gmail.com"},{"name":"anonymous","email":"hughesno1@gmail.com"},{"name":"anonymous","email":"npm@tsapeta.com"},{"name":"anonymous","email":"brent+expobotnpm@expo.io"},{"name":"anonymous","email":"phil@kitten.sh"},{"name":"anonymous","email":"ccheever@gmail.com"},{"name":"anonymous","email":"wschurman@gmail.com"},{"name":"anonymous","email":"davidmokos@gmail.com"}],"sideEffects":false,"_nodeVersion":"24.18.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","typescript":"^5.8.3","@types/node":"^24.0.4"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/agent-cli-detector_0.1.5_1785853071471_0.9295590343743223"},"_cnpmcore_publish_time":"2026-08-04T14:17:51.571Z","publish_time":1785853071571,"_source_registry_name":"default","contributors":[]},"0.1.6":{"_id":"agent-cli-detector@0.1.6","bin":{"agent-cli-detector":"dist/cli.js"},"bugs":{"url":"https://github.com/expo/agent-cli-detector/issues"},"dist":{"shasum":"92b1d24146d15ef902f832cc3ac639d91a304044","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/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"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCICh2EOQ9c3o/XVTj8DZtW/UPKP4mnpvzJ9ZC3Dxg6DtAAiBp11iFqOof1SE0MxlHe1Pvh0bXBowkmPv19MV/M145jQ=="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/agent-cli-detector@0.1.6","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":122896,"size":12976},"main":"./dist/index.cjs","name":"agent-cli-detector","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","license":"MIT","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"},"version":"0.1.6","_npmUser":{"name":"anonymous","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:65727961-c973-4a20-9055-53898204fc62"}},"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"},"_npmVersion":"12.0.2","description":"Detect whether a JavaScript CLI is running inside a coding agent.","directories":{},"maintainers":[{"name":"anonymous","email":"ide+npm@jameside.com"},{"name":"anonymous","email":"brentvatne@gmail.com"},{"name":"anonymous","email":"support@expo.io"},{"name":"anonymous","email":"exponent.team@gmail.com"},{"name":"anonymous","email":"me@bycedric.com"},{"name":"anonymous","email":"ckchien@gmail.com"},{"name":"anonymous","email":"hughesno1@gmail.com"},{"name":"anonymous","email":"npm@tsapeta.com"},{"name":"anonymous","email":"brent+expobotnpm@expo.io"},{"name":"anonymous","email":"phil@kitten.sh"},{"name":"anonymous","email":"ccheever@gmail.com"},{"name":"anonymous","email":"wschurman@gmail.com"},{"name":"anonymous","email":"davidmokos@gmail.com"}],"sideEffects":false,"_nodeVersion":"24.19.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","typescript":"^5.8.3","@types/node":"^24.0.4"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/agent-cli-detector_0.1.6_1786982674735_0.9131679383734879"},"_cnpmcore_publish_time":"2026-08-17T16:04:34.832Z","publish_time":1786982674832,"_source_registry_name":"default","contributors":[]},"0.1.7":{"_id":"agent-cli-detector@0.1.7","bin":{"agent-cli-detector":"dist/cli.js"},"bugs":{"url":"https://github.com/expo/agent-cli-detector/issues"},"dist":{"shasum":"9d0b5d8cccaec3f207efa478890f189b773fae0b","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/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"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCZjtmZ2OrqJNHePJwr4Fio0zwJso/CQP44voBlciTaxwIgLC6mESCCBMMFmAe0rv7zogs4u1HnP7owaZFMCcCB5j8="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/agent-cli-detector@0.1.7","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":125329,"size":13088},"main":"./dist/index.cjs","name":"agent-cli-detector","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","license":"MIT","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"},"version":"0.1.7","_npmUser":{"name":"anonymous","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:65727961-c973-4a20-9055-53898204fc62"}},"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"},"_npmVersion":"12.0.2","description":"Detect whether a JavaScript CLI is running inside a coding agent.","directories":{},"maintainers":[{"name":"anonymous","email":"ide+npm@jameside.com"},{"name":"anonymous","email":"brentvatne@gmail.com"},{"name":"anonymous","email":"support@expo.io"},{"name":"anonymous","email":"exponent.team@gmail.com"},{"name":"anonymous","email":"me@bycedric.com"},{"name":"anonymous","email":"ckchien@gmail.com"},{"name":"anonymous","email":"hughesno1@gmail.com"},{"name":"anonymous","email":"npm@tsapeta.com"},{"name":"anonymous","email":"brent+expobotnpm@expo.io"},{"name":"anonymous","email":"phil@kitten.sh"},{"name":"anonymous","email":"ccheever@gmail.com"},{"name":"anonymous","email":"wschurman@gmail.com"},{"name":"anonymous","email":"davidmokos@gmail.com"}],"sideEffects":false,"_nodeVersion":"24.19.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","typescript":"^5.8.3","@types/node":"^24.0.4"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/agent-cli-detector_0.1.7_1787607113053_0.9194848259207806"},"_cnpmcore_publish_time":"2026-08-24T21:31:53.199Z","publish_time":1787607113199,"_source_registry_name":"default","contributors":[]}},"dist-tags":{"latest":"0.1.7"},"name":"agent-cli-detector","time":{"created":"2026-06-23T21:35:21.153Z","modified":"2026-10-10T01:53:06.689Z","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"},"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)","users":{}}