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

@algebrakit/sdk

v1.0.0

Published

Official TypeScript/Node.js SDK for the Algebrakit Webservice API. Create sessions, retrieve scores, lock/unlock sessions, and fetch session info.

Readme

Algebrakit Webservice API SDK

Official Node.js/TypeScript SDK for the Algebrakit Webservice API. It provides methods for creating sessions, retrieving scores, locking/unlocking sessions, and fetching session information.

Installation

npm install @algebrakit/sdk

Requires Node.js 18 or newer.

Usage

Initialize the API Client

import { ApiClient } from '@algebrakit/sdk';

const apiClient = new ApiClient('https://api.algebrakit.com', 'your-api-key');

Create a Session

import { CreateSessionRequest } from '@algebrakit/sdk';

const request: CreateSessionRequest = {
  exercises: [
    { exerciseId: 'fa42e943-8213-41a6-8a91-8c22a929ffe9', version: 'latest' },
  ],
  apiVersion: 2,
};

apiClient.createSession(request).then(response => {
  console.log('Session created:', response);
}).catch(error => {
  console.error('Error creating session:', error);
});

Retrieve Session Scores

import { SessionScoreRequest } from '@algebrakit/sdk';

const request: SessionScoreRequest = {
  sessionId: '0a405901-8b89-4665-9ea0-6dbdff3602fc',
  lockSession: true,
};

apiClient.getSessionScore(request).then(response => {
  console.log('Session scores:', response);
}).catch(error => {
  console.error('Error retrieving scores:', error);
});

Lock or Unlock Sessions

import { SessionLockRequest } from '@algebrakit/sdk';

const request: SessionLockRequest = {
  action: 'LOCK',
  sessionIds: ['f2f62104-3b5a-4156-aeaf-291167e5f9e3'],
};

apiClient.lockSession(request).then(response => {
  console.log('Session locked:', response);
}).catch(error => {
  console.error('Error locking session:', error);
});

Retrieve Session Information

import { SessionInfoRequest } from '@algebrakit/sdk';

const request: SessionInfoRequest = {
  sessionId: '0a405901-8b89-4665-9ea0-6dbdff3602fc',
};

apiClient.getSessionInfo(request).then(response => {
  console.log('Session info:', response);
}).catch(error => {
  console.error('Error retrieving session info:', error);
});

Running the Demos

Each demo lives in its own folder under demo/ with its own configuration.

CLI Demo (demo/cli/)

Demonstrates SDK API calls with text output.

  1. Set up your API key:

    npm run demo:setup
    # Then edit demo/cli/.env with your actual API key
  2. Run the demo:

    npm run demo

Web Demo (demo/play-exercise/)

Renders a working Algebrakit exercise in the browser with learning event logging.

  1. Set up your API key:

    npm run play-exercise:setup
    # Then edit demo/play-exercise/.env with your actual API key
  2. Run the web demo:

    npm run play-exercise
  3. Open http://localhost:3000 in your browser.

Error Handling

Use the handleApiError utility to standardize error messages:

import { handleApiError } from '@algebrakit/sdk';

apiClient.createSession(request).catch(error => {
  console.error(handleApiError(error));
});

License

Licensed under the MIT License.