sandbox-cli-detector
npmv0.2.0TypeScriptDetect 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.
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 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.
| Package | Weekly downloads | Dependents | License | Last release |
|---|---|---|---|---|
| sandbox-cli-detectorthis page | 1.6M | 1 | MIT | 1 month ago |
| has-flag | 166.9M | 1 | MIT | 1 day ago |
| supports-hyperlinks | 35.4M | 1 | MIT | 1 day ago |
| is-docker | 0 | 2 | MIT | 1 day ago |
| is-inside-container | 0 | 2 | MIT | 1 day ago |
| is-in-ssh | 0 | 1 | MIT | 1 day ago |
Dependencies
Declared by sandbox-cli-detector v0.2.0. Runtime dependencies are installed with the package; dev dependencies are not.
Dev (4)
Used by
Popular packages that depend on sandbox-cli-detector.
Relationship graph
Dependencies (left) and dependents (right) of sandbox-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
3 releases in the last two years, typically about 1 day apart.
| Version | Published | Size | License |
|---|---|---|---|
| 0.2.0latest | 1 month ago | 31 KB | MIT |
| 0.1.1 | 1 month ago | 70 KB | MIT |
| 0.1.0 | 1 month ago | 68 KB | MIT |
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
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.