</>PackageGraphPackageGraph

sandbox-cli-detector

npmv0.2.0TypeScript

Detect whether a CLI is running inside a sandboxed environment

Safe to adopt

Yes — sandbox-cli-detector scores well across adoption, maintenance, weight, supply chain, and licensing. 1.6M downloads per week and 1 known dependents. Last published 53 days ago. 3 releases in the last 2 years.

  • AAdoption: grade A, Excellent.

    1.6M downloads per week and 1 known dependents.

  • AMaintenance: grade A, Excellent.

    Last published 53 days ago. 3 releases in the last 2 years.

  • AWeight: grade A, Excellent.

    Zero runtime dependencies, about 31 KB installed.

  • BSupply chain: grade B, Good.

    This package has a single maintainer (bus factor of 1).

  • 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 sandbox-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.

31 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 sandbox-cli-detector README.

import { detectSandbox } from "sandbox-cli-detector";

const result = detectSandbox();

if (result.detected && result.sandbox) {
  console.log("The name of the sandbox is:", result.sandbox.name);
} else {
  console.log("This program is not running inside a known sandbox");
}

sandbox-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
sandbox-cli-detectorthis page1.6M1MIT1 month ago
has-flag166.9M1MIT1 day ago
supports-hyperlinks35.4M1MIT1 day ago
is-docker02MIT1 day ago
is-inside-container02MIT1 day ago
is-in-ssh01MIT1 day ago

Dependencies

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

Dev (4)

@types/node ^26.1.1tsup ^8.3.5typescript ^5.7.2vitest ^3.0.0

Used by

Popular packages that depend on sandbox-cli-detector.

Relationship graph

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

@expo/clisandbox-cli-detec…
sandbox-cli-detector dependencies dependents

Frequently installed together

Release history

3 releases in the last two years, typically about 1 day apart.

Recent versions of sandbox-cli-detector
VersionPublishedSizeLicense
0.2.0latest1 month ago31 KBMIT
0.1.11 month ago70 KBMIT
0.1.01 month ago68 KBMIT

Overview

sandbox-cli-detector is an npm package that detect whether a CLI is running inside a sandboxed environment. It is very popular, with about 1.6M downloads per week and 1 known dependents in the graph. The latest version is 0.2.0, released under the MIT license.

Who should use it

Teams working in the npm ecosystem who need detect whether a CLI is running inside a sandboxed environment and value a battle-tested, widely-adopted 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

  • Large, well-established user base (1.6M weekly downloads).
  • Ships TypeScript type definitions.
  • Clear open-source license (MIT).

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 sandbox-cli-detector?

Yes — sandbox-cli-detector scores well across adoption, maintenance, weight, supply chain, and licensing. 1.6M downloads per week and 1 known dependents. Last published 53 days ago. 3 releases in the last 2 years.

How do I install sandbox-cli-detector?

Run `npm install sandbox-cli-detector` to add sandbox-cli-detector to your npm project.

What license is sandbox-cli-detector released under?

sandbox-cli-detector is distributed under the MIT license.

How popular is sandbox-cli-detector?

sandbox-cli-detector has approximately 1,596,218 downloads per week and 1 known dependent packages.

Is sandbox-cli-detector still maintained?

The most recent release of sandbox-cli-detector (v0.2.0) was published 1 month ago.

Does sandbox-cli-detector run install scripts?

No. sandbox-cli-detector does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.