Skip to main content

audx.json

init creates audx.json at your project root. add and theme create it too if it’s missing.
audx.json
string
default:"minimal"
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.
string
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.
string
Override the theme registry URL. You rarely need this outside local development of audx itself.

Registry

The CLI loads built-in themes from https://audx.site/api. Override it with the AUDX_REGISTRY environment variable, which takes priority over registry in audx.json:
If the registry can’t be reached, 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 the CI environment variable is set or when you pass --yes. Without prompts it uses defaults:
  • init writes the default directory and theme (or --dir and --theme) and adds the starter sounds.
  • add needs 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:
  • theme records where the sound came from, so update checks the right theme.
  • custom: true marks a sound customized on audx.site. theme and update skip these unless you pass --force to theme.
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.