Relocate the ~6k-file docs tree from the repo root into plugins/document-navigator/docs/ so the plugin is self-contained and portable. docs/superpowers/ (specs and plans) stays at the repo root. Moved via cp+rm rather than git mv because directory rename() fails with EPERM on this WSL /mnt DrvFs mount; git rename-detection pairs the identical-content files at commit time. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@suaveplan/audio-cli - Server-tier audio command-line tool: chainable pipeline grammar, batch glob processing, analysis JSON reports, codec conversion, info, play, record. Thin shell over @suaveplan/audio-core + audio-codecs + audio-engine-server.
Server-tier audio command-line tool. Thin shell over
@suaveplan/audio-core, @suaveplan/audio-codecs, and
@suaveplan/audio-engine-server: every audio transform delegates to the
universal layer; the CLI itself owns argument parsing, the pipeline grammar,
command dispatch, exit-code mapping, and SIGINT handling.
Documentation tree
- bin — This module is the
binshebang entry for thesuaveplan-audiocommand. It is the only file in the package with side…- bin — This module is the
binshebang entry for thesuaveplan-audiocommand. It is the only file in the package with side…
- bin — This module is the
- cli —
AudioCLIis the application-class wrapper for theaudiocommand-line tool. It owns the default codec registry, the…- cli —
AudioCLIis the application-class wrapper for theaudiocommand-line tool. It owns the default codec registry, the…
- cli —
- analyze —
runAnalyzeis the analysis pipeline entry. It loads an input file through theFileSourceAdapter, runs the requested… - batch —
runBatchis the bulk-processing entry point. It expands a glob pattern or a comma-separated list of explicit paths in… - convert —
runConvertis a deliberately thin wrapper aroundrunProcess. It validates the smallConvertOptionssurface (`form… - info —
runInfoproduces a one-shot metadata + statistics report for a file: sample rate, channel count, duration, total samp… - play —
runPlayplays a file through an injectedSpeakerAdapter. The CLI package intentionally carries no platform audio bi… - process —
runProcessis the engine of theaudio processand bare-op invocations. It loads the input file via `FileSourceAdapt… - record —
runRecordcaptures audio from an injectedMicrophoneAdapterfor a fixed duration and saves the resulting `AudioDocu… - error-codes — This module is the structured error and exit-code boundary for
@suaveplan/audio-cli. It defines the sixAUDIO_CLI.*…- error-codes — This module is the structured error and exit-code boundary for
@suaveplan/audio-cli. It defines the sixAUDIO_CLI.*…
- error-codes — This module is the structured error and exit-code boundary for
- pipeline — This module turns a CLI user's free-form pipeline expression into a typed
[opName, params]chain that the rest of the…- parser — This module turns a CLI user's free-form pipeline expression into a typed
[opName, params]chain that the rest of the…
- parser — This module turns a CLI user's free-form pipeline expression into a typed
Install
bun add @suaveplan/audio-cli
The suaveplan-audio bin is installed alongside the package.
CLI
suaveplan-audio --version
suaveplan-audio --help
# Process: load → ops → save
suaveplan-audio process input.wav output.flac --pipeline "trim 30s | normalize -16lufs"
# Batch: glob + shared pipeline
suaveplan-audio batch --input "tracks/*.mp3" --output processed/ --pipeline "normalize" --workers 4
# Analyze: produce a JSON report
suaveplan-audio analyze input.mp3 --bpm --key --lufs --output report.json
# Format conversion (no ops)
suaveplan-audio convert input.wav output.flac
# Print metadata + computeStats
suaveplan-audio info input.mp3
# Headless play (uses an injected SpeakerAdapter)
suaveplan-audio play input.wav
# Record silence (default mic) for N seconds
suaveplan-audio record out.wav --duration 60
Programmatic API
import { AudioCLI } from "@suaveplan/audio-cli";
const cli = new AudioCLI();
await cli.process("input.wav", "output.flac", { pipeline: "trim 30s | normalize" });
const report = await cli.analyze("input.mp3", { bpm: true, key: true, lufs: true });
Subpath exports for tree-shaken consumption:
@suaveplan/audio-cli/cli— theAudioCLIclass.@suaveplan/audio-cli/pipeline/parser—parsePipeline/validatePipeline.@suaveplan/audio-cli/error-codes—AUDIO_CLI_CODES,AudioCliError,EXIT_CODES,exitCodeFor.@suaveplan/audio-cli/commands/<command>— eachrunXentry.
Exit codes
Stable mapping from AUDIO_CLI.* codes onto Unix exit codes:
| Code | Exit |
|---|---|
AUDIO_CLI.INVALID_ARGS |
2 |
AUDIO_CLI.UNKNOWN_OP |
2 |
AUDIO_CLI.INPUT_NOT_FOUND |
3 |
AUDIO_CLI.BAD_OUTPUT |
4 |
AUDIO_CLI.PIPELINE_FAILED |
5 |
AUDIO_CLI.ABORTED |
130 |
0 is reserved for success. Any uncaught non-AudioCliError exits 1.
Quality
- Server-tier, Node.js >=22.
- 100/100/100/100 coverage on every implementation file.
- Zero mocks — tests drive the real CLI against real
mkdtemptemp files and the real@suaveplan/audio-engine-serveradapters.