Skip to content

CLI Reference

Commands

axm-smelt compact

Compact input and print the result.

Text Only
axm-smelt compact [--file PATH] [--strategies LIST] [--preset NAME] [--output PATH]
Flag Default Description
--file PATH stdin Read from file instead of stdin
--strategies LIST Comma-separated strategy names
--preset NAME safe Named preset (safe, moderate, aggressive)
--output PATH stdout Write compacted text to file

Compacted text goes to stdout (or --output). Savings summary goes to stderr.

Exits with code 1 on unknown preset, unknown strategy, or missing file.

axm-smelt check

Analyze input without transforming it. Shows per-strategy savings estimates (only strategies with positive savings are listed).

Text Only
axm-smelt check [--file PATH]
Flag Default Description
--file PATH stdin Read from file instead of stdin

axm-smelt count

Count tokens in input.

Text Only
axm-smelt count [--file PATH] [--model MODEL]
Flag Default Description
--file PATH stdin Read from file instead of stdin
--model MODEL o200k_base tiktoken encoding name (e.g. o200k_base, cl100k_base) or OpenAI model name (e.g. gpt-4o, gpt-4)

A Claude model name (e.g. claude-opus-4-8) or an otherwise unknown name routes to the o200k_base proxy encoding (an approximation, no network call) rather than failing — never a len // 4 heuristic. For an exact Claude count, read usage.input_tokens from the run instead.

axm-smelt version

Print the version string.

Text Only
axm-smelt version

Python API

Auto-generated API reference is available under Python API.