Skip to content

Getting started

OptiPrune is a static code analyzer for TypeScript and JavaScript workspaces. It builds a graph from real entry points, package metadata, exports, dependencies, and project conventions, then returns findings with evidence and confidence.

Terminal window
npm install --save-dev @optiprune/cli

Run the current CLI entry point from the workspace root:

Terminal window
npx @optiprune/cli analyze
Terminal window
npm install @optiprune/core

Use Core directly when the integration needs a structured report, custom reporter, editor diagnostic, dashboard, or approval workflow.

Start with an explicit entry point and a dry run. The command reports planned changes without modifying files:

Terminal window
npx @optiprune/cli analyze --entry src/index.ts --dry-run

If your application has several roots, repeat --entry or pass multiple patterns. Review high-confidence findings first, then add configuration for generated files, external contracts, and framework conventions.

Read Quickstart for a five-minute workflow, Output for report formats, Configuration for schema-backed settings, and Headless Core API for programmatic integrations.