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

@principal-ai/vanta-sdk

v0.1.2

Published

SDK for interacting with Vanta API for compliance and security monitoring, with GitHub coverage calculator integration

Readme

@principal-ai/vanta-sdk

SDK for interacting with the Vanta API for compliance and security monitoring.

Installation

npm install @principal-ai/vanta-sdk
# or
bun add @principal-ai/vanta-sdk

Setup

  1. Create a credentials file at ~/.config/vanta.env with your Vanta API credentials:
{
  "client_id": "vci_your_client_id",
  "client_secret": "vcs_your_client_secret"
}
  1. Get your credentials from Vanta:
    • Go to your Vanta account settings
    • Create a new API application
    • Copy the client ID and client secret

See Vanta API Access Setup for more details.

Usage

Basic Authentication

import { VantaSDK } from '@principal-ai/vanta-sdk';

// Create SDK instance (uses ~/.config/vanta.env by default)
const vanta = new VantaSDK();

// Test authentication
const isAuthenticated = await vanta.testAuth();
console.log('Authenticated:', isAuthenticated);

// Get access token
const token = await vanta.getAccessToken();

Custom Configuration

import { VantaSDK } from '@principal-ai/vanta-sdk';

const vanta = new VantaSDK({
  credentialsPath: '/custom/path/to/credentials.json',
  scope: 'vanta-api.all:read', // Custom scope
  baseUrl: 'https://api.vanta.com', // Custom base URL
});

Working with Documents

// List all documents
const docsResponse = await vanta.listDocuments({ pageSize: 10 });
console.log('Documents:', docsResponse.results.data);
console.log('Has more:', docsResponse.results.pageInfo.hasNextPage);

// List documents with filters
const okDocs = await vanta.listDocuments({
  pageSize: 20,
  statusMatchesAny: ['OK'],
  frameworkMatchesAny: ['soc2', 'iso27001']
});

// Get a specific document
const doc = await vanta.getDocument('document-id');
console.log('Document:', doc.title, doc.category);

// Create a new custom document
const newDoc = await vanta.createDocument({
  title: 'Security Policy',
  category: 'Policies',
  description: 'Company security policy document',
  isSensitive: false
});

// Delete a document
await vanta.deleteDocument('document-id');

// Upload a file to a document
const file = new Blob(['file content'], { type: 'application/pdf' });
await vanta.uploadFileForDocument('document-id', file, 'policy.pdf');

Pagination

// List first page
let response = await vanta.listDocuments({ pageSize: 10 });
console.log('Page 1:', response.results.data);

// Get next page if available
if (response.results.pageInfo.hasNextPage) {
  response = await vanta.listDocuments({
    pageSize: 10,
    pageCursor: response.results.pageInfo.endCursor
  });
  console.log('Page 2:', response.results.data);
}

Making Custom API Requests

// Make authenticated requests to any Vanta API endpoint
const response = await vanta.request('/v1/tests');
console.log('Tests:', response);

Features

  • ✅ OAuth 2.0 Client Credentials authentication
  • ✅ Automatic token refresh
  • ✅ Type-safe API requests
  • ✅ Configurable credentials path
  • ✅ Document management (list, get, create, delete, upload)
  • ✅ Pagination support
  • ✅ Filtering and query parameters

Development

# Build the package
bun run build

# Watch mode for development
bun run dev

# Type check
bun run type-check

# Run tests
bun test

License

MIT