Getting Started

Installation

Install AxilJS 0.3.6: requirements (Node.js 20+), run the CLI with npx or install it globally, verify the version and create your first project.

2 min readUpdated DocumentationEdit this page
On this page6

AxilJS is a set of @axiljs/* npm packages plus the axil command-line tool from @axiljs/cli. The current release is 0.3.6; all packages move in lockstep on the same version line.

Requirements

RequirementVersion
Node.js20 or newer (AxilJS is developed on Node.js 24)
npmthe version bundled with your Node.js
TypeScriptinstalled per project: every project generated by axil create has its own typescript devDependency

Note

You do not need a global TypeScript install. Every project generated by axil create ships typescript, @types/node, @axiljs/cli, @axiljs/testing and @axiljs/studio as devDependencies.

Option 1: run the CLI with npx

No install needed. npx downloads the CLI and starts the interactive create flow:

❯npx @axiljs/cli create
❯pnpm dlx @axiljs/cli create
❯yarn dlx @axiljs/cli create
❯bunx @axiljs/cli create

On a terminal the project name is optional: the CLI asks for it as step 1. You can also pass it directly:

❯npx @axiljs/cli create my-api
❯pnpm dlx @axiljs/cli create my-api
❯yarn dlx @axiljs/cli create my-api
❯bunx @axiljs/cli create my-api

Tip

If npx runs an older CLI than you expect, ask for the latest release explicitly: npx @axiljs/cli@latest create. See Troubleshooting.

Option 2: install the CLI globally

❯npm install -g @axiljs/cli
❯pnpm add -g @axiljs/cli
❯yarn global add @axiljs/cli
❯bun add -g @axiljs/cli

This puts two equivalent binaries on your PATH: axil and axiljs.

Verify the installation:

Terminal
❯axil --version
Output
TXT
@axiljs/cli v0.3.6

Show every command:

Terminal
❯axil --help

Update the CLI

Terminal
❯npm install -g @axiljs/cli@latest
❯axil --version

Inside a generated project @axiljs/cli is also a devDependency, so npm run dev (which runs axil run) and npm test (which runs axil test) use the project's own copy even without a global install.

Add packages to an existing project

Each package can be installed on its own:

❯npm install @axiljs/core @axiljs/config @axiljs/validation
❯pnpm add @axiljs/core @axiljs/config @axiljs/validation
❯yarn add @axiljs/core @axiljs/config @axiljs/validation
❯bun add @axiljs/core @axiljs/config @axiljs/validation

or through the CLI, which adds the packages to package.json and then runs npm install:

Terminal
❯axil install @axiljs/queue
❯axil install -D @axiljs/testing

The database drivers are optional peer dependencies of @axiljs/orm; install only the one you use: pg, mysql2 or better-sqlite3.

Next steps

Was this page helpful?

Help improve the documentation

AxilJS is open source and documentation improvements are welcome.

AxilJS DocumentationMIT License · Built by SyntaxilitY