AIMatrix CLI - Technical Reference
AIMatrix CLI is the primary development interface for building, managing, and deploying AI agents and digital twins. This comprehensive technical reference provides complete documentation for developers and DevOps engineers.
Installation
System Requirements
Minimum Requirements:
- OS: Windows 10+, macOS 10.15+, Linux (Ubuntu 18.04+ LTS)
- Memory: 4GB RAM (8GB recommended)
- Storage: 2GB available space
- Network: Stable internet connection for cloud features
Supported Architectures:
- x86_64 (Intel/AMD 64-bit)
- ARM64 (Apple Silicon, ARM-based servers)
- ARMv7 (Raspberry Pi 4+)
Installation Methods
Automated Installation (Recommended)
macOS and Linux:
|
|
Windows (PowerShell):
|
|
Manual Installation
Download Binary:
|
|
Package Managers
Homebrew (macOS):
|
|
Chocolatey (Windows):
|
|
APT (Ubuntu/Debian):
|
|
YUM (CentOS/RHEL/Fedora):
|
|
Docker Container
|
|
Post-Installation Setup
|
|
Command Reference
Global Options
All commands support these global options:
|
|
Authentication Commands
amx auth
Manage authentication and authorization.
|
|
Workspace Management
amx init
Initialize a new AIMatrix workspace.
|
|
Workspace Structure Created:
my-project/
├── amx.yaml # Project configuration
├── agents/ # Agent definitions
│ └── example-agent.twinml
├── knowledge/ # Knowledge base files
│ ├── documents/
│ └── structured/
├── tests/ # Test files
│ └── agent-tests.yaml
├── scripts/ # Build and deployment scripts
│ ├── build.sh
│ └── deploy.sh
└── .amx/ # Local workspace settings
├── config.yaml
└── cache/
amx workspace
Manage workspace settings and operations.
|
|
Agent Development
amx agent
Create, manage, and deploy AI agents.
|
|
Advanced Agent Operations
|
|
Knowledge Management
amx knowledge
Manage knowledge bases and data sources.
|
|
Package Management
amx package
Manage packages, dependencies, and components.
|
|
Deployment Management
amx deploy
Deploy applications to various targets.
|
|
Configuration Management
amx config
Manage CLI and project configuration.
|
|
Development Tools
amx dev
Development and debugging utilities.
|
|
Monitoring and Debugging
amx logs
View and manage application logs.
|
|
amx status
Check system and application status.
|
|
Configuration
Configuration Files
Global Configuration (~/.amx/config.yaml
)
|
|
Project Configuration (amx.yaml
)
|
|
Environment Variables
AIMatrix CLI supports configuration via environment variables:
|
|
Advanced Features
Custom Templates
Creating Custom Templates
|
|
Using Custom Templates
|
|
Plugin Development
Creating CLI Plugins
|
|
Plugin Configuration
|
|
Installing Plugins
|
|
CI/CD Integration
GitHub Actions
|
|
GitLab CI/CD
|
|
Troubleshooting
Common Issues and Solutions
Installation Issues:
|
|
Authentication Issues:
|
|
Build Issues:
|
|
Deployment Issues:
|
|
Debug Mode
|
|
Performance Optimization
|
|
Technical Implementation Specifications
Architecture Overview
AIMatrix CLI is built on a modular architecture using Kotlin/Spring as the primary implementation stack:
|
|
Core Components
-
Command Engine (
com.aimatrix.cli.command
)- Command discovery and registration
- Argument parsing and validation
- Plugin system integration
- Error handling and recovery
-
Configuration Manager (
com.aimatrix.cli.config
)- Multi-layer configuration (global, project, environment)
- Configuration validation and migration
- Profile management
- Environment variable integration
-
Workspace Manager (
com.aimatrix.cli.workspace
)- Workspace initialization and validation
- Directory structure management
- Dependency resolution
- Build artifact management
-
Agent Manager (
com.aimatrix.cli.agent
)- Agent lifecycle management
- TwinML compilation and validation
- Runtime deployment coordination
- Performance monitoring integration
-
Package Manager (
com.aimatrix.cli.package
)- Dependency resolution and caching
- Package installation and updates
- Registry communication
- Version conflict resolution
Workspace Directory Structure Specification
<workspace-root>/
├── amx.yaml # Project configuration (required)
├── .amx/ # Local workspace metadata
│ ├── config.yaml # Local configuration overrides
│ ├── cache/ # Build and dependency cache
│ │ ├── packages/ # Downloaded packages
│ │ ├── builds/ # Build artifacts
│ │ └── metadata/ # Workspace metadata cache
│ ├── logs/ # Local development logs
│ └── state/ # Runtime state files
├── agents/ # Agent definitions (required)
│ ├── *.twinml # TwinML agent definitions
│ ├── configs/ # Agent-specific configurations
│ └── resources/ # Agent resources (models, data)
├── knowledge/ # Knowledge base sources
│ ├── documents/ # Document sources
│ │ ├── *.pdf, *.docx, *.txt
│ │ └── metadata.yaml # Document metadata
│ ├── structured/ # Structured data sources
│ │ ├── *.json, *.yaml, *.csv
│ │ └── schema.yaml # Data schema definitions
│ ├── apis/ # API source configurations
│ │ └── *.api.yaml # API endpoint definitions
│ └── graphs/ # Knowledge graph data
│ ├── *.ttl, *.n3, *.owl
│ └── ontology.yaml # Ontology definitions
├── tests/ # Test suites
│ ├── unit/ # Unit tests
│ │ └── *.test.yaml
│ ├── integration/ # Integration tests
│ │ └── *.integration.yaml
│ ├── load/ # Load testing scenarios
│ │ └── *.load.yaml
│ └── fixtures/ # Test data and fixtures
├── scripts/ # Build and deployment scripts
│ ├── build.sh # Custom build script
│ ├── deploy.sh # Custom deployment script
│ ├── migrate.sh # Data migration script
│ └── hooks/ # Git hooks and lifecycle scripts
├── deployments/ # Deployment configurations
│ ├── kubernetes/ # Kubernetes manifests
│ │ ├── *.yaml
│ │ └── kustomization.yaml
│ ├── docker/ # Docker configurations
│ │ └── Dockerfile
│ └── terraform/ # Infrastructure as code
│ ├── *.tf
│ └── terraform.tfvars
├── docs/ # Project documentation
│ ├── README.md
│ ├── API.md
│ └── deployment/
└── examples/ # Usage examples and samples
├── queries/
└── integrations/
Configuration File Formats
Extended Project Configuration (amx.yaml
)
|
|
Authentication and Credential Management
Token-Based Authentication
|
|
Credential Storage Format (~/.amx/tokens.yaml
)
|
|
Plugin and Extension Architecture
Plugin Interface Definition
|
|
Plugin Manifest Format (plugin.yaml
)
|
|
Error Handling and Diagnostics
Error Handling Framework
|
|
Performance Considerations
Performance Optimization Strategies
|
|
Security Patterns
Security Framework Implementation
|
|
Multi-Language SDK Support
SDK Generation Framework
|
|
This comprehensive technical documentation provides developers with everything needed to effectively use AIMatrix CLI for AI agent development, from basic installation to advanced CI/CD integration patterns.