# Installation

Install Axle in a repository and check that it works.

Axle works the same with pnpm, npm, Yarn, Bun, nub and aube. pnpm is shown first; pick your package manager once and every page follows.

## Install it in a repository

[`axle init`](https://axlers.dev/docs/reference/init.md) adds Axle to a repository you have, with an `axle.toml` and a line in `.gitignore`:

```sh
pnpm dlx @axle-rs/axle init                     # pnpm
npx @axle-rs/axle init                          # npm
yarn dlx @axle-rs/axle init                     # Yarn
bunx @axle-rs/axle init                         # Bun
nub dlx @axle-rs/axle init                      # nub
aube dlx @axle-rs/axle init                     # aube
```

Or add it as a development dependency of the repository's root yourself:

```sh
pnpm add -D @axle-rs/axle                       # pnpm
npm install -D @axle-rs/axle                    # npm
yarn add -D @axle-rs/axle                       # Yarn
bun add --dev @axle-rs/axle                     # Bun
nub add -D @axle-rs/axle                        # nub
aube add -D @axle-rs/axle                       # aube
```

The package downloads the right prebuilt binary for your system, so you don't need Rust installed.

## Start a new monorepo

To start from nothing, create a monorepo with Axle already set up:

```sh
pnpm create axle                                # pnpm
npm create axle@latest                          # npm
yarn create axle                                # Yarn
bun create axle                                 # Bun
nub dlx create-axle                             # nub
aube create axle                                # aube
```

It asks where the monorepo goes, what you're building and which [template](https://axlers.dev/docs/getting-started/templates.md) to start from, such as Next.js with an Express API, then which package manager, linter, formatter and CI service to use. It installs the dependencies, adds the official plugins for the template's tools and makes the first commit. Then start every app's development server at once:

```sh
pnpm run dev                                    # pnpm
npm run dev                                     # npm
yarn run dev                                    # Yarn
bun run dev                                     # Bun
nub run dev                                     # nub
aube run dev                                    # aube
```

[`axle create`](https://axlers.dev/docs/reference/create.md) lists the flags that answer each question in advance.

## Download a binary instead

Each [GitHub release](https://github.com/axle-rs/axle/releases) has `axle` and `axle-server` for macOS, Linux and Windows, on x64 and Arm, in `axle-v<version>-<os>-<cpu>.tar.gz`. A `SHA256SUMS` file lists their checksums, and each archive's `THIRD-PARTY-LICENSES.md` lists the crates built into it.

Every archive, the `ghcr.io/axle-rs/axle-server` image and the VS Code extension carry a build provenance attestation, so you can check they were built from this repository by its release workflow:

```sh
gh attestation verify axle-v0.1.0-linux-x64.tar.gz --repo axle-rs/axle
gh attestation verify oci://ghcr.io/axle-rs/axle-server:0.1.0 --repo axle-rs/axle
```

The npm packages are published with provenance too, which `npm audit signatures` checks.

The binaries aren't signed with an Apple or Microsoft certificate. Installed through a package manager, they run as they are. Downloaded in a browser, macOS stops one it hasn't seen before: allow it in System Settings, under Privacy & Security, or clear the download flag with `xattr -d com.apple.quarantine axle`. Windows may show a SmartScreen warning: choose More info, then Run anyway.

## Check it works

```sh
pnpm exec axle --version                        # pnpm
npx axle --version                              # npm
yarn axle --version                             # Yarn
bunx axle --version                             # Bun
nubx axle --version                             # nub
aube exec axle --version                        # aube
```

To complete Axle's commands and options with Tab in your shell, see [`axle completion`](https://axlers.dev/docs/reference/completion.md).

Next, see what Axle finds in your repository: [add Axle to an existing repository](https://axlers.dev/docs/getting-started/add-to-existing-repository.md).
