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

@ligandal/sdk

v0.1.2

Published

Official Node/TypeScript client for the LIGANDAI platform — peptide/binder generation, folding, DeltaForge scoring, receptor search, and target discovery.

Readme

@ligandal/sdk

Official Node/TypeScript client for the LIGANDAI platform — de novo peptide/binder generation, Boltz-2 folding, DeltaForge thermodynamic scoring, receptor search, and transcriptomics-driven target discovery.

This is a faithful TypeScript port of the ligandai Python SDK. The HTTP surface, endpoints, auth, and semantics match the Python client; names are camelCased.

npm install @ligandal/sdk

Requires Node 18+ (uses the built-in fetch). No runtime dependencies.

Quickstart

import { LigandAI } from "@ligandal/sdk";

// Reads LIGANDAI_API_KEY from the environment by default.
const client = new LigandAI();

// Or pass the key explicitly (string shorthand or options object):
const client2 = new LigandAI("lgai_pro_...");
const client3 = new LigandAI({ apiKey: "lgai_pro_...", baseURL: "https://ligandai.com" });

// Discover targets: SI-ranked surface receptors enriched in a tissue.
const markers = await client.discovery.tissueMarkers({
  targetTissues: ["Liver"],
  receptorOnly: true,
  topN: 200,
});
const gene = (markers.top as any[])[0].gene;

// Generate peptides against the top target, auto-fold, and wait for results.
const job = await client.peptides.generate(gene, { numPeptides: 50, autoFold: true });
const result = await job.wait();
console.log(result);

CommonJS

const { LigandAI } = require("@ligandal/sdk");
const client = new LigandAI({ apiKey: "test" });

Configuration

new LigandAI(options) accepts:

| Option | Env fallback | Default | | --- | --- | --- | | apiKey | LIGANDAI_API_KEY | — | | baseURL | LIGANDAI_BASE_URL | https://ligandai.com | | timeout (ms) | — | 600000 | | maxRetries | — | 3 | | impersonateUser | LIGANDAI_IMPERSONATE_USER | — (superadmin only) | | clientSessionId | — | — | | fetch | — | global fetch (injectable for tests) |

Auth uses Authorization: Bearer <key>. Set LIGANDAI_DEBUG=1 to log every request URL.

Resource namespaces

All 22 namespaces are attached to the client as camelCase getters:

account, analysis, bivalent, charts, deltaforge, discovery, diseases, folds, goals, jobs, ligands, linkerModifications, memory, msa, peptides (alias peptide), programs, proteins, receptors, reports, structures, synthesis.

await client.account.credits();
await client.receptors.search("EGFR");
await client.deltaforge.scoreFold("fold_job_123");
const score = await client.ligands.scoreLigand({ pdbContent, ligandSmiles: "CCO" });

Jobs

Long-running work (generation, folding, scoring) returns a Job<T>:

const job = await client.peptides.fold(
  [receptorSeq, peptideSeq],
  { targetGene: "EGFR" },
);
const fold = await job.wait({ pollIntervalMs: 2000, timeoutMs: 1_800_000 });

// Or stream live progress events (SSE with polling fallback):
for await (const event of job.stream()) {
  console.log(event.eventType, event.progress);
}

Job.wait() for fold jobs is durable by default — it does not resolve until the structural payload (PDB/CIF) has landed. Pass { durable: false } to opt out.

Batch folds return a BatchFoldJob:

const batch = await client.peptides.foldBatch(peptides, {
  targetGene: "EGFR",
  diffusionSamples: 4,
});
const results = await batch.wait(); // Array<FoldResult | null>, aligned with input order

Errors

All errors extend LigandAIError. Status-specific subclasses (and OpenAI-style aliases) are exported:

import {
  LigandAIError,
  LigandAIAuthError,          // 401  (alias: AuthenticationError)
  LigandAICreditError,        // 402  (alias: InsufficientCreditsError)
  LigandAITierError,          // 403 tier gate
  LigandAIForbidden,          // 403  (alias: PermissionDeniedError)
  LigandAINotFoundError,      // 404  (alias: NotFoundError)
  LigandAIValidationError,    // 400/422 (alias: UnprocessableEntityError)
  LigandAIRateLimitError,     // 429  (alias: RateLimitError)
  LigandAIServerError,        // 5xx  (alias: InternalServerError)
} from "@ligandal/sdk";

try {
  await client.peptides.foldBatch(peptides, { targetGene: "EGFR" });
} catch (err) {
  if (err instanceof LigandAICreditError) {
    console.log(`Need ${err.shortfall} more credits (top up: ${err.recoveryUrl})`);
  }
}

CLI

The package installs a ligandai binary:

export LIGANDAI_API_KEY=lgai_pro_...

ligandai credits                    # billing widget
ligandai credits top-up --amount 50
ligandai credits auto-reload --enable --threshold 10000 --amount 200

ligandai keys mint --scope fold --target MKTAYIAKQR... --count 5
ligandai keys status
ligandai keys revoke

MCP server

A companion Model Context Protocol server (@ligandal/mcp) exposes the high-value capabilities as MCP tools for Claude Desktop / Claude Code. See mcp/README.md.

License

Copyright © 2026 Ligandal, Inc. All rights reserved. See LICENSE.