Compare commits

...
Author SHA1 Message Date
David Mokos 88a2e447d2 fix npx cli package execution 2026-06-23 23:44:48 +02:00
David Mokos e711d0ed0f document npm install and normalize bin path 2026-06-23 23:42:43 +02:00
3 changed files with 16 additions and 7 deletions

No files matched your search

+11 -2
View File
@@ -6,6 +6,8 @@ The package is designed around small detection strategies and data-driven agent
## Install
Install from npm:
```sh
npm install agent-cli-detector
```
@@ -34,8 +36,15 @@ if (isRunningFromAgent()) {
## CLI usage
```sh
npx detect-agent
npx detect-agent --json
npx agent-cli-detector
npx agent-cli-detector --json
```
After installing the package, the CLI command is available as `detect-agent`:
```sh
detect-agent
detect-agent --json
```
Exit codes:
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "agent-cli-detector",
"version": "0.1.0",
"version": "0.1.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "agent-cli-detector",
"version": "0.1.0",
"version": "0.1.1",
"license": "MIT",
"bin": {
"detect-agent": "dist/cli.js"
+3 -3
View File
@@ -1,11 +1,11 @@
{
"name": "agent-cli-detector",
"version": "0.1.0",
"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"
"detect-agent": "dist/cli.js"
},
"exports": {
".": {
@@ -22,7 +22,7 @@
"node": ">=18.18"
},
"scripts": {
"build": "tsc -p tsconfig.json",
"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/*.test.mjs",
"prepack": "npm run clean && npm test"