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

@invokable/core

v0.5.0

Published

Agent-native CLI runtime: output envelope, exit codes, command schema.

Readme

@invokable/core

The runtime for CLI tools that coding agents drive: output envelope, exit codes, command schema, config store, device-code login, and approval gates.

import { cli, command, defineTool } from '@invokable/core';

const tool = defineTool({
  name: 'demo-tool',
  version: '0.1.0',
  api: { baseUrl: 'https://api.example.com' },
  commands: {
    greet: command({
      description: 'Greet someone by name.',
      options: { name: { type: 'string', required: true, short: 'n' } },
      run: ({ opts, ctx }) => {
        ctx.io.note('working…');            // → stderr, always
        return { text: `Hello, ${opts.name}.` };
      },
    }),
  },
});

await cli(tool);
$ demo-tool greet --name Ido --json
working…                                             # stderr
{"status":"ok","data":{"text":"Hello, Ido."}}        # stdout, exactly one document
$ echo $?
0

What you get

One JSON document on stdout, enforced rather than requested: while a command runs, process.stdout.write is diverted to stderr, so a stray console.log in any dependency cannot corrupt the document the agent parses.

Semantic exit codes. 0 ok · 1 error · 2 usage · 3 auth · 4 insufficient_spend · 5 not_found · 6 conflict · 7 rate_limited · 10 checkpoint_pending · 11 timeout · 12 checkpoint_stale · 15 network · 20 declined. Tools may add codes in 30–99.

remediation on every error — the literal next command to run.

Four built-in commands with no code: login (device-code flow), logout, whoami, doctor. The token is stored at ~/.<tool>/config.json, directory 0700, file 0600, written atomically.

Approval gates via checkpoint(), for commands that spend money:

await checkpoint(ctx, {
  gate: 'deploy_review',
  title: 'deployment plan',
  summary: { env: opts.env, replicas: plan.replicas },
  subject: serviceId,
  question: 'Deploy this plan to production?',
  spend: { estimated: plan.credits, balance: plan.balance },
});

The command stops with status: "checkpoint" and exit 10, carrying a rendered panel and the exact command that approves it. Fingerprints are issued by your server (see @invokable/server), bound to the plan the user was shown, and consumed once.

Related

Full documentation: https://github.com/beinvokable/invokable

License

MIT