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

create-lightnode-app

v0.2.3

Published

Scaffold a new project with end-to-end encrypted LightChain AI inference. Like create-next-app, for LightChain dApps. Run: npm create lightnode-app my-app

Readme

create-lightnode-app

Scaffold a new project with end-to-end encrypted LightChain AI inference in one command. Like create-next-app, for LightChain dApps.

npm create lightnode-app my-app

Pick a template, set a private key, you're inference-enabled in ~2 minutes.

First time? Read the Getting Started guide. It walks you through making a wallet, getting free testnet funds, and your first AI call with no prior experience.

Note: this command creates a new folder (my-app/). You must cd my-app before running npm install or npm run dev. Running them in the parent folder fails with npm error Missing script: "dev".

Want to add inference to a folder you already have instead of making a new project? Use npx lightnode-sdk add inference (see the SDK). That writes files into your current folder and does not create a subfolder.

Templates

| Template | What you get | Run | | --- | --- | --- | | node (default) | A 120-line index.ts that runs one end-to-end inference and prints the answer + three on-chain tx hashes. | npm start "your prompt" | | nextjs-api | A Next.js 15 app with app/api/inference/route.ts wired up + a minimal page UI that calls it. | npm run dev | | hono | A standalone Hono server exposing POST /inference. Deploys to Bun / Railway / Fly / any Node host. | npm start |

Not sure which? Pick node to get to a first inference fastest (just a script + a key), nextjs-api if you want a web UI, or hono for a standalone API server you can host anywhere Node runs.

Non-interactive

npm create lightnode-app my-app -- --template nextjs-api --network testnet

Both --template and --network are validated; unknown values error out.

What gets installed

The scaffolded package.json already includes:

| | Why | | --- | --- | | lightnode-sdk | The client (prepareSession, submitPrompt, decryptResponse, etc.) | | viem | On-chain signing for createSession + submitJob | | ws | Relay WebSocket (Node-side) |

Plus framework deps for nextjs-api (next, react, react-dom) or hono (hono, @hono/node-server).

The project is SDK-ready the moment it scaffolds: lightnode-sdk (pinned to the current ^0.19.0 line; npm may lag the repo until the next publish), viem, and ws are already in package.json, so you just import { ... } from "lightnode-sdk" and start building. See the SDK README for the full API surface (read client, inference, the WorkerOperator, the CLI).

After scaffolding

my-app/
  .env.example       # set PRIVATE_KEY here
  README.md          # template-specific run instructions
  package.json
  ...
cd my-app
cp .env.example .env
# put a funded testnet (or mainnet) private key into .env
npm install
npm start            # or `npm run dev` for the nextjs-api template

Testnet inference is free - get LCAI at https://lightfaucet.ai. Mainnet inference costs ~0.022 LCAI per call.

Want to add inference to an existing project?

Use the CLI from the lightnode-sdk package instead:

npx lightnode-sdk add inference --template nextjs-api

It detects your stack and patches the right files. (Once lightnode-sdk is installed in the project, bare npx lightnode <cmd> works too; standalone, npx lightnode resolves to an unrelated npm package, so use npx lightnode-sdk.)

Where this fits

License

MIT.