A CLI tool by Treblle that minifies OpenAPI V3 specification files by up to 80% by removing redundant information irrelevant to AI agents and LLMs. Version 1.0.2 runs on Node >=18, ships TypeScript types, and supports JSON & YAML input/output with three presets (max, balanced, min). Key differentiator: reduces token usage for LLMs while preserving essential API details for integration.
npm install openapi-minifierNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Programmatic usage: read OpenAPI spec, minify with 'max' preset, write output.
Upgrade Node to v18 or later.
Use --preset balanced or --keep-descriptions all if documentation is needed.
Specify --format yaml if YAML output is desired.
Check source code or use --no-analytics if available (verify).
Convert your spec to OpenAPI 3.x first (e.g., using api-spec-converter) and ensure valid syntax.
Run via npx openapi-minifier or install globally: npm install -g openapi-minifier.
Ensure input is valid JSON or use --format yaml for YAML files.
No dependency data recorded yet.