MCPcopy Index your code
hub / github.com/daveshanley/vacuum

github.com/daveshanley/vacuum @v0.29.9

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.29.9 ↗ · + Follow
4,258 symbols 18,688 edges 519 files 1,283 documented · 30% 1 cross-repo links
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

vacuum

The world's fastest OpenAPI, AsyncAPI and JSON Schema linter.

build Go Report Card discord Docs npm Docker Pulls Mentioned in Awesome Go

An ultra-super-fast, lightweight OpenAPI, AsyncAPI and JSON Schema linter and quality checking tool inspired by Spectral.

It's fully compatible with existing Spectral rulesets.

Install using the official homebrew tap

brew install --cask daveshanley/vacuum/vacuum

Install using npm

npm i -g @quobix/vacuum

Install using yarn

yarn global add @quobix/vacuum

Install using curl

curl -fsSL https://quobix.com/scripts/install_vacuum.sh | sh

For CI/CD environments

To avoid GitHub API rate limiting in automated environments, set a GitHub token:

# Using repository token (GitHub Actions)
GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} curl -fsSL https://quobix.com/scripts/install_vacuum.sh | sh

# Using personal access token
GITHUB_TOKEN=your_github_token curl -fsSL https://quobix.com/scripts/install_vacuum.sh | sh

GitHub Actions example

- name: Install vacuum
  env:
    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}  # Increases rate limit from 60 to 5000 requests/hour
  run: |
    curl -fsSL https://quobix.com/scripts/install_vacuum.sh | sh

Note: The GitHub token prevents intermittent installation failures in CI/CD environments caused by API rate limiting. No additional permissions are required, the token only accesses public repository information.

Install using Docker

The image is available at: https://hub.docker.com/r/dshanley/vacuum

docker pull dshanley/vacuum

Multi-platform support: Docker images are available for both linux/amd64 and linux/arm64 architectures, including native ARM64 support for Apple Silicon Macs.

To run, mount the current working dir to the container and use a relative path to your spec, like so

docker run --rm -v $PWD:/work:ro dshanley/vacuum lint <your-openapi-spec.yaml>

Alternatively, you can pull it from GitHub packages. To do that, replace dshanley/vacuum with ghcr.io/daveshanley/vacuum in the above commands.

Run with Go

If you have Go 1.25 or newer installed, you can use go run to build and run it:

go run github.com/daveshanley/vacuum@latest lint <your-openapi-spec.yaml>

Upgrade vacuum

If vacuum was installed with Homebrew, npm, or the shell installer, run:

vacuum upgrade

vacuum will detect the install path and use the matching upgrade mechanism when it can. Normal commands may also show an update notice when a newer stable release is available. The passive check keeps only a small temporary cache in the OS temp directory, refreshed at most every 12 hours. Use --no-update-check or VACUUM_NO_UPDATE_CHECK=true to skip that check.


Sponsors

If your company is using vacuum, please consider supporting this project, like our very kind sponsors, past and present:

scalar

scalar

apideck'

apideck


Come chat with us

Need help? Have a question? Want to share your work? Join our discord and come say hi!

Documentation

🔥 New in v0.29 🔥: Lint AsyncAPI 3 documents in vacuum

AsyncAPI is now a first-class document type in vacuum, alongside OpenAPI and JSON Schema. Use the normal lint command and vacuum will detect AsyncAPI 3 documents automatically.


🔥 New in v0.28 🔥: Lint JSON Schema documents in vacuum

A new schema command has been added that opens up vacuum to JSON Schema specific linting rules and checks! With a whole new set of functions and rules, specifically for JSON Schema documents.

Try it out on your own JSON Schema docs! with vacuum schema


v0.27: Generate OpenAPI Documentation in vacuum

A new docs command will generate the best OpenAPI Documentation you ever saw! Now vacuum has integrated with the printing press, it means generating documentation with built-in linting results is available right inside vacuum.

Try it out! instead of the lint command try the docs command instead.


v0.25: Generate Open Collections from OpenAPI files

A new open-collection command will generate an Open Collection Workflow folder (or bundled file)

Open Collection is a new standard for defining and sharing API collections. vacuum supports it natively.

Read More


v0.24: TURBO MODE

A huge tune up of hundreds of systems across the stack has resulted in significant speed boosts and improved memory performance.

Spec Size v0.23 Turbo Speedup
petstore.yaml 21KB 0.03s 0.02s 33%
mistral.yaml 292KB 0.17s 0.10s 41%
neon.yaml 370KB 0.21s 0.08s 62%
ld.yaml 1.9MB 0.93s 0.31s 67%
plaid.yml 2.9MB 1.39s 0.53s 62%
stripe.yaml 6.1MB 3.11s 0.85s 73%

The bigger the spec, the faster vacuum runs!

New -T flag will enable turbo mode. Go ultra-fast!


v0.23: OpenAPI Overlay Support

Ever needed to tweak an OpenAPI spec for different environments without maintaining multiple copies?

Maybe swap out server URLs between dev, staging, and production? Or perhaps strip out internal endpoints before publishing the API docs?

OpenAPI Overlays are the answer. They let us make non-destructive modifications to specs using JSONPath expressions to target exactly what we want to change. vacuum now supports a new apply-overlay command.


v0.22: Async Functions / Promises, Fetch & Batch mode in Custom JS Functions

Do you want to call remote APIs in your vacuum javascript functions? What about async processing or the ability to use Promises?

vacuum now has its own event loop and will happily support async and await. Combined with a full implementation of Fetch.

Also added Batch Mode. This allows custom functions to receive the entire list of nodes, instead of firing the function for each result, so you can send all your data off to an API or an LLM, and have the ability parse and process everything at once vs individually.


Quick Start Guide 🚀

See all the documentation at https://quobix.com/vacuum


vacuum can suck all the lint of a 5mb API description in milliseconds.

Designed to reliably lint API descriptions, very, very quickly. Including very large ones. Spectral can be quite slow when used as an API a

Extension points exported contracts — how you extend this code

Core symbols most depended-on inside this repo

Shape

Function 2,984
Method 875
Struct 328
Class 24
Interface 19
TypeAlias 19
FuncType 9

Languages

Go98%
TypeScript2%

Modules by API surface

motor/rule_applicator_test.go153 symbols
motor/result_path_reconcile.go110 symbols
functions/openapi/schema_type_test.go101 symbols
rulesets/ruleset_functions.go69 symbols
model/utils_test.go52 symbols
utils/field_path_test.go47 symbols
functions/openapi/oas_schema.go44 symbols
utils/violation_differ_test.go43 symbols
motor/result_path_reconcile_test.go43 symbols
rulesets/rulesets_test.go41 symbols
utils/violation_differ.go40 symbols
rulesets/rulesets.go38 symbols

Used by 1 indexed graphs manifest dependencies, hub-wide

For agents

$ claude mcp add vacuum \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page