# shelljs/shelljs

:shell: Portable Unix shell commands for Node.js

Repository: https://github.com/shelljs/shelljs
Canonical: https://ross.abutalabs.com/products/shelljs
Homepage: https://www.npmjs.com/package/shelljs
Language: JavaScript
License: BSD-3-Clause
License Family: permissive
Topics: javascript, shelljs, unix, shell, bash, nodejs, node
Last push: 2026-08-12T11:13:48+00:00

## Health v2 (maintenance only)
Score: 78/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 97, release rhythm 40, longevity 100
- inputs: {"age_days": 5297, "days_push": 21, "days_rel": 481, "gap_med": 8, "n_releases_24m": 4}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 14399, forks 753 (observed 2026-08-28T04:11:06.918991+00:00)

## What it is
ShellJS is a portable implementation of Unix shell commands (cp, rm, mkdir, which, etc.) as a Node.js library, working on Windows, Linux, and macOS. It lets developers replace Bash scripts with cross-platform JavaScript while keeping familiar shell command syntax.

## Use cases
- run unix shell commands from node.js cross-platform
- replace bash scripts with javascript
- write build scripts that work on windows and linux
- copy move and delete files in a node script
- check if a command exists before running it
- portable mkdir rm cp for npm scripts

## When to choose
- you need unix-style file operations in Node.js that work on Windows too
- you want to eliminate dependency on a Unix shell in build or CI scripts
- you prefer synchronous, chainable shell-like commands in JavaScript

## When to avoid
- you need full POSIX shell features like pipes, redirection, or job control
- you only target Unix systems and can just use Bash directly
- you need high-performance async file operations - Node's fs module may fit better

## Facets
- artifact type: library
- maturity: stable
- function: file-system, cli, developer-tools
- domain: developer-tools, cross-platform
- platform: cross-platform, cli
- tags: unix-commands, shell-scripting, portable, nodejs-library, bash-replacement, command-line, automation, nodejs

## Member repositories
- shelljs/shelljs (main) score 78

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:11:06.918991+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:12:36.289909+00:00, confidence not recorded.
  - readme: https://github.com/shelljs/shelljs (fetched 2026-08-28T04:11:06.918991+00:00, sha 648fc3e24616)
  - registry_npm: https://registry.npmjs.org/shelljs (fetched 2026-08-29T08:06:22.475293+00:00, sha 3efcc2e181cd)
- Data as of 2026-08-30T08:39:29.467469+00:00.
