# is-cli **Repository Path**: mirrors_silverwind/is-cli ## Basic Information - **Project Name**: is-cli - **Description**: *Deprecated - Please use es-main module or similar* Detect if the current script was ran as a CLI - **Primary Language**: Unknown - **License**: BSD-2-Clause - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-09-25 - **Last Updated**: 2026-05-24 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # is-cli [![](https://img.shields.io/npm/v/is-cli.svg?style=flat)](https://www.npmjs.org/package/is-cli) [![](https://img.shields.io/npm/dm/is-cli.svg)](https://www.npmjs.org/package/is-cli) Returns `true` if the current module was ran directly by `node` and not imported by another module. This is useful for CLI-style modules that also export values. ## Usage ```bash npm i is-cli ``` ```js const isCLI = require("is-cli")(module); // => true ``` Will throw when `module` is absent. © [silverwind](https://github.com/silverwind), distributed under BSD licence