Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.supermodeltools.com/llms.txt

Use this file to discover all available pages before exploring further.

Strips comments, removes blank lines, and shortens local identifiers to produce token-efficient source code that remains syntactically valid and semantically identical (all tests still pass). Supports Go, Python, TypeScript, JavaScript, and Rust. For a single file, compacted output is written to stdout. For a directory, files are written to --output (default: ./compacted/). Aliases: pack, minify

Synopsis

supermodel compact [path] [flags]

Flags

FlagDescription
-o, --outputOutput directory for directory mode (default compacted)
--dry-runPrint stats without writing files
-h, --helpHelp for compact

Examples

# Single file → stdout
supermodel compact internal/api/client.go

# Whole repo → ./compacted/
supermodel compact .

# See savings without writing
supermodel compact --dry-run .