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

@axiosleo/koapp

v1.2.1

Published

[![NPM version](https://img.shields.io/npm/v/@axiosleo/koapp.svg?style=flat-square)](https://npmjs.org/package/@axiosleo/koapp) [![npm download](https://img.shields.io/npm/dm/@axiosleo/koapp.svg?style=flat-square)](https://npmjs.org/package/@axiosleo/koap

Readme

@axiosleo/koapp

NPM version npm download CI Build Status License FOSSA Status

A framework designed for rapid web application development with Node.js

Built on Koa

npm install @axiosleo/koapp

Initialization

npx @axiosleo/koapp init <app-name> -d <optional-dir>

# Show help information
# npx @axiosleo/koapp init -h

Quick Start

const { KoaApplication, Router, success } = require("@axiosleo/koapp");

const handle = async (ctx) => {
  success({
    message: "Hello World!",
  });
};

const router = new Router("/test", {
  method: "any",
  handlers: [handle],
});

const app = new KoaApplication({
  port: 8088,
  listen_host: "localhost", // Use 0.0.0.0 for public access
  routers: [router],
});
app.start();

// Open http://localhost:8088/test

AI Skills

@axiosleo/koapp ships a bundle of AI Agent Skills so tools like Cursor and Claude Code can generate framework-correct code for you. Each skill is a self-contained SKILL.md with YAML frontmatter, bundled under node_modules/@axiosleo/koapp/assets/skills/ after installation.

Install into a project

# After: npm install @axiosleo/koapp
npx @axiosleo/koapp skills --install=cursor
npx @axiosleo/koapp skills --install=claude

This copies the skills into ./.cursor/skills/ or ./.claude/skills/ in the current project, making them visible to the matching AI tool.

Install for the current user

npx @axiosleo/koapp skills --install=cursor --scope=user
npx @axiosleo/koapp skills --install=claude --scope=user

Writes to ~/.cursor/skills/ or ~/.claude/skills/, shared across every project on this machine.

Options

| Flag | Values | Default | Description | | --- | --- | --- | --- | | --install, -i | cursor, claude | required | Which tool's skills directory to target | | --scope, -s | project, user | project | Where to write the skills | | --force, -f | boolean | false | Overwrite existing skill directories without prompting |

Bundled skills

| Skill | Purpose | | --- | --- | | koapp | Framework overview + navigation to other skills | | koapp-apps | Choose and configure KoaApplication (HTTP), SocketApplication (TCP), or WebSocketApplication | | koapp-router | Define routes, path params, validators, nested routers | | koapp-response | Send responses via success / failed / result / response / error | | koapp-controller | Organize handlers into classes by extending Controller | | koapp-model | Validate and serialize structured data with Model | | koapp-sse | Stream Server-Sent Events with KoaSSEMiddleware |

How the installer picks the source

  1. If @axiosleo/koapp is installed in the current project, skills are copied from node_modules/@axiosleo/koapp/assets/skills/.
  2. If the project does not depend on @axiosleo/koapp, the CLI prompts to install it first.
  3. If the local install is an older version without the skills assets, the CLI falls back to the skills shipped inside the npx-executed copy and reminds you to run npm install @axiosleo/koapp@latest.

Uninstall

rm -rf ./.cursor/skills/koapp*    # or ./.claude/skills/koapp*
# user scope
rm -rf ~/.cursor/skills/koapp*    # or ~/.claude/skills/koapp*

More Examples

  • Request Validation

See validatorjs for more rule examples

See Router examples for more usage: tests/bootstrap.js

const { Router } = require("@axiosleo/koapp");

const router = new Router("/test", {
  method: "any",
  validator: {
    // URL params, like `/test/{:id}`, where 'id' is required and must be an integer
    params: {
      id: "required|integer",
    },
    query: {
      name: "required|string",
    },
    body: {
      age: "required|integer",
    },
  },
  handlers: [],
});
  • File Operations
// npm install @koa/multer
// npm install -D @types/koa__multer

const multer = require("@koa/multer");

root.post("/upload", async (context) => {
  // Array of files
  const upload = multer();
  const func = upload.any();
  await func(context.koa, async () => {});
  const file = context.koa.request.files[0];
  context.koa.set("content-type", file.mimetype);
  context.koa.body = file.buffer;
  context.koa.attachment(file.originalname);
});
  • Server-Sent Events (SSE)
const { _foreach, _sleep } = require("@axiosleo/cli-tool/src/helper/cmd");

const test = async (context) => {
  await _foreach(["0", "1", "2", "3"], async (item, index) => {
    context.koa.sse.send({ data: { item, index } });
    await _sleep(1000);
  });
  context.koa.sse.end();
};

const { KoaSSEMiddleware } = require("@axiosleo/koapp");

root.any("/sse", async (context) => {
  const func = KoaSSEMiddleware();
  await func(context.koa, async () => {});
  context.koa.sse.send({ data: "hello, world!" });
  process.nextTick(test, context);
});

License

This project is open-sourced software licensed under MIT.

FOSSA Status