Skip to content

axle init

Terminal window
axle init [--force] [--dry-run]

Adds Axle to the repository you run it in. Before Axle is installed, run it through your package manager:

Terminal window
pnpm dlx @axle-rs/axle init

It:

  • writes an axle.toml at the root with the #:schema line, since Axle needs no other settings to start
  • adds @axle-rs/axle to the root package.json’s devDependencies, unless it’s already a dependency
  • adds .axle/ to .gitignore, unless it’s listed
Created axle.toml
Updated package.json
Updated .gitignore
Next, run pnpm install to install Axle.

Then install, as it says, with the repository’s package manager:

Terminal window
pnpm install

package.json and .gitignore keep their formatting, comments and line endings; only the new lines change. Axle writes all the files or none, so a file it can’t write leaves everything as it was.

Option What it does
--force replaces an axle.toml that is already there; without it, one is an error
--dry-run prints the changes as a diff and writes nothing