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

crafyne

v0.6.0

Published

Deploy static sites, edge functions, and fullstack workers to Crafyne — HTTPS URL, one-click rollback.

Downloads

1,225

Readme

crafyne

CLI to deploy static sites, edge functions, and fullstack workers to Crafyne. Zero dependencies for static sites (needs Node 18+; edge functions need esbuild in your project).

Install

Install once, globally, so the crafyne command is available everywhere:

npm install -g crafyne

Or skip the install — replace crafyne with npx -y crafyne in any command below.

Sign in (once, via the browser)

crafyne login

Your browser opens on crafyne.app — click Allow, done. The token is stored in ~/.crafyne/config.json. No token copy-pasting.

Your sites are served from crafyne.site — a separate registrable domain from the dashboard, so your JavaScript never runs on the same origin as the Crafyne session cookie. A custom domain always wins if you've attached one.

Deploy (auto-build)

From a project folder (one with a package.json), Crafyne detects the framework, runs the build, and uploads the output:

crafyne deploy

• Detected: Vite→ Build: npm run build↑ Uploading …✓ Live at https://namek.crafyne.site.

No project yet? You don't need the dashboard. If the slug doesn't exist, the CLI offers to create it (using the folder name as a first guess) and saves it to crafyne.json so the next deploy doesn't ask again. In CI (no TTY), pass --create so nothing hangs.

Supported: Vite, Astro, Next (export), Nuxt, SvelteKit, CRA, Vue, Angular, Gatsby.

Already have a built folder (or a plain static site)? Skip the build:

crafyne deploy ./dist        # upload the folder as-is
crafyne deploy --no-build    # use ./dist without building

If output detection guesses wrong, say so: --output <dir>.

Edge functions (Pro plan)

Add a functions/ folder in your project root — each file becomes a serverless route, while everything else stays static (and free to serve):

functions/api/contact.js      →  /api/contact
functions/api/rsvp/[id].js    →  /api/rsvp/[id]   ([id] matches one path segment)

Each file exports an onRequest handler:

export function onRequest({ request, env, params }) {
  return Response.json({ ok: true, id: params.id });
}

Deployed automatically on crafyne deploy. Requires esbuild in your project: npm i -D esbuild.

Fullstack / SSR (Pro plan)

Ship a real server worker. If your build produces a _worker.js in the output folder (the Cloudflare adapter convention used by Astro SSR, SvelteKit, Qwik, and others), Crafyne deploys it as a fullstack worker — every request runs your code, and the rest of the folder is served as fast, free static assets via env.ASSETS:

export default {
  async fetch(request, env) {
    const url = new URL(request.url);
    if (url.pathname === "/api/hello") return Response.json({ ok: true });
    return env.ASSETS.fetch(request);   // static files
  },
};

No _worker.js at the root? Point to it in crafyne.json: { "type": "worker", "main": "dist/_worker.js" }.

Preview before going live

crafyne deploy --preview

The deploy is still stored (immutable, with its own hash) but does not replace your live site. You get https://namek--a1b2c3.crafyne.site to check first. Happy with it? Promote it:

crafyne deploys                      # version history (● = live)
crafyne rollback --deploy a1b2c3     # make that version live

Commands

| Command | What it does | |---|---| | crafyne login | sign in via the browser, store the token locally | | crafyne logout | remove the saved credentials | | crafyne whoami | show the signed-in account | | crafyne deploy [folder] | build (optional) + upload; deploys functions/ and _worker.js too; creates the project if missing | | crafyne deploy --preview | upload without going live | | crafyne projects | list your projects and their URLs | | crafyne deploys | version history of this project | | crafyne rollback --deploy <hash> | make an older version live again | | crafyne delete --project <slug> | delete a project and all its deploys (permanent) | | crafyne open | open the site in your browser | | crafyne --version | installed CLI version |

Deleting a project

crafyne delete --project blog7

Deleting takes the site down and erases every deploy in its history — there is no undo. That's why the confirmation asks you to retype the slug rather than press y. In CI, pass --yes (and think twice).

CI/CD (no browser)

Use a token from the dashboard (Account → API & CLI → Regenerate). Add --create so the project is created automatically when it doesn't exist — nobody can answer a prompt in CI:

CRAFYNE_TOKEN=crfy_live_xxx npx crafyne deploy ./dist --project namek --create

crafyne.json (optional)

{ "project": "namek", "output": "./dist" }

Then plain crafyne deploy is enough. The CLI writes this file for you when it creates a project.

Publishing (Crafyne maintainers)

cd cli
npm version patch
npm publish
npm view crafyne version    # confirm it went live — npm may hold it in staging for approval

How login works

  1. POST /api/cli/start → returns a code + an authorization URL (/cli?code=…).
  2. The browser opens that page; your logged-in session (cookie) calls POST /api/cli/approve, which mints a token and ties it to the code.
  3. The CLI polls POST /api/cli/poll → receives the token once, then stores it locally.