simaojunior.dev hidden leaf branch office · est. 2019
← all til
2026-06-28 · C-rank · 1 min

Quickly Inspect package.json Scripts

tilfishnushellshelljson

Quickly Inspect package.json Scripts

Not exactly new knowledge, but today I felt like adding another small utility to my shell toolkit: a quick way to list every script defined in a package.json without scrolling past endless dependencies.

In fish:

function package-scripts
cat package.json | jq ".scripts"
end

nushell reads JSON natively, so there's no need for jq at all:

def package-scripts [] {
open package.json | get scripts
}

A swift way to review the available scripts without the hassle of opening the whole file.