</>PackageGraphPackageGraph

agent-cli-detector

npmv0.1.7TypeScript

Detect 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.

0
Direct dependencies

Runtime packages this one declares itself.

0
Total installed

Distinct packages in the full runtime tree, deduplicated the way a package manager would.

122 KB
Install size

Unpacked size of this package plus its entire runtime tree.

Tree depth

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.

PackageWeekly downloadsDependentsLicenseLast release
agent-cli-detectorthis page01MIT16 days ago
commander451.1M11MIT1 day ago
https-proxy-agent225.1M10MIT1 day ago
cliui212.4M1ISC1 day ago
yargs-parser178.8M2ISC1 day ago
has-flag166.9M1MIT1 day ago

Dependencies

Declared by agent-cli-detector v0.1.7. Runtime dependencies are installed with the package; dev dependencies are not.

Dev (3)

@types/node ^24.0.4tsup ^8.5.0typescript ^5.8.3

Used by

Popular packages that depend on agent-cli-detector.

Relationship graph

Dependencies (left) and dependents (right) of agent-cli-detector.

@expo/cliagent-cli-detector
agent-cli-detector dependencies dependents

Frequently installed together

Release history

8 releases in the last two years, typically about 7 days apart.

Recent versions of agent-cli-detector
VersionPublishedSizeLicense
0.1.7latest16 days ago122 KBMIT
0.1.623 days ago120 KBMIT
0.1.51 month ago119 KBMIT
0.1.41 month ago118 KBMIT
0.1.31 month ago117 KBMIT
0.1.22 months ago111 KBMIT
0.1.12 months ago34 KBMIT
0.1.02 months ago41 KBMIT

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

Keywords

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.