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

@koda-rising/sdk

v0.1.1

Published

Typed TypeScript client for the Koda Rising API — auth, multi-currency wallet & billing (NGN, KES, GHS, ZAR, EGP, USD), the agent (run + streaming run-loop), chat, teams, and org-scoped retrieval.

Readme

@koda-rising/sdk

Typed TypeScript client for the Koda Rising API — an affordable AI coding-assistant platform built for African developers. One thin, dependency-free client used by the Koda CLI and VS Code extension, and yours to build on.

  • Zero runtime dependencies — uses the global fetch (Node ≥ 18, Deno, Bun, browsers).
  • Fully typed — request/response shapes, streaming agent events, currency helpers.
  • ESM.

Install

npm install @koda-rising/sdk

Quick start

import { KodaClient, formatMinor } from '@koda-rising/sdk';

const koda = new KodaClient('https://your-gateway.example.com', process.env.KODA_API_KEY!);

// Who am I? (org, role, currency, wallet balance)
const me = await koda.me();
console.log(`Balance: ${formatMinor(me.balanceMinor, me.currency?.code)}`);

// Run the agent as a single turn
for await (const ev of koda.agentRun('add a null check to parseConfig')) {
  if (ev.plan) console.log('plan:', ev.plan);
  if (ev.edits) console.log('edits:', ev.edits);
  if (ev.costMinor != null) console.log('cost:', formatMinor(ev.costMinor, me.currency?.code));
}

Streaming run-loop (plan → edit → verify → retry)

agentRunLoop yields Server-Sent events as they arrive: {start}, token {delta} frames, a {step} per iteration, {turn} billing, and a final result with verified/iterations/totalCostMinor.

for await (const ev of koda.agentRunLoop('fix the failing test', undefined, { sandbox: 'docker', testCmd: 'npm test' })) {
  if (typeof ev.chunk === 'string') process.stdout.write(ev.chunk);   // token deltas
  if (ev.step) console.log(`\niteration ${ev.step.iteration}: ${ev.step.ok ? 'passed' : 'retry'}`);
  if (ev.verified != null) console.log(`done — verified=${ev.verified} in ${ev.iterations} iterations`);
}

Wallet & billing

const intent = await koda.topup(5000);          // ₦5,000 → returns a hosted URL / USSD code per rail
await koda.verifyTopup(intent.reference);        // server-side settle (webhook fallback)
const wallet = await koda.getWallet();

Currency helpers

Re-exported so amounts format per market without a second dependency:

import { formatMinor, toMinor, fromMinor, currencyOf, railsFor, CURRENCIES } from '@koda-rising/sdk';

formatMinor(1250, 'NGN', { decimals: true }); // "₦12.50"
toMinor(12.5, 'NGN');                          // 1250
railsFor('KES');                               // ["card", "mpesa"]

Six currencies ship in CURRENCIES, and railsFor returns the payment methods available in each — cards everywhere, plus the local rail people actually use. Amounts are always integer minor units, never floats.

| Currency | | Minor unit | railsFor() | |---|---|---|---| | NGN | Nigerian Naira ₦ | kobo | card, bank, ussd, opay, palmpay | | KES | Kenyan Shilling KSh | cent | card, mpesa | | GHS | Ghanaian Cedi GH₵ | pesewa | card, mtn_momo, telecel_cash, airteltigo | | ZAR | South African Rand R | cent | card, payshap, instant_eft, ozow | | EGP | Egyptian Pound E£ | piastre | card, fawry, instapay, vodafone_cash | | USD | US Dollar $ | cent | card |

API surface

KodaClient: me, getWallet, topup, verifyTopup, createKey, listKeys, revokeKey, repoIndex, repoStatus, repoClear, createTeam, listMembers, addMember, agentRun (stream), agentRunLoop (stream). Plus parseSSE() for manual stream handling and the currency helpers above.

Auth

Pass an API key (koda_sk_…, created via POST /auth/keys) as the second constructor argument; keys carry scopes (agent:run, wallet:read, keys:manage, metrics:read). Money is always integer minor units (*Minor fields).

License

MIT