AxilJS Project Commands: Create, Run, Build, Test and Deploy
Use the AxilJS CLI to create projects, run the development server, build TypeScript applications, run tests, generate deployment files, install packages, diagnose issues, and manage CLI versions.
AxilJS Project Commands
The AxilJS CLI provides the primary commands for managing the AxilJS application lifecycle. You can create projects, run the development server, build TypeScript applications, execute tests, generate deployment artifacts, install packages, diagnose project issues, and inspect the installed CLI version.
All project commands are available through the axil command.
Create an AxilJS Project
Create a new AxilJS project with:
For example:
Move into the generated project directory:
Install the project dependencies:
Start the application:
A basic project creation workflow is:
Run the Development Server
Start the AxilJS development server with hot reload:
When no entry point is specified, the CLI uses the project's configured entry point.
The development server is intended for iterative development. After modifying application source code, the development environment can reload the application automatically.
Custom Entry Point
You can provide a custom TypeScript entry point:
This is useful when an application uses a custom source structure or entry module.
For example:
The custom entry point can then be started with:
Build an AxilJS Application
Compile the TypeScript application for production with:
Use axil build when preparing an AxilJS application for production deployment.
A typical build workflow is:
The build command is intended for the production compilation stage of the AxilJS application lifecycle.
Run Tests
Run the project's test files with:
You can optionally provide a test pattern:
For example:
A pattern can be used to target tests matching a particular name or pattern.
Generate Deployment Artifacts
Generate deployment artifacts with:
The deployment command generates Docker and Kubernetes configuration files for preparing an AxilJS application for deployment.
A typical production preparation workflow is:
Review the generated deployment files before using them in your target deployment environment.
Install Packages
Install an AxilJS package with:
For example:
The command provides a package installation workflow directly through the AxilJS CLI.
Packages can also be installed using npm:
Use standard npm installation when you need the normal npm package-management workflow.
Diagnose Project Issues
Use the doctor command to diagnose project and environment issues:
The command is useful when investigating problems related to:
- Project configuration
- Development environment
- Dependencies
- AxilJS CLI setup
- Application project state
For example:
Run axil doctor before investigating individual configuration files when an unexpected project or CLI issue occurs.
Check the CLI Version
Display the currently installed AxilJS CLI version:
This is useful when verifying which CLI release is being used, particularly when troubleshooting differences between development environments.
Display CLI Help
Display the available AxilJS CLI commands:
Command-specific help can also be requested where supported.
For example:
Command-specific help provides the available options and usage information for an individual command.
Complete AxilJS Project Workflow
A complete project setup and development workflow can start with:
After development, run the tests and prepare the production application:
If a project or environment issue occurs:
The complete lifecycle can be represented as:
Project Command Reference
| Command | Description |
|---|---|
axil create <name> | Create a new AxilJS project |
axil run | Start the development server with hot reload |
axil run <entry> | Start using a custom entry point |
axil build | Compile the TypeScript application for production |
axil test | Run project test files |
axil test <pattern> | Run tests matching a pattern |
axil deploy | Generate Docker and Kubernetes deployment files |
axil install <package> | Install an AxilJS package |
axil doctor | Diagnose project and environment issues |
axil --version | Display the installed CLI version |
axil --help | Display CLI help |
These project commands provide the core AxilJS CLI operations for creating, developing, testing, building, and preparing an application for deployment.