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

@fold-run/cli

v0.2.0

Published

CLI for fold.run — deploy serverless functions with TypeScript bundling, secrets, and AI-powered code generation

Readme

@fold-run/cli

Command-line interface for fold.run — deploy serverless functions with automatic TypeScript bundling, secrets management, and AI-powered code generation.

Install

npm install -g @fold-run/cli

Requires Node.js 18+.

Quick start

# Authenticate
fold login

# Scaffold a new project
fold init my-worker

# Start local dev server
cd my-worker
fold dev

# Deploy
fold deploy

Commands

Getting started

| Command | Description | |---------|-------------| | fold init [name] | Scaffold a new project with worker.ts and fold.json | | fold login | Authenticate via email/password or API token | | fold logout | Remove saved credentials | | fold whoami | Show current login info (API, tenant, role) | | fold status | Show config and deployed functions |

Deploy & manage

| Command | Description | |---------|-------------| | fold deploy [file] | Deploy a function (reads fold.json if no file given) | | fold dev [file] | Start a local dev server on port 8787 | | fold functions | List deployed functions | | fold delete <function-id> | Delete a deployed function | | fold rollback <function-id> <version> | Rollback to a previous version | | fold logs | View activation logs (-F to follow, -v for details) |

Configuration

| Command | Description | |---------|-------------| | fold secrets set <name> | Create or update a tenant secret (masked input) | | fold secrets list | List secrets (names only) | | fold secrets delete <id> | Delete a secret | | fold env set <name> -f <fn-id> | Set a function environment variable (masked input) | | fold env list -f <fn-id> | List function env vars | | fold env delete <name> -f <fn-id> | Delete a function env var |

Integrations

| Command | Description | |---------|-------------| | fold webhooks list | List webhook endpoints | | fold webhooks create <fn-id> <path> | Create a webhook endpoint | | fold webhooks delete <id> | Delete a webhook endpoint | | fold schedules list | List scheduled triggers | | fold schedules create <fn-id> <cron> | Create a cron trigger | | fold schedules toggle <fn-id> | Enable or disable a schedule | | fold schedules delete <fn-id> | Delete a schedule |

AI & templates

| Command | Description | |---------|-------------| | fold create-tool <name> <description> | Generate and deploy an MCP tool from natural language | | fold tools list | List deployed MCP tools | | fold templates list | Browse the template marketplace | | fold templates get <name> | View a template's details and code | | fold templates deploy <name> | Deploy a function from a template |

fold.json

The project manifest configures defaults for fold deploy:

{
  "name": "my-worker",
  "entrypoint": "worker.ts",
  "tenant_id": "tenant-abc",
  "intent": {
    "trigger": "http",
    "bindings": ["KV:cache", "D1:db"]
  }
}

| Field | Description | |-------|-------------| | name | Function name (used if --name not passed) | | entrypoint | File to deploy (used if no file argument given) | | tenant_id | Default tenant (overridden by --tenant flag or config) | | intent.trigger | Trigger type hint | | intent.bindings | Resource bindings in TYPE:name format |

Global options

| Flag | Description | |------|-------------| | --json | Output results as JSON (works with functions, logs, deploy, secrets list, env list) | | -V, --version | Print version | | -h, --help | Show help |

Authentication

Credentials are stored in ~/.config/fold/config.json (mode 0600). The CLI supports two auth methods:

  • Email/password — authenticates via the API and stores a JWT
  • API token — direct token input for CI/automation

The CLI checks JWT expiry before each command and exits early if the token has expired.

TypeScript bundling

.ts and .tsx files are automatically bundled with esbuild before deploy:

  • Target: esnext, format: ESM
  • Tree-shaking and minification enabled
  • cloudflare:* imports kept external
  • Skip with --no-bundle to deploy raw JS

Development

# Install dependencies
pnpm install

# Build
pnpm build

# Watch mode
pnpm dev

# Run tests
pnpm test

# Type check
pnpm typecheck

License

MIT