azu version
The azu version command displays version information about Azu CLI and its dependencies.
Overview
azu version [options]Basic Usage
# Show version information
azu version
# Show version with verbose output
azu version --verboseOptions
--verbose, -v
Show detailed version information
false
Examples
Basic Version Information
$ azu version
Azu CLI v0.0.1+13
Crystal 1.15.1
Topia CLI Framework
Plugins:
- Generator Plugin v1.0.0
- Database Plugin v1.0.0
- Development Plugin v1.0.0Verbose Version Information
$ azu version --verbose
Azu CLI v0.0.1+13
Crystal 1.15.1
Topia CLI Framework
Plugins:
- Generator Plugin v1.0.0
- Database Plugin v1.0.0
- Development Plugin v1.0.0
System Information:
- OS: macOS 14.0
- Architecture: arm64
- Crystal Version: 1.15.1
- LLVM Version: 16.0.0Version Information Details
Azu CLI Version
The version follows semantic versioning (SemVer) format:
Major version: Breaking changes
Minor version: New features (backward compatible)
Patch version: Bug fixes (backward compatible)
Build number: Development builds (e.g.,
+13)
Crystal Version
Shows the Crystal programming language version used to compile Azu CLI:
Version: Crystal language version
LLVM: Underlying LLVM version
Architecture: Target architecture
Plugin Versions
Lists all loaded plugins and their versions:
Generator Plugin: Code generation functionality
Database Plugin: Database management commands
Development Plugin: Development server and tools
Use Cases
Development Environment
# Check if you have the latest version
azu version
# Compare with latest release
# Visit: https://github.com/azutoolkit/azu_cli/releasesTroubleshooting
# Check version compatibility
azu version
# Report version information in bug reports
azu version --verbose > version-info.txtCI/CD Integration
# In CI scripts
VERSION=$(azu version | head -1 | cut -d' ' -f3)
echo "Building with Azu CLI $VERSION"Version Compatibility
Crystal Version Requirements
Azu CLI requires specific Crystal versions:
0.0.1+13
1.15.0+
Current stable
0.0.1+12
1.14.0+
Previous stable
0.0.1+11
1.13.0+
Legacy support
Plugin Compatibility
Plugins are versioned independently:
Generator Plugin: Compatible with Azu CLI 0.0.1+
Database Plugin: Compatible with Azu CLI 0.0.1+
Development Plugin: Compatible with Azu CLI 0.0.1+
Troubleshooting
Version Mismatch
# If you see version conflicts
crystal --version
azu version
# Update Crystal if needed
# Follow Crystal installation guidePlugin Issues
# Check plugin versions
azu version
# Reinstall plugins if needed
azu plugin install --forceBuild Issues
# Check Crystal version compatibility
crystal --version
azu version
# Rebuild if needed
crystal build src/azu_cli.crIntegration Examples
Version Checking Script
#!/bin/bash
# check-version.sh
CURRENT_VERSION=$(azu version | head -1 | cut -d' ' -f3)
REQUIRED_VERSION="0.0.1+13"
if [ "$CURRENT_VERSION" != "$REQUIRED_VERSION" ]; then
echo "Version mismatch: $CURRENT_VERSION != $REQUIRED_VERSION"
exit 1
fi
echo "Version check passed: $CURRENT_VERSION"CI/CD Version Validation
# .github/workflows/version-check.yml
name: Version Check
on: [push, pull_request]
jobs:
version-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Crystal
uses: oprypin/install-crystal@v1
with:
crystal-version: 1.15.1
- name: Install Azu CLI
run: make install
- name: Check Version
run: |
azu version
VERSION=$(azu version | head -1 | cut -d' ' -f3)
echo "Azu CLI version: $VERSION"Development Environment Setup
# setup-dev.sh
echo "Setting up development environment..."
# Check Crystal version
crystal --version
# Install Azu CLI
make install
# Verify installation
azu version
echo "Development environment ready!"Best Practices
1. Version Pinning
# Pin specific version in CI/CD
VERSION="0.0.1+13"
azu version | grep -q "$VERSION" || exit 12. Version Reporting
# Include version in logs
echo "$(date): Azu CLI $(azu version | head -1)" >> app.log3. Compatibility Checking
# Check compatibility before operations
CRYSTAL_VERSION=$(crystal --version | head -1 | cut -d' ' -f2)
if [[ "$CRYSTAL_VERSION" < "1.15.0" ]]; then
echo "Crystal version $CRYSTAL_VERSION is not supported"
exit 1
fi4. Version Documentation
# Document versions in README
echo "## Requirements" >> README.md
echo "- Azu CLI: $(azu version | head -1)" >> README.md
echo "- Crystal: $(crystal --version | head -1)" >> README.mdRelated Commands
Help Command - Get help information
Generate Command - Generate code
Database Commands - Database management
Serve Command - Development server
The version command is essential for debugging, compatibility checking, and environment validation in Azu CLI applications.
Next Steps:
Help Command - Learn about getting help
Installation Guide - Install Azu CLI
Quick Start Guide - Get started quickly
Last updated