audx.json
init creates audx.json at your project root. add and theme create it too if it’s missing.
audx.json
Where new sounds come from: a built-in theme name, a URL, or a path to a theme
.json file. audx theme <name> updates it.Where sound modules are written, relative to the project root. Defaults to
src/sounds if a src folder exists, then lib/sounds if lib exists, otherwise sounds.Override the theme registry URL. You rarely need this outside local development of audx itself.
Registry
The CLI loads built-in themes fromhttps://audx.site/api. Override it with the AUDX_REGISTRY environment variable, which takes priority over registry in audx.json:
list --themes falls back to the built-in theme names and says it’s offline.
How the CLI reads your project
Running in CI and scripts
The CLI only prompts when stdin and stdout are both terminals. It never prompts when theCI environment variable is set or when you pass --yes. Without prompts it uses defaults:
initwrites the default directory and theme (or--dirand--theme) and adds the starter sounds.addneeds sound names or--all.- Sounds that are already installed are skipped unless you pass
--overwrite.
Generated files
Each sound module starts with a header the CLI reads back:themerecords where the sound came from, soupdatechecks the right theme.custom: truemarks a sound customized on audx.site.themeandupdateskip these unless you pass--forcetotheme.
index.ts in the sounds directory is regenerated by add and remove. Don’t edit it by hand.
Sound names that are reserved words get a suffix: delete is exported as deleteSound.