agent-cli-detector
npmv0.1.7TypeScriptDetect whether a JavaScript CLI is running inside a coding agent.
Safe to adopt
Yes — agent-cli-detector scores well across adoption, maintenance, weight, supply chain, and licensing. No download data reported for this package yet. Last published 16 days ago. 8 releases in the last 2 years.
- ?Adoption: grade ?, Not reported by this registry.
No download data reported for this package yet.
- AMaintenance: grade A, Excellent.
Last published 16 days ago. 8 releases in the last 2 years.
- AWeight: grade A, Excellent.
Zero runtime dependencies, about 122 KB installed.
- ASupply chain: grade A, Excellent.
No install scripts, 13 maintainers, and a contained dependency surface.
- ALicense: grade A, Excellent.
MIT — permissive, with no copyleft found in the dependency tree.
Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.
Install cost
What you actually take on by adding agent-cli-detector to a project.
Runtime packages this one declares itself.
Distinct packages in the full runtime tree, deduplicated the way a package manager would.
Unpacked size of this package plus its entire runtime tree.
Longest resolved dependency chain below this package.
Compatibility
- Node.js
- node >=18.18
- Module format
- ESM + CommonJS
- TypeScript
- Types included
- Install scripts
- None
Quick start
A usage example from the agent-cli-detector README.
import { detectAgent } from "agent-cli-detector";
const result = detectAgent();
if (result.detected) {
console.log("The name of the coding agent is:", result.agent.name);
} else {
console.log("This program is not running inside a coding agent");
}agent-cli-detector vs the alternatives
Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.
| Package | Weekly downloads | Dependents | License | Last release |
|---|---|---|---|---|
| agent-cli-detectorthis page | 0 | 1 | MIT | 16 days ago |
| commander | 451.1M | 11 | MIT | 1 day ago |
| https-proxy-agent | 225.1M | 10 | MIT | 1 day ago |
| cliui | 212.4M | 1 | ISC | 1 day ago |
| yargs-parser | 178.8M | 2 | ISC | 1 day ago |
| has-flag | 166.9M | 1 | MIT | 1 day ago |
Dependencies
Declared by agent-cli-detector v0.1.7. Runtime dependencies are installed with the package; dev dependencies are not.
Dev (3)
Used by
Popular packages that depend on agent-cli-detector.
Relationship graph
Dependencies (left) and dependents (right) of agent-cli-detector.
Frequently installed together
Expo Router is a file-based router for React Native and web applications.
The Expo SDK
TypeScript-first schema declaration and validation library with static type inference
Better streaming static file server with Range and conditional-GET support
Create clickable links in the terminal
A library for interacting with the app.json
Best-effort discovery of the machine's default gateway and local network IP exclusively with UDP sockets.
Blazing fast and accurate glob matcher written in JavaScript, with no dependencies and full support for standard and extended Bash glob features, including braces, extglobs, POSIX brackets, and regular expressions.
A high-level API to automate web browsers
Lightweight debugging utility for Node.js and the browser
TypeScript definitions for ws
Get details about the current Continuous Integration environment
Release history
8 releases in the last two years, typically about 7 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 0.1.7latest | 16 days ago | 122 KB | MIT |
| 0.1.6 | 23 days ago | 120 KB | MIT |
| 0.1.5 | 1 month ago | 119 KB | MIT |
| 0.1.4 | 1 month ago | 118 KB | MIT |
| 0.1.3 | 1 month ago | 117 KB | MIT |
| 0.1.2 | 2 months ago | 111 KB | MIT |
| 0.1.1 | 2 months ago | 34 KB | MIT |
| 0.1.0 | 2 months ago | 41 KB | MIT |
Overview
agent-cli-detector is an npm package that detect whether a JavaScript CLI is running inside a coding agent. It has 1 known dependents in the graph. The latest version is 0.1.7, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need detect whether a JavaScript CLI is running inside a coding agent and value a focused solution.
When not to use it
Consider an alternative if you need to or if a more actively-maintained option better fits your npm stack.
Pros
- Ships TypeScript type definitions.
- Clear open-source license (MIT).
- Lean dependency tree (3 direct dependencies).
Cons
- No significant drawbacks detected from available metadata.
Auto-generated from collected registry metadata. No external claims are inferred.
Maintainers
Frequently asked questions
Should I use agent-cli-detector?
Yes — agent-cli-detector scores well across adoption, maintenance, weight, supply chain, and licensing. No download data reported for this package yet. Last published 16 days ago. 8 releases in the last 2 years.
How do I install agent-cli-detector?
Run `npm install agent-cli-detector` to add agent-cli-detector to your npm project.
What license is agent-cli-detector released under?
agent-cli-detector is distributed under the MIT license.
How popular is agent-cli-detector?
npm does not publish download counts. Within PackageGraph's crawl, 1 known packages depend on agent-cli-detector.
Is agent-cli-detector still maintained?
The most recent release of agent-cli-detector (v0.1.7) was published 16 days ago.
Does agent-cli-detector run install scripts?
No. agent-cli-detector does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.