axle init
axle init [--force] [--dry-run]Adds Axle to the repository you run it in. Before Axle is installed, run it through your package manager:
pnpm dlx @axle-rs/axle initnpx @axle-rs/axle inityarn dlx @axle-rs/axle initbunx @axle-rs/axle initnub dlx @axle-rs/axle initaube dlx @axle-rs/axle initIt:
- writes an
axle.tomlat the root with the#:schemaline, since Axle needs no other settings to start - adds
@axle-rs/axleto the rootpackage.json’sdevDependencies, unless it’s already a dependency - adds
.axle/to.gitignore, unless it’s listed
Created axle.tomlUpdated package.jsonUpdated .gitignore
Next, run pnpm install to install Axle.Then install, as it says, with the repository’s package manager:
pnpm installnpm installyarn installbun installnub installaube installpackage.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.
Options
Section titled “Options”| 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 |