AxilJS CLI Installation and Development Setup
Install the AxilJS CLI with npm, verify your environment, create an AxilJS project, update the CLI, and troubleshoot installation issues.
AxilJS CLI Installation
The AxilJS command-line interface is distributed through the @axiljs/cli npm package.
The CLI provides the axil command for creating and running AxilJS projects, inspecting the development environment, managing packages, and performing other application lifecycle tasks.
Requirements
Before installing the AxilJS CLI, make sure Node.js and npm are available on your system.
Check the installed versions:
The AxilJS CLI uses the Node.js runtime to execute CLI commands.
Install the AxilJS CLI
Install @axiljs/cli globally with npm:
A global installation makes the axil command available from any terminal location.
After installation, verify that the command is available:
Verify the CLI Installation
Check the installed AxilJS CLI version:
You should see the version of the installed CLI.
You can also display the available AxilJS CLI commands:
This is useful for confirming that the CLI is installed correctly and for discovering available commands.
Update the AxilJS CLI
If the CLI is already installed globally, update it to the latest published version:
Verify the updated installation:
Checking the version after an update confirms which CLI release is currently available in your terminal.
Create an AxilJS Project
Once the CLI is installed, create a new AxilJS application with:
Move into the generated project directory:
Install the project's dependencies:
Start the AxilJS development server:
The complete setup flow is:
Check the AxilJS Environment
Use the built-in doctor command to inspect your AxilJS project environment:
The diagnostic command is particularly useful when troubleshooting project setup or CLI-related issues.
Run it from the root of your AxilJS project.
Global CLI vs Project Dependencies
The AxilJS CLI is installed globally:
Application dependencies are installed inside the individual AxilJS project:
This separates the system-wide CLI from application-specific dependencies.
The global CLI can therefore be used to create and manage projects, while each project maintains its own dependency installation.
Reinstall the AxilJS CLI
If the global CLI installation becomes corrupted or behaves unexpectedly, remove the existing installation:
Then install it again:
Verify the installation:
A reinstall provides a clean global CLI installation while leaving the dependencies inside your existing projects unchanged.