@azertica/azt-cli
v1.0.11
Published
AZT Build Tool - Unified build and deployment tool for Azertica projects
Maintainers
Readme
AZT CLI - Azertica Build Tool
AZT (Azertica Build Tool) is a comprehensive command-line interface tool designed to standardize and streamline the development workflow for all projects within Azertica company. It provides a unified interface for building, testing, deploying, and managing multi-language projects through a single azt.yaml configuration file.
🚀 Features
Core Commands
- Project Management: Initialize, create, and manage projects
- Build System: Intelligent building with caching and incremental builds
- Testing: Multi-framework test execution with coverage reporting
- Development Server: Hot-reload development servers for various project types
- Code Quality: Linting and formatting with auto-fix capabilities
- Deployment: Support for Docker, Kubernetes, and AWS ECS deployments
- Workspace Management: Multi-project workspace coordination
- Cache Management: Intelligent build caching for faster builds
- Plugin System: Extensible architecture with custom plugins
Supported Project Types
- JavaScript/TypeScript: Node.js, React, Vue, Angular, Next.js
- Java: Maven, Gradle, Spring Boot
- Python: pip, poetry, Django, Flask
- Go: Go modules, Gin, Echo
- Rust: Cargo projects
- C#/.NET: .NET Core, ASP.NET
- Ruby: Bundler, Rails
- PHP: Composer, Laravel
- Swift: Swift Package Manager
- Kotlin: Gradle, Maven
📦 Installation
Homebrew (macOS/Linux)
# Add the Azertica tap
brew tap azertica/tap
# Install AZT CLI
brew install azt
# Verify installation
azt --versionNPM (Cross-platform)
# Global installation
npm install -g @azertica/azt-cli
# Verify installation
azt --versionDirect Download
# Download and install (macOS/Linux)
curl -sSL https://install.azt.dev | bash
# Or download specific version
curl -sSL https://github.com/azertica/azt-cli/releases/latest/download/install.sh | bashManual Installation
- Download the latest release from GitHub Releases
- Extract the archive
- Add the binary to your PATH
🏁 Quick Start
Initialize a New Project
# Create a new directory
mkdir my-project && cd my-project
# Initialize AZT configuration
azt init
# Or initialize with a specific template
azt init --template react
azt init --template spring-boot
azt init --template python-flaskBasic Commands
# Install dependencies
azt install
# Start development server
azt dev
# Build the project
azt build
# Run tests
azt test
# Run linting
azt lint
# Format code
azt format
# Clean build artifacts
azt cleanWorkspace Management
# Create a new workspace
azt workspace create my-workspace
# Add projects to workspace
azt workspace add ./frontend
azt workspace add ./backend
azt workspace add ./shared
# Build all projects in workspace
azt build --workspace
# Get workspace information
azt workspace info📋 Configuration
AZT uses a azt.yaml configuration file in your project root:
version: "1.0"
name: "my-project"
type: "javascript"
description: "My awesome project"
# Build configuration
build:
commands:
- "npm run build"
artifacts:
- "dist/**"
cache:
enabled: true
ttl: 3600000 # 1 hour in milliseconds
exclude:
- "node_modules/**"
- "*.log"
# Development server
dev:
command: "npm run dev"
port: 3000
host: "localhost"
watch:
- "src/**"
env:
NODE_ENV: "development"
# Testing configuration
test:
command: "npm test"
coverage:
enabled: true
threshold: 80
formats: ["lcov", "html"]
frameworks:
- "jest"
# Linting and formatting
lint:
command: "npm run lint"
autoFix: true
files:
- "src/**/*.{js,ts,jsx,tsx}"
format:
command: "npm run format"
files:
- "src/**/*.{js,ts,jsx,tsx}"
# Deployment configurations
deploy:
environments:
staging:
type: "docker"
registry: "your-registry.com"
image: "my-project:staging"
dockerfile: "Dockerfile.staging"
production:
type: "kubernetes"
cluster: "production-cluster"
namespace: "default"
manifests:
- "k8s/deployment.yaml"
- "k8s/service.yaml"
# Environment-specific configurations
environments:
development:
build:
profile: "dev"
env:
NODE_ENV: "development"
DEBUG: "true"
production:
build:
profile: "prod"
optimize: true
env:
NODE_ENV: "production"
# Custom scripts
scripts:
setup: "npm install && npm run build"
deploy-staging: "azt build && azt deploy staging"
full-test: "azt lint && azt test && azt build"
# Plugin configuration
plugins:
- "@azertica/azt-plugin-docker"
- "@azertica/azt-plugin-aws"🔧 Command Reference
Core Commands
azt init [options]
Initialize a new AZT project
--template <name>: Use a specific project template--force: Overwrite existing configuration--interactive: Interactive setup mode
azt build [options]
Build the project
--profile <name>: Use specific build profile--watch: Watch for changes and rebuild--parallel: Enable parallel builds--no-cache: Disable build caching
azt test [options]
Run tests
--coverage: Generate coverage report--watch: Watch mode for continuous testing--pattern <glob>: Run specific test patterns--ci: Optimize for CI environments
azt dev [options]
Start development server
--port <number>: Specify port number--host <address>: Specify host address--open: Open browser automatically--env <name>: Use specific environment
azt install [options]
Install project dependencies
--production: Install only production dependencies--dev: Install only development dependencies--force: Force reinstall all dependencies
azt clean [options]
Clean build artifacts and cache
--cache: Clean only cache--artifacts: Clean only build artifacts--all: Clean everything including dependencies
azt lint [options]
Run code linting
--fix: Automatically fix issues--format <format>: Output format (json, table, etc.)--files <pattern>: Lint specific files
azt format [options]
Format code
--check: Check if files are formatted--files <pattern>: Format specific files--dry-run: Preview changes without applying
Workspace Commands
azt workspace create <name>
Create a new workspace
azt workspace add <path>
Add a project to the current workspace
azt workspace remove <path>
Remove a project from the workspace
azt workspace info
Show workspace information
azt workspace build [options]
Build all projects in the workspace
--parallel: Build projects in parallel--dependency-order: Build in dependency order
Cache Commands
azt cache --info
Show cache information and statistics
azt cache --clear
Clear all cache entries
azt cache --prune [days]
Remove cache entries older than specified days (default: 30)
Deployment Commands
azt deploy <environment> [options]
Deploy to specified environment
--dry-run: Preview deployment without executing--rollback: Rollback to previous deployment--wait: Wait for deployment completion
Plugin Commands
azt plugin list
List installed plugins
azt plugin install <name>
Install a plugin
azt plugin uninstall <name>
Uninstall a plugin
azt plugin update [name]
Update plugins (or specific plugin)
Utility Commands
azt debug [options]
Debug and troubleshooting tools
--report: Generate diagnostic report--enable: Enable debug mode--disable: Disable debug mode
azt performance [options]
Performance monitoring and analysis
--show: Show performance metrics--benchmark: Run performance benchmarks
azt logs [options]
View and manage logs
--show: Show recent logs--clear: Clear log files--level <level>: Filter by log level
🔌 Plugin System
AZT supports a rich plugin ecosystem for extending functionality:
Official Plugins
@azertica/azt-plugin-docker: Enhanced Docker support@azertica/azt-plugin-aws: AWS deployment and services@azertica/azt-plugin-kubernetes: Advanced Kubernetes features@azertica/azt-plugin-monitoring: Application monitoring integration
Creating Custom Plugins
// my-plugin.js
module.exports = {
name: 'my-plugin',
version: '1.0.0',
commands: [
{
name: 'my-command',
description: 'My custom command',
execute: async (args, options) => {
console.log('Executing my custom command');
}
}
],
hooks: [
{
event: 'before:build',
handler: async (context) => {
console.log('Before build hook');
}
}
]
};🏗️ Project Templates
AZT includes built-in templates for quick project setup:
Frontend Templates
react: React application with TypeScriptvue: Vue.js application with TypeScriptangular: Angular applicationnext: Next.js applicationsvelte: Svelte application
Backend Templates
node-express: Node.js with Expressnode-fastify: Node.js with Fastifyspring-boot: Spring Boot applicationdjango: Django applicationflask: Flask applicationgo-gin: Go with Gin frameworkrust-actix: Rust with Actix Web
Full-Stack Templates
mern: MongoDB, Express, React, Node.jsmean: MongoDB, Express, Angular, Node.jsdjango-react: Django backend with React frontendspring-react: Spring Boot backend with React frontend
🚀 CI/CD Integration
GitHub Actions
name: Build and Test
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18'
- name: Install AZT CLI
run: npm install -g @azertica/azt-cli
- name: Install dependencies
run: azt install
- name: Run linting
run: azt lint
- name: Run tests
run: azt test --coverage --ci
- name: Build project
run: azt build
- name: Deploy to staging
if: github.ref == 'refs/heads/main'
run: azt deploy stagingGitLab CI
stages:
- install
- test
- build
- deploy
variables:
NODE_VERSION: "18"
before_script:
- npm install -g @azertica/azt-cli
install:
stage: install
script:
- azt install
cache:
paths:
- node_modules/
- .azt/cache/
test:
stage: test
script:
- azt lint
- azt test --coverage --ci
coverage: '/Coverage: \d+\.\d+%/'
build:
stage: build
script:
- azt build
artifacts:
paths:
- dist/
deploy:
stage: deploy
script:
- azt deploy production
only:
- main🔧 Troubleshooting
Common Issues
Command Not Found
# Check if AZT is installed
which azt
# Reinstall if necessary
npm uninstall -g @azertica/azt-cli
npm install -g @azertica/azt-cliConfiguration Errors
# Validate configuration
azt debug --report
# Check configuration syntax
azt init --dry-runBuild Failures
# Clear cache and rebuild
azt clean --all
azt install
azt build
# Enable debug mode for detailed logs
azt debug --enable
azt buildPermission Issues
# Fix npm permissions (macOS/Linux)
sudo chown -R $(whoami) ~/.npm
sudo chown -R $(whoami) /usr/local/lib/node_modulesDebug Mode
Enable debug mode for detailed logging:
azt debug --enable
# Run your commands
azt debug --disableGetting Help
# General help
azt --help
# Command-specific help
azt build --help
azt test --help
# Generate diagnostic report
azt debug --report🤝 Contributing
We welcome contributions! Please see our Contributing Guide for details.
Development Setup
# Clone the repository
git clone https://github.com/azertica/azt-cli.git
cd azt-cli
# Install dependencies
npm install
# Build the project
npm run build
# Run tests
npm test
# Link for local development
npm linkRunning Tests
# Run all tests
npm test
# Run specific test suites
npm test -- --testPathPatterns="cache"
npm test -- --testPathPatterns="build"
# Run tests in watch mode
npm test -- --watch
# Generate coverage report
npm test -- --coverage🆘 Support
🗺️ Roadmap
- [ ] Web-based dashboard for project management
- [ ] Integration with more cloud providers (Azure, GCP)
- [ ] Advanced monitoring and analytics
- [ ] Mobile app for project monitoring
- [ ] AI-powered optimization suggestions
- [ ] Multi-language documentation
- [ ] Enterprise features (SSO, RBAC, audit logs)
Made with ❤️ by the Azertica Team
