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

kritisi

v2.3.0

Published

AI-powered Solidity security auditing and NatSpec documentation CLI with multiple providers.

Readme

Kritisi: Multi-provider Solidity Audit CLI and Library

Kritisi audits Solidity contracts, adds NatSpec documentation, merges imports, and writes security findings as PDF. It supports OpenRouter, OpenAI, Claude/Anthropic, and DeepSeek.

Requirements

  • Node.js 18 or newer

Install

Install the CLI globally:

npm install --global kritisi
kritisi help

Install the package locally when using the library or a project-local CLI:

npm install kritisi
npx kritisi help

CLI usage

kritisi setkey --service <provider>
kritisi setmodel --service <provider>
kritisi natspec --service <provider> --path ./contracts/MyContract.sol
kritisi security --service <provider> --path ./contracts/MyContract.sol
kritisi merger --path ./contracts/MyContract.sol

--service selects the provider for natspec, security, setkey, and setmodel. Supported values are openrouter (the default), openai, claude (or anthropic), and deepseek. Omitting --service keeps the OpenRouter default.

security writes MyContract.pdf beside the Solidity source. natspec updates the source file in place. merger writes MyContract_merge.sol beside the source.

Providers and configuration

Environment variables take precedence over user-local configuration. Supply API keys through the environment or the interactive setkey command; do not commit them.

| Provider | API key environment variable | Model environment variable | Default endpoint | | --- | --- | --- | --- | | OpenRouter | OPENROUTER_API_KEY | OPENROUTER_MODEL | https://openrouter.ai/api/v1/chat/completions | | OpenAI | OPENAI_API_KEY | OPENAI_MODEL | https://api.openai.com/v1/chat/completions | | Claude / Anthropic | ANTHROPIC_API_KEY or CLAUDE_API_KEY | ANTHROPIC_MODEL or CLAUDE_MODEL | https://api.anthropic.com/v1/messages | | DeepSeek | DEEPSEEK_API_KEY | DEEPSEEK_MODEL | https://api.deepseek.com/chat/completions |

Provider-specific *_BASE_URL variables override the default endpoint: OPENROUTER_BASE_URL, OPENAI_BASE_URL, ANTHROPIC_BASE_URL/CLAUDE_BASE_URL, and DEEPSEEK_BASE_URL.

Default models are openai/gpt-5.6-sol (OpenRouter), gpt-5.6-sol (OpenAI), claude-opus-5 (Claude), and deepseek-v4-pro (DeepSeek).

For example, with a placeholder key supplied outside the repository:

export OPENROUTER_API_KEY="<your-api-key>"
export OPENROUTER_MODEL="<provider-model>"
kritisi security --service openrouter --path ./contracts/MyContract.sol

Keys, models, and endpoints can also be stored in the user-local file ~/.config/kritisi/config.json (or $XDG_CONFIG_HOME/kritisi/config.json):

kritisi setkey --service openrouter
kritisi setmodel --service openrouter
kritisi setkey --service openai
kritisi setmodel --service deepseek

The config directory is created with mode 0700 and the file with mode 0600. KRITISI_CONFIG_PATH can select a different user-local path for automation. Keep that file outside source control.

Library usage

The package's public library entrypoint is the package root (dist/library.js at build time). It exports the provider classes OpenRouter, OpenAI, Claude, and DeepSeek; createProvider; provider/config helpers (getProviderConfig, getOpenRouterConfig, normalizeProvider, loadKey, saveKey, saveModel, saveBaseUrl, CONFIG_PATH); and local utilities including parseSecurityReport, generatePDF, and saveFile.

CommonJS:

const {
  OpenRouter,
  OpenAI,
  Claude,
  DeepSeek,
  createProvider,
  getProviderConfig,
  parseSecurityReport,
} = require('kritisi');

const provider = createProvider('openrouter');
const config = getProviderConfig('openrouter');

TypeScript/ES modules can import the same named exports:

import { createProvider, parseSecurityReport } from 'kritisi';

Constructing a provider or reading configuration does not make a network request. Calling a provider's run method requires the relevant API key and makes a request to its configured endpoint.

Audit response

The selected provider must return JSON in this shape for security:

{
  "high": [{ "issue": "...", "suggestion": "...", "code_highlight": "..." }],
  "medium": [],
  "low": []
}

HTTP failures, invalid JSON, and invalid response shapes are reported without writing a PDF.

Development and validation

npm ci
npm run build
npm test -- --runInBand
node dist/index.js help
node dist/index.js --version
npm pack --dry-run
npm publish --dry-run

The automated tests and release validation are network-free. They do not claim live provider testing; run any provider smoke test only with credentials intentionally supplied in the environment, without printing credentials or full API responses.

License

MIT; see LICENSE.