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

shsf-cli

v2.3.3

Published

Production-ready command-line interface and agent bridge for SHSF.

Downloads

380

Readme

SHSF CLI

Production-ready command-line tooling for SHSF instances. The CLI manages functions, namespaces, files, triggers, storage, environment variables, CORS, execution, logs, rate limits, and exposes the live SHSF REST and MCP surfaces for agents.

Requirements

  • Node.js 22 or newer
  • pnpm 10 or newer
  • An SHSF access token

Install

pnpm add -g shsf-cli

From source:

pnpm install
pnpm build
pnpm start -- health

Configuration

The CLI reads configuration in this order:

  1. SHSF_INSTANCE and SHSF_TOKEN environment variables.
  2. ~/.shsf_config, created interactively on first use.

Example non-interactive configuration:

export SHSF_INSTANCE=https://shsf.example.com
export SHSF_TOKEN=token_xxx
shsf health

Core Commands

shsf health
shsf uiurl
shsf create namespace --name apps
shsf create function --name api --description "API handler" --image python:3.13 --startup-file main.py --namespace-id 1 --allow-http true
shsf update function 42 --cache-enabled true --cache-ttl 60 --network-restricted true
shsf get function 42
shsf get exec-url --id 42
shsf function execute --id 42 --payload '{"name":"Ada"}' --route users/list --method POST --no-stream

Files can be synchronized from a local directory:

shsf remote push --id 42 --from ./functions/api --force
shsf remote pull --id 42 --to ./functions/api

Use .shsfignore for gitignore-style push exclusions and .shsf.json for local mappings:

{
  "default": {
    "id": "42",
    "from": "functions/api"
  }
}

Current SHSF Features

Typed commands cover the common stable workflows:

  • create|get|update|delete namespace
  • create|get|update|delete function
  • function execution, dependency install, logs, logging config, rate-limit config
  • file create/list/rename/delete
  • trigger create/get/update/delete plus run-now
  • storage create/list/delete, item get/set/delete/clear
  • function and account-level environment variables
  • CORS origin list/add/remove/clear
  • function counts and health checks

The live backend also exposes admin, global settings, Git source, import/replace, guest, AI, account export, OpenAPI, and MCP routes. Use shsf api request for any route without a specialized wrapper:

shsf api openapi
shsf api request GET /api/functions
shsf api request PATCH /api/function/42/logging --data '{"enabled":true,"hide_payload_headers":true}'
shsf api request POST /api/function/42/git/pull

Agent Use

SHSF exposes an MCP server at /mcp. The CLI has direct wrappers for agent bootstrap and tool calls:

shsf mcp info
shsf mcp init
shsf mcp tools
shsf mcp docs
shsf mcp call list_functions --args '{"namespace":"apps"}'
shsf mcp call write_file --args '{"id":42,"filename":"main.py","content":"def main(args): return {\"ok\": True}"}'

Agents should call shsf mcp docs before writing SHSF function code. The docs include runtime entry points, args shape, v2 response envelope, routing, dependencies, storage, and absolute platform rules.

CI/CD

This repository uses Gitea Actions in .gitea/workflows/ci.yml.

  • Build job: checkout, pnpm setup, Node 24, pnpm-store cache, install, test, build, package artifact.
  • Publish job on main: rebuilds, publishes to npm when NPM_TOKEN is configured, and creates a Gitea release when GITEA_TOKEN is configured.

GitHub Actions and Copilot-specific instructions were removed.

Development

pnpm test
pnpm build
pnpm test:coverage

Add a command by creating a file under src/commands. Export an object with name, description, optional options, and action. Directory names become command groups automatically.

License

MIT-0