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

@hackclub/ari

v0.1.1

Published

Official JavaScript and TypeScript SDK for Ari program integrations

Readme

Ari.js

Your least favorite review platform at Hack Club, now in a JavaScript SDK!

please use this SDK ONLY ON THE SERVER SIDE. The signing secret or the webhook secret must never be sent to a browser or placed in a public environment variable.

Install

With Bun:

bun add @hackclub/ari

With npm:

npm install @hackclub/ari

Send a project

Create the Ari client with the program ID and signing secret from your program settings:

import { Ari } from '@hackclub/ari';

const ari = new Ari({
	programId: process.env.ARI_PROGRAM_ID!,
	signingSecret: process.env.ARI_SIGNING_SECRET!
});

const result = await ari.ships.create({
	external_id: 'project-123',
	title: 'Example Project',
	description: 'Example project description.',
	maker: {
		email: '[email protected]',
		name: 'Example',
		slack_id: 'U1234567890'
	},
	repo_url: 'https://github.com/example/project',
	demo_url: 'https://example.com/demo',
	thumbnail_url: 'https://example.com/image.png',
	hackatime_projects: ['example-project']
});

console.log(result.id, result.status);

external_id is the project ID your own program already uses for tracking the project. Keep result.id too: it points to this exact submission in Ari, so it comes handy for internal tracking about it's state inside of the reviewing process.

Sending a project will also check the most common input mistakes and handles the signing Ari requires for webhooks, so you can catch up invalid data before sending it to the unified or to a reviewer.

Check a project

Use your own project ID to get the newest submission:

const status = await ari.ships.status({ external_id: 'project-123' });

if (status.phase === 'reviewed') {
	console.log(status.decision);
}

Or, you can use an Ari submission ID when you need one exact submission:

const status = await ari.ships.status({ id: 'cm1234567890abcdefghijkl' });

Withdraw a project

await ari.ships.withdraw('project-123');

A project can only be withdrawn while its review is still open.

Receive updates from Ari

Ari can send your program a request when a review changes. This is called a webhook.

Use the webhook secret from Ari for this step. It is different from the signing secret used above for sending ships.

import { Ari } from '@hackclub/ari';

export const POST = Ari.webhooks.createHandler({
	secret: process.env.ARI_WEBHOOK_SECRET!,
	async on_event(event, context) {
		console.log(context.delivery_id, event.event);
	}
});

Make a POST route on your server for recieving webhooks from Ari. The handler works directly with a standard JavaScript Request and returns a standard Response, so have fun with that.

Ari may send the same update again if your server did not confirm the first one, so make sure to confirm it when it went through and you could process it and save it, if you had any errors during that process, just drop it with a non 2xx response code, that way Ari can repeat it in a later time.

See the webhook guide for event names and complete examples.

Handle errors

The SDK gives you separate error types for bad input, errors, timeouts and problems Ari might present while processing something.

import { AriApiError, AriInputError } from '@hackclub/ari';

try {
	await ari.ships.status({ external_id: 'project-123' });
} catch (error) {
	if (error instanceof AriInputError) {
		console.error(error.field, error.message);
	} else if (error instanceof AriApiError) {
		console.error(error.status, error.code);
	} else {
		throw error;
	}
}

The SDK tries create and status again after a network issue happens, fyi, it won't try withdraw again automatically. If a withdrawal drops, check the project status before trying to show a result.

More cool stuff about the SDK