Audacity CLI
A stateful command-line interface for audio editing, following the same patterns as the GIMP and Blender CLIs in this repo.
Architecture
- JSON project format tracks state (tracks, clips, effects, labels, selection)
- Python stdlib (
wave,struct,math) handles WAV I/O and audio processing - Click provides the CLI framework with subcommand groups and REPL
- Effects are recorded in the project JSON and applied during export/render
Install
pip install click numpy # numpy only needed for tests
No other dependencies required. Core functionality uses only Python stdlib.
Run
# From the agent-harness/ directory:
cd /root/cli-anything/audacity/agent-harness
# One-shot commands
python3 -m cli.audacity_cli project new --name "My Podcast"
python3 -m cli.audacity_cli track add --name "Voice"
python3 -m cli.audacity_cli clip add 0 /path/to/recording.wav
python3 -m cli.audacity_cli effect add normalize --track 0
python3 -m cli.audacity_cli export render output.wav
# JSON output mode (for agent consumption)
python3 -m cli.audacity_cli --json project info
# Interactive REPL
python3 -m cli.audacity_cli repl
Run Tests
cd /root/cli-anything/audacity/agent-harness
# All tests
python3 -m pytest cli/tests/ -v
# Unit tests only (no real audio files)
python3 -m pytest cli/tests/test_core.py -v
# E2E tests (generates real WAV files)
python3 -m pytest cli/tests/test_full_e2e.py -v
Command Groups
| Group | Commands |
|---|---|
project |
new, open, save, info, settings, json |
track |
add, remove, list, set |
clip |
import, add, remove, trim, split, move, list |
effect |
list-available, info, add, remove, set, list |
selection |
set, all, none, info |
label |
add, remove, list |
media |
probe, check |
export |
presets, preset-info, render |
session |
status, undo, redo, history |
Example Workflow
# Create a podcast project
python3 -m cli.audacity_cli project new --name "Episode 1" -o project.json
# Add tracks
python3 -m cli.audacity_cli --project project.json track add --name "Host"
python3 -m cli.audacity_cli --project project.json track add --name "Guest"
python3 -m cli.audacity_cli --project project.json track add --name "Music"
# Import audio clips
python3 -m cli.audacity_cli --project project.json clip add 0 host_recording.wav
python3 -m cli.audacity_cli --project project.json clip add 1 guest_recording.wav --start 0.5
python3 -m cli.audacity_cli --project project.json clip add 2 music.wav --volume 0.3
# Apply effects
python3 -m cli.audacity_cli --project project.json effect add normalize --track 0 -p target_db=-3.0
python3 -m cli.audacity_cli --project project.json effect add compress --track 0 -p threshold=-20 -p ratio=4.0
python3 -m cli.audacity_cli --project project.json effect add fade_in --track 2 -p duration=2.0
# Add labels
python3 -m cli.audacity_cli --project project.json label add 0.0 --text "Intro"
python3 -m cli.audacity_cli --project project.json label add 30.0 -e 60.0 --text "Main discussion"
# Export
python3 -m cli.audacity_cli --project project.json export render episode1.wav --preset wav
Metadata
Release files for cli-anything-audacity 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cli_anything_audacity-1.0.0.tar.gz | 45.1 kB | Without provenance | Details for cli_anything_audacity-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cli_anything_audacity-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for cli_anything_audacity-1.0.0-py3-none-any.whl |
Total release size: 99.2 kB
Release files / cli_anything_audacity-1.0.0.tar.gz
| Download URL | cli_anything_audacity-1.0.0.tar.gz |
|---|---|
| Size | 45.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
586955e63817f1b59b5cb13f0b0fd116f2759adec6b270e493c756e1dde4646c
|
|
BLAKE2b-256 checksum How to use checksums |
e5f1eae5250cb0e35b9a34c3aa6e3129caa664f3b552d0192ace4bbb5a83bae4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.12
|
Release files / cli_anything_audacity-1.0.0-py3-none-any.whl
| Download URL | cli_anything_audacity-1.0.0-py3-none-any.whl |
|---|---|
| Size | 54.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d71091b55bfdc850b320e6a8e2b602a3e5ce4b9f1abad66bb760002f654166aa
|
|
BLAKE2b-256 checksum How to use checksums |
74cc8d269be094004989c4dc1f4759e5b5d6e12264939285b4b39957957db903
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.12
|
Security for cli-anything-audacity 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.