npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

dsh-hand

v0.2.0

Published

A zero-dependency helper hand for DeepSeek Harness (DSH) scripts — objects, JSON I/O, hashing, subprocesses and retry.

Readme

dsh-hand

A zero-dependency "hand" for DeepSeek Harness (DSH) scripts: the small, boring things every automation task ends up re-writing — dotted-path object access, safe JSON I/O, hashing, running subprocesses, and retrying flaky work.

CommonJS, Node >= 18, no runtime dependencies. Install:

npm install dsh-hand

CLI

npx dsh-hand --version
npx dsh-hand --help
npx dsh-hand api                        # list all exported functions
npx dsh-hand get config.json db.host    # read a JSON value by dotted path
npx dsh-hand set config.json db.port 5432
npx dsh-hand hash ./package-lock.json   # sha256 (or pass e.g. md5)
npx dsh-hand bytes 1536                 # 1.5 KB
npx dsh-hand slug 'Hello, DSH World!'   # hello-dsh-world
npx dsh-hand run git status --short     # stdout/stderr/exit code forwarded

API

const hand = require('dsh-hand');

hand.name;     // 'dsh-hand'
hand.version;  // '0.2.0'

// objects
hand.pick({ a: 1, b: 2 }, ['a']);              // { a: 1 }
hand.omit({ a: 1, b: 2 }, ['b']);              // { a: 1 }
hand.get(cfg, 'db.host', 'localhost');          // dotted-path read with fallback
hand.set(cfg, 'db.port', 5432);                 // creates intermediate containers
hand.unset(cfg, 'db.password');                 // true when removed
hand.merge(defaults, overrides);                // recursive, returns a fresh object
hand.deepClone(cfg);

// values
hand.clamp(15, 0, 10);                         // 10 (NaN -> min)
hand.slugify('Café déjà vu');                  // 'cafe-deja-vu'
hand.formatBytes(1536);                        // '1.5 KB'
hand.passthrough(fn);                          // forwards this/args/return

// files (atomic writes, UTF-8)
hand.fileExists('config.json');
hand.ensureDir('state/cache');                  // mkdir -p
hand.readText('note.txt', 'fallback');
hand.writeText('note.txt', 'hello');
hand.readJson('config.json', {});               // throws SyntaxError on bad JSON
hand.writeJson('config.json', { a: 1 });

// hashing
hand.hash('abc');                              // sha256 hex
hand.hashFile('package-lock.json', 'sha256');

// process
hand.which('node');                            // absolute path or null
hand.run('git', ['status', '--short']);        // { ok, code, stdout, stderr, signal, error }
hand.env('HOME', '/tmp');

// control
await hand.sleep(200);
await hand.retry(fetchFn, { tries: 5, delay: 100, factor: 2, onRetry(e, n) {} });

All functions are synchronous except sleep and retry, which return Promises. run never throws on a non-zero exit; pass { throw: true } to opt in. set creates arrays when the next path segment is numeric.

Development

npm run check   # node --check on entrypoints
npm test        # smoke tests (temporary files are cleaned up)

License

MIT © aicivilization