Installation
This guide will help you install Azu CLI on your development machine. Azu CLI is distributed as a single binary and works on macOS, Linux, and Windows.
Prerequisites
Before installing Azu CLI, ensure you have the following prerequisites:
Crystal Language
Azu CLI requires Crystal 1.6.0 or higher.
macOS (using Homebrew):
brew install crystalUbuntu/Debian:
curl -fsSL https://packagecloud.io/84codes/crystal/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/84codes-crystal.gpg
echo "deb [signed-by=/usr/share/keyrings/84codes-crystal.gpg] https://packagecloud.io/84codes/crystal/ubuntu/ $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/84codes-crystal.list
sudo apt update
sudo apt install crystalArch Linux:
sudo pacman -S crystalFrom Source:
git clone https://github.com/crystal-lang/crystal.git
cd crystal
make clean crystalDatabase (Optional)
Azu applications typically use a database. Install one of the supported databases:
PostgreSQL (Recommended):
MySQL:
SQLite:
Installation Methods
Method 1: From Source (Recommended)
This is the most reliable method and ensures you get the latest version.
Clone the repository:
Install dependencies:
Build and install:
This will:
Compile the binary in release mode
Install it to
/usr/local/bin/azu(may requiresudo)Make it available system-wide
Verify installation:
Method 2: Using Make (Alternative)
If you prefer to build manually:
Clone and build:
Install manually:
Method 3: Symlink Installation (Development)
For development work where you want changes to be reflected immediately:
Clone and build:
Create symlink:
This creates a symlink from the built binary to /usr/local/bin/azu, so any changes you make to the source will be reflected immediately after rebuilding.
Method 4: Development Installation
For development or if you want to modify Azu CLI:
Clone the repository:
Install dependencies:
Build in development mode:
Add to PATH (optional):
Post-Installation Setup
1. Verify Installation
2. Configure Global Settings (Optional)
Create a global configuration file:
3. Set Up Database
If you're planning to use databases, ensure your database server is running:
PostgreSQL:
MySQL:
Troubleshooting
Common Issues
1. "azu: command not found"
Solution 1: Check if the binary is in your PATH:
Solution 2: Reinstall with proper permissions:
Solution 3: Add to PATH manually:
2. Permission Denied During Installation
3. Crystal Not Found
Ensure Crystal is properly installed and in your PATH:
4. Compilation Errors
Update your Crystal installation:
Clear shards cache and reinstall:
5. Database Connection Issues
Ensure your database service is running:
Getting Help
If you encounter issues during installation:
Check the logs during compilation for specific errors
Verify prerequisites are properly installed
Update Crystal to the latest version
Clear build cache:
make clean && make buildCreate an issue on GitHub with:
Your operating system and version
Crystal version (
crystal version)Full error output
Installation method used
Available Makefile Targets
The Azu CLI Makefile provides several useful targets:
make or make all
Build and create symlink (default)
make build
Build the binary only
make shard
Install dependencies and build
make install
Build and install binary to system
make link
Create symlink to built binary
make force_link
Force create symlink (overwrites existing)
make run
Run the built binary
make clean
Remove built binary
make distclean
Remove binary and all build artifacts
Examples
Updating Azu CLI
To update to the latest version:
Uninstalling
To remove Azu CLI:
If installed with make install
make installIf installed with make link
make linkComplete cleanup
Next Steps:
Quick Start Guide - Create your first Azu application
Project Structure - Understand Azu project organization
Command Reference - Learn all available commands
Last updated