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

@virke/sdk

v1.1.0

Published

TypeScript SDK for the Virke platform

Readme

@virke/sdk

TypeScript SDK for the Virke platform. Manage projects, deployments, databases, KV stores, and object storage from any TypeScript/JavaScript runtime.

Install

bun add @virke/sdk

Quick Start

import { VirkeClient } from "@virke/sdk";

const client = new VirkeClient({
  baseUrl: "https://api.virke.dev",
  token: "your-session-token",
  // or: apiKey: "vk_..."
});

// List projects
const { data } = await client.listProjects();
console.log(data.projects);

// Deploy a static site
await client.deploy("my-site", [
  { path: "index.html", content: "<h1>Hello</h1>" },
]);

// Query a database
const result = await client.dbQuery("my-db", "SELECT * FROM users WHERE id = ?", [1]);
console.log(result.data.rows);

Authentication

The SDK supports three auth modes:

// Session token (from `virke login`)
new VirkeClient({ baseUrl: "https://api.virke.dev", token: "session-token" });

// API key (for CI/CD and scripts)
new VirkeClient({ baseUrl: "https://api.virke.dev", apiKey: "vk_..." });

// Cookie-based (for browser/dashboard use)
new VirkeClient({ baseUrl: "https://api.virke.dev", useCookies: true });

API Reference

Projects

| Method | Description | |--------|-------------| | listProjects() | List all projects | | createProject({ name, slug?, project_type? }) | Create a new project | | getProject(slug) | Get project details | | updateProject(slug, { name?, description? }) | Update project | | deleteProject(slug) | Delete a project |

Deployments

| Method | Description | |--------|-------------| | deploy(slug, files) | Deploy static files | | deployRun(slug, wasmBase64) | Deploy a Wasm binary to Virke Run | | deployShared(slug, script) | Deploy JS to shared run (free tier) | | listDeployments(slug) | List deploy history | | rollback(slug, deployId?) | Roll back to a previous deploy | | createPreview(slug, files) | Create a preview deployment |

Canary Deployments

| Method | Description | |--------|-------------| | startCanary(slug, deployId, weight) | Start canary for static sites | | adjustCanary(slug, weight) | Adjust canary traffic weight | | promoteCanary(slug) | Promote canary to production | | abortCanary(slug) | Abort canary, revert to stable | | startRunCanary(slug, version, weight) | Start canary for Virke Run | | getCanaryStatus(slug) | Check canary status |

Databases (Virke DB)

| Method | Description | |--------|-------------| | createDatabase(slug, name, options?) | Create a database | | listDatabases(slug) | List databases | | dbQuery(dbName, sql, params?) | Execute a SQL query | | dbBatch(dbName, statements) | Execute multiple statements | | dbTransaction(dbName, statements) | Execute in a transaction | | dbFlush(dbName) | Flush pending async writes | | dbSyncStatus(dbName) | Check sync status | | promoteDatabase(slug, name, options) | Promote to a higher tier |

Key-Value Store (Virke KV)

| Method | Description | |--------|-------------| | createKvNamespace(slug, name) | Create a namespace | | kvGet(namespace, key) | Get a value | | kvSet(namespace, key, value, options?) | Set a value (with optional TTL) | | kvDelete(namespace, key) | Delete a key | | kvList(namespace, options?) | List keys |

Object Storage (Virke OS3)

| Method | Description | |--------|-------------| | createOs3Bucket(slug, name, options?) | Create a bucket | | os3Get(bucket, key) | Get an object | | os3Put(bucket, key, content, contentType?) | Put an object | | os3Delete(bucket, key) | Delete an object | | os3List(bucket, options?) | List objects |

Domains & Environment

| Method | Description | |--------|-------------| | addDomain(slug, hostname) | Add a custom domain | | listDomains(slug) | List domains | | checkDomainStatus(slug, hostname) | Check DNS/SSL status | | setEnvVars(slug, vars) | Set environment variables | | listEnvVars(slug) | List environment variables |

Organizations

| Method | Description | |--------|-------------| | listOrgs() | List organizations | | createOrg(name, slug?) | Create an organization | | inviteOrgMember(slug, email, role?) | Invite a member | | listOrgMembers(slug) | List members |

Response Format

All methods return ApiResult<T>:

type ApiResult<T> = {
  data: T;
  error: null;
} | {
  data: null;
  error: { code: string; message: string };
};

License

MIT