# shelljs/shx

Portable Shell Commands for Node

Repository: https://github.com/shelljs/shx
Canonical: https://ross.abutalabs.com/products/shx
Language: JavaScript
License: MIT
License Family: permissive
Topics: shelljs, unix, bash
Last push: 2026-06-08T05:16:38+00:00

## Health v2 (maintenance only)
Score: 73/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 86, release rhythm 40, longevity 100
- inputs: {"age_days": 3853, "days_push": 86, "days_rel": 535, "gap_med": 0, "n_releases_24m": 2}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1870, forks 51 (observed 2026-08-28T04:05:46.804208+00:00)

## What it is
shx is a CLI wrapper around ShellJS that provides portable Unix-like shell commands (ls, rm, cp, mkdir, etc.) for Node.js environments. It is designed for one-off commands in npm package scripts that work identically on Unix and Windows.

## Use cases
- run cross-platform shell commands in npm package scripts
- delete build output directories with shx rm -rf in a clean script
- avoid writing separate bash and Windows batch scripts for node projects
- copy, move, or touch files from a package. script
- use unix commands like ls and pwd on Windows command line

## When to choose
- you need bash-like one-liners in package. scripts that work on Windows and Unix
- you want a lightweight cross-platform alternative to shell scripting in node projects
- you already use ShellJS but want convenient CLI invocation

## When to avoid
- you need to write long complex shell scripts in JavaScript (use ShellJS directly)
- you need full POSIX shell features like pipes, redirection, or environment variable expansion
- you need high-performance native shell tooling

## Facets
- artifact type: cli-tool
- maturity: active
- function: cli, developer-tools, file-system, workflow-automation
- domain: developer-tools, cross-platform
- platform: cli, cross-platform, windows
- tags: shelljs, npm-scripts, unix-commands, bash-like, command-line, automation, nodejs, linux, macos

## Member repositories
- shelljs/shx (main) score 73

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:46.804208+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-30T03:15:06.520882+00:00, confidence not recorded.
  - readme: https://github.com/shelljs/shx (fetched 2026-08-28T04:05:46.804208+00:00, sha 02d0df31121d)
  - registry_npm: https://registry.npmjs.org/shx (fetched 2026-08-29T10:54:18.814445+00:00, sha a70f5b9152b6)
- Data as of 2026-08-30T08:39:29.467469+00:00.
