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

@archicore/sdk

v0.1.1

Published

Official TypeScript/JavaScript SDK for ArchiCore Architecture Analysis API

Readme

@archicore/sdk

Official TypeScript/JavaScript SDK for the ArchiCore Architecture Analysis API.

Installation

npm install @archicore/sdk
# or
yarn add @archicore/sdk
# or
pnpm add @archicore/sdk

Quick Start

import { ArchiCore } from '@archicore/sdk';

// Initialize client
const client = new ArchiCore({ apiKey: 'your-api-key' });

// List projects
const projects = await client.projects.list();
console.log(projects);

// Search code semantically
const results = await client.projects.search('project-id', {
  query: 'authentication middleware'
});

// Ask AI assistant
const answer = await client.projects.ask('project-id', {
  question: 'How does the authentication system work?'
});
console.log(answer.response);

Features

  • Full TypeScript Support: Complete type definitions included
  • Projects: Create, list, delete, and manage projects
  • Semantic Search: Search code using natural language
  • AI Assistant: Ask questions about your codebase
  • Impact Analysis: Analyze how changes affect your codebase
  • Code Metrics: Get code quality metrics
  • Security Scanning: Identify vulnerabilities
  • Webhooks: Subscribe to events

API Reference

Projects

// List all projects
const projects = await client.projects.list();

// Get a specific project
const project = await client.projects.get('project-id');

// Create a project
const project = await client.projects.create({
  name: 'my-project',
  githubUrl: 'https://github.com/user/repo'
});

// Delete a project
await client.projects.delete('project-id');

// Trigger indexing
await client.projects.index('project-id', { force: true });

Search & AI

// Semantic search
const results = await client.projects.search('project-id', {
  query: 'error handling',
  limit: 20,
  threshold: 0.8
});

// Ask AI assistant
const answer = await client.projects.ask('project-id', {
  question: 'What design patterns are used?',
  context: 'Focus on the authentication module'
});

Analysis

// Get code metrics
const metrics = await client.projects.metrics('project-id');
console.log(`Total files: ${metrics.totalFiles}`);
console.log(`Total lines: ${metrics.totalLines}`);

// Get security scan results
const security = await client.projects.security('project-id');
for (const vuln of security.vulnerabilities) {
  console.log(`[${vuln.severity}] ${vuln.message}`);
}

// Impact analysis
const impact = await client.projects.analyze('project-id', {
  files: ['src/auth/login.ts', 'src/auth/middleware.ts']
});
console.log(`Affected files: ${impact.affectedFiles.length}`);

Webhooks

// List webhooks
const webhooks = await client.webhooks.list();

// Create a webhook
const webhook = await client.webhooks.create({
  url: 'https://example.com/webhook',
  events: ['project.indexed', 'analysis.complete'],
  secret: 'your-webhook-secret'
});

// Delete a webhook
await client.webhooks.delete('webhook-id');

Error Handling

import {
  ArchiCore,
  AuthenticationError,
  RateLimitError,
  NotFoundError,
  ValidationError
} from '@archicore/sdk';

const client = new ArchiCore({ apiKey: 'your-api-key' });

try {
  const project = await client.projects.get('non-existent-id');
} catch (error) {
  if (error instanceof NotFoundError) {
    console.log('Project not found');
  } else if (error instanceof AuthenticationError) {
    console.log('Invalid API key');
  } else if (error instanceof RateLimitError) {
    console.log(`Rate limited. Retry after ${error.retryAfter} seconds`);
  } else if (error instanceof ValidationError) {
    console.log(`Invalid request: ${error.message}`);
  }
}

Configuration

Custom Base URL

For self-hosted instances:

const client = new ArchiCore({
  apiKey: 'your-api-key',
  baseUrl: 'https://your-instance.com/api/v1'
});

Timeout

const client = new ArchiCore({
  apiKey: 'your-api-key',
  timeout: 60000 // milliseconds
});

Browser Support

This SDK works in both Node.js and browser environments. It uses the native fetch API.

For Node.js < 18, you may need to polyfill fetch:

import fetch from 'node-fetch';
globalThis.fetch = fetch;

TypeScript

Full TypeScript support is included. All types are exported:

import type {
  Project,
  SearchResult,
  AskResponse,
  Metrics,
  SecurityReport,
  ImpactAnalysis,
  Webhook,
  ArchiCoreConfig
} from '@archicore/sdk';

Requirements

  • Node.js >= 16 (for native fetch) or polyfill
  • Modern browsers with fetch support

License

MIT License - see LICENSE for details.

Links