Skip to content

Prove what your code uses.

Start with the CLI, integrate the Core API, and extend project knowledge with plugins.

OptiPrune is a static analyzer for TypeScript and JavaScript workspaces. The CLI (@optiprune/cli) is the ready-to-run command. The Core API (@optiprune/core) is the programmatic engine underneath it. Plugins add evidence for framework, tooling, runtime, and workspace conventions.

If you want to… Start here
Run a scan locally or in CI CLI
Embed analysis in an application or integration Core API
Understand reports and confidence Output and Confidence
Configure entries, rules, and plugins Configuration
Understand the engine Architecture
Build a framework or tool integration Plugins and Writing a plugin
Bring diagnostics into an editor Language Server and the VS Code extension

Start with the CLI and run one scan. Then read Output to understand the terminal, JSON, and SARIF shapes. If another program should own orchestration or presentation, move to the Core API. If the analyzer needs to understand a framework-specific convention, study how plugins work before writing a plugin with the authoring guide.

Terminal window
npm install --save-dev @optiprune/cli
npx @optiprune/cli analyze
Terminal window
npm install @optiprune/core
import { analyze } from "@optiprune/core";
const report = await analyze({
rootDir: process.cwd(),
entry: ["src/index.ts"],
});
Resource Link
GitHub organisation github.com/optiprune
Core repository github.com/optiprune/core
CLI repository github.com/optiprune/cli
CLI package @optiprune/cli on npm
Core package @optiprune/core on npm
VS Code extension OptiPrune on Visual Studio Marketplace