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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@tolokoban/api

v0.8.0

Published

Quick Typescript code generator for simple and robust RPC applications based on a subset of REST protocol.

Downloads

14

Readme

@tolokoban/api

Quick Typescript code generator for simple and robust RPC applications based on a subset of REST protocol.

Usage

Install it like this:

npm install --save-dev @tolokoban/api

Start it like this:

npx api config.json5

If you need help in creating an initial configuration file, just type:

npx api --init

Usecase

See this short video where we show an example of a very simple math application.

https://user-images.githubusercontent.com/3356894/207921623-f5ab8a38-588d-4347-8caa-ddb46e2870aa.mp4

You can see that implementing an entrypoint is quite easy and Typescript gives a lot of autocompletion out of the box.

Motivation

When creating a RPC client/server application, we want to focus on the precise definition of the server's API: the list of all the entry points.

All the boilerplate to exchange messages with format checking, error handling and authentication is cumbersome and error prone.

What do we mean by subset of REST?

Internally, we use REST to communicate between the client and the server. Here is how we use it, but you don't really need to know this since @tolokoban/api does all the abstraction for you.

  • We use only POST queries.
  • All the messages have the type application/json.
  • HTTP status are used like this:
    • 200: The query succedeed.
    • 400: The format of the params received by the server don't match definition.
    • 401: Authentication failed.
    • 500: The procedure has been executed but returned an error.
  • We use token authentication in the header.