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

@851-labs/hunk

v0.7.0

Published

CLI for creating, pushing, updating, and deleting static Hunk sites.

Readme

Hunk CLI

List, create, organize, pull, push, watch, update, and delete static HTML, CSS, JavaScript, and assets on Hunk from your terminal.

Install

Run commands with npx:

npx @851-labs/hunk@latest <command>

The installed binary is named hunk, so global installs also work:

npm install -g @851-labs/hunk@latest
hunk <command>

If you use Bun, bunx @851-labs/hunk <command> also works.

Create

Create a new hunk from the current directory, or pass a directory that contains index.html:

npx @851-labs/hunk@latest create
npx @851-labs/hunk@latest create ./site

Hunks are workspace-visible by default. To make a hunk public:

npx @851-labs/hunk@latest create ./site --public
npx @851-labs/hunk@latest create ./site --visibility public

Set the initial display name or URL slug when creating the hunk:

npx @851-labs/hunk@latest create ./site --name "Landing Page"
npx @851-labs/hunk@latest create ./site --name "Landing Page" --slug landing-page

If the directory has an unlinked .hunk/config.json, create merges in the new hunk id and the Hunk config schema URL. If the directory is already linked to a hunk, create a separate new hunk with:

npx @851-labs/hunk@latest create ./site --force

Push

Push changes from the current directory, or pass a directory linked by .hunk/config.json:

npx @851-labs/hunk@latest push
npx @851-labs/hunk@latest push ./site

Watch a linked directory and push on file saves:

npx @851-labs/hunk@latest push --watch
npx @851-labs/hunk@latest push ./site --watch

push --watch performs one initial push, then debounces file changes and runs the same push flow again. Press Ctrl+C to stop watching.

Create and push validate .hunk/config.json and add the schema URL when needed. The production project config schema is hosted at:

https://hunk.851.sh/schemas/config/v1.json

In development, the CLI writes:

http://hunk.localhost:3000/schemas/config/v1.json

Create and push print the Hunk dashboard URL when deployment creation succeeds.

Login

npx @851-labs/hunk@latest login

The CLI opens a browser login flow, then stores a CLI token in:

~/.config/hunk/config.json

Set HUNK_CONFIG_DIR to use a different config directory.

Set HUNK_API_TOKEN for non-interactive environments where browser login is not available.

Logout

npx @851-labs/hunk@latest logout

Logout removes the saved CLI token from the config file and revokes it with the API when possible. If HUNK_API_TOKEN is set, commands can still authenticate with that environment token.

Whoami

Show the authenticated user and workspace:

npx @851-labs/hunk@latest whoami

For scripts and automation:

npx @851-labs/hunk@latest whoami --json

List

List all hunks in the authenticated workspace:

npx @851-labs/hunk@latest list

The default output is a compact table with the hunk id, display name, slug, visibility, and hosted URL. For scripts and automation:

npx @851-labs/hunk@latest list --json

To inspect the same folder tree shown in the Hunk sidebar, use:

npx @851-labs/hunk@latest folder tree
npx @851-labs/hunk@latest folder tree --json

Tree output includes stable refs like folder:folder_123 and hunk:hunk_123 for move commands.

Folders

Create, rename, delete, and inspect sidebar folders:

npx @851-labs/hunk@latest folder create "Archive"
npx @851-labs/hunk@latest folder create "Old Sites" --parent folder_123
npx @851-labs/hunk@latest folder rename folder_123 "Archive"
npx @851-labs/hunk@latest folder delete folder_123 --yes

Folder commands accept raw folder IDs or folder:<id> refs. Delete requires --yes and removes the folder and its contents.

Move

Move or reorder hunks and folders in the sidebar:

npx @851-labs/hunk@latest move old-site --into folder_123
npx @851-labs/hunk@latest move old-site --root
npx @851-labs/hunk@latest move old-site --before folder:folder_123
npx @851-labs/hunk@latest move folder:folder_123 --after hunk:hunk_456

Hunks can be referenced by linked directory, slug, id, or hunk:<target>. Folders must use folder:<id> when they appear as move items.

Pull

Pull the current deployment files into the current directory:

npx @851-labs/hunk@latest pull

Pass a linked directory, hunk slug, or hunk id as the target. Pass a second directory argument to choose where files are written:

npx @851-labs/hunk@latest pull ./site
npx @851-labs/hunk@latest pull old-site ./site
npx @851-labs/hunk@latest pull hunk_123 ./site

A single positional argument is always treated as the target. To pull the current linked directory into another directory, pass . as the target:

npx @851-labs/hunk@latest pull . ./out

Pull refuses to overwrite local files. Use --force to overwrite files that are present in the remote deployment:

npx @851-labs/hunk@latest pull old-site ./site --force

Pull does not delete extra local files. If the destination does not already have .hunk/config.json, pull writes one that links the destination to the pulled hunk. Existing hunk config files are left unchanged.

Update

Update attributes on the hunk linked from the current directory, or pass a linked directory, hunk slug, or hunk id:

npx @851-labs/hunk@latest update --name "Landing Page"
npx @851-labs/hunk@latest update ./site --slug landing-page
npx @851-labs/hunk@latest update old-site --visibility public
npx @851-labs/hunk@latest update hunk_123 --name "Landing Page" --slug landing-page

Pass at least one of --name, --slug, or --visibility. Use --name for the display name only; use --slug when the URL should change. The .hunk/config.json file is unchanged because it stores the stable hunk id.

Create, push, and update print:

https://app.hunk.851.sh/your-workspace/your-site

Delete

Delete the hunk linked from the current directory, or pass a linked directory, hunk slug, or hunk id:

npx @851-labs/hunk@latest delete --yes
npx @851-labs/hunk@latest delete ./site --yes
npx @851-labs/hunk@latest delete old-site --yes
npx @851-labs/hunk@latest delete hunk_123 --yes

Delete requires --yes and permanently deletes the remote hunk and deployments. When deleting by linked directory, it also removes the local .hunk/config.json link. It does not remove site files or the .hunk directory.

Commands

hunk login [--json]
hunk logout [--json]
hunk whoami [--json]
hunk list [--json] [--query <query>]
hunk feedback <message> [--json]
hunk folder <subcommand>
hunk folder tree [--json]
hunk folder list [--json]
hunk folder create <name> [--parent <folder-id>] [--json]
hunk folder rename <folder-id> <name> [--json]
hunk folder delete <folder-id> --yes [--json]
hunk move <item...> [--into <folder-id>|--root] [--before <item-ref>|--after <item-ref>] [--json]
hunk create [dir] [--name <display-name>] [--slug <slug>] [--visibility public|workspace] [--public] [--force] [--json]
hunk pull [target] [dir] [--force] [--json]
hunk push [dir] [--watch] [--json]
hunk update [target] [--name <display-name>] [--slug <slug>] [--visibility public|workspace] [--json]
hunk delete [target] --yes [--json]

CLI behavior follows the local design rules in design.md.

Supported Files

The CLI uploads all regular files in the target directory except:

  • .DS_Store
  • .git
  • .hunk
  • node_modules

The site directory must contain index.html.

API Target

By default, the CLI talks to:

https://api.hunk.851.sh

You can override this with HUNK_API_URL or by editing the apiUrl value in the CLI config file. You can override the Hunk app link base with HUNK_APP_URL or the appUrl config value.