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

@brandazine/solari-sdk

v0.2.2

Published

TypeScript client for the SOLARI API — creator and brand intelligence across Instagram and TikTok.

Readme

@brandazine/solari-sdk

TypeScript client for the SOLARI API — creator and brand intelligence across Instagram and TikTok. Zero dependencies; runs on Node 18+, Bun, Deno, Cloudflare Workers, and browsers with fetch.

npm install @brandazine/solari-sdk

Quickstart

import { Solari } from "@brandazine/solari-sdk";

const solari = new Solari({ token: process.env.SOLARI_TOKEN });

const hits = await solari.tools.catalog.instagram.account.search({ query: "nike", limit: 3 });
const brand = await solari.tools.insight.instagram.brand.overview({ username: "nike" });
const tools = await solari.listTools();

Create an API key on your SOLARI My page (long-lived, solari_sk_…, shown once), or mint a short-lived token with solari auth token on a machine signed in to the solari CLI. With no token option the client reads SOLARI_TOKEN.

Typed tools

solari.tools is generated from the SOLARI tool registry, so every tool path, argument name, argument type, and enum value is checked by the TypeScript compiler and completed by your editor. A missing required argument, a misspelled key, or an out-of-range enum fails at compile time.

await solari.tools.catalog.instagram.account.search({ query: "nike", query_type: "bio" });
await solari.tools.catalog.instagram.account.search({ limit: 3 }); // error: query is required
await solari.tools.catalog.instagram.account.search({ query: "nike", query_type: "fuzzy" }); // error: not an enum value

Tool responses are JSON whose shape is documented per tool at solari.sh/docs; pass a type parameter to name it: search<AccountHits>({ ... }).

solari.call(name, args) checks the arguments the same way when name is one of the generated SolariToolName values. Any other name — for example the per-account solari_apps_* tools — is accepted with free-form arguments, and solari.dynamic.<any>.<path>(args) spells such a call as a path without type checking.

API

  • new Solari({ token?, baseUrl?, fetch?, timeoutMs?, userAgent? })baseUrl defaults to https://solari.sh; fetch lets you inject a custom implementation.
  • solari.tools.<family>.<platform>.<group>.<name>(args) — typed tool calls; segments mirror the solari_ tool names.
  • solari.call<T>(name, args) — run a tool by name and get its JSON payload back.
  • solari.listTools() — every tool the signed-in account can call, with its JSON input schema.
  • solari.getTool(name) — one tool.
  • solari.me() — the identity behind the token.
  • solari.dynamic — untyped path proxy for tools that are not in the generated catalog.
  • SOLARI_TOOL_NAMES, SolariToolName, SolariToolMap, SolariTools, <Tool>Args — the generated types.

Errors throw SolariError with status, code, message, tool, retryAfterSeconds, and a retryable flag (429, 502, 503, 504). Codes come straight from the API: invalid_arguments, tool_not_found, rate_limited, forbidden, upstream_timeout, app_warming_up, ...

Development

bun install
bun run typecheck
bun test
bun run build

src/tools.generated.ts is produced from the MCP worker's tool registry by pnpm run sdk:generate in cf-workers/solari-mcp; CI fails when it is stale.