Latest updateRead the latest release note →
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.
Choose your path
Section titled “Choose your path”| 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 |
Recommended learning route
Section titled “Recommended learning route”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.
Install the CLI
Section titled “Install the CLI”npm install --save-dev @optiprune/clinpx @optiprune/cli analyzeInstall the Core API
Section titled “Install the Core API”npm install @optiprune/coreimport { analyze } from "@optiprune/core";
const report = await analyze({ rootDir: process.cwd(), entry: ["src/index.ts"],});Official links
Section titled “Official links”| 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 |