axonml-cli
Overview
axonml-cli is the official command-line interface for the AxonML machine learning framework. The binary is named axonml and ships a single clap-derived subcommand tree that covers the full ML workflow: project scaffolding, training, evaluation, model conversion, quantization, dataset tooling, GPU management, benchmarking, an embedded terminal UI, optional inference server, optional Weights & Biases integration, dashboard/API-server lifecycle control, and (under the server-sync feature) authenticated sync with a running axonml-server.
Last updated: 2026-04-16 — version 0.6.1.
Features
-
Project Management — Create new projects (
new), initialize existing directories (init), and generate Rust training-project scaffolds (scaffold generate/scaffold templates). -
Training & Evaluation — Train from a config file (
train), resume from a checkpoint (resume), evaluate a model (eval), run single-input prediction (predict), and produce HTML/JSON/text reports (report). -
Model Operations — Convert between formats (
convert), export for deployment targets (export), inspect architecture (inspect), quantize to Q4/Q5/Q8/F16/F32 viaquant convert, and introspect/benchmark quant levels (quant info,quant benchmark,quant list). -
Data Management — Upload, analyze, list, configure, preview, and validate datasets (
data {upload,analyze,list,config,preview,validate}). -
Deployment — Optional REST inference server (
serve, requires--features serve) plus dashboard/server lifecycle (start,stop,status,logs). -
Integrations — Kaggle dataset search/download (
kaggle), optional Weights & Biases config (wandb, requires--features wandb), and pretrained-model hub (hub). -
Terminal UI —
axonml tuilaunches theaxonml-tuiRatatui interface with an optional model/dataset preloaded. -
GPU Support —
gpu list,gpu info,gpu select,gpu bench,gpu memory,gpu statusoverwgpu-based device detection. -
Server Sync — With
--features server-sync:login,logout, andsynctalk to a liveaxonml-serverover HTTPS to mirror training runs, models, and datasets between CLI and web interface. -
Bundling —
zip create/extract/listfor model+dataset bundles;rename model|datafor safe renames;uploadfor pushing a model file into a workspace directory;load {model,data,both,status,clear}andanalyze {model,data,both,report}for workspace-scoped inspection;bench {model,inference,compare,hardware}for performance sweeps.
Binary
The crate produces a single binary:
[[]]
= "axonml"
= "src/main.rs"
There is no axon alias target; users who want a shorter name should add a shell alias (alias axon='axonml').
Modules
| Module | Description |
|---|---|
cli |
Top-level clap derive definitions (the full subcommand tree lives here) |
commands |
Per-subcommand execute functions under commands::{new,init,train,resume,eval,predict,convert,export,inspect,report,serve,wandb,upload,data,scaffold,zip,rename,quant,load,analyze,bench,gpu,tui,kaggle,hub,dataset,dashboard,sync} |
config |
Project configuration file parsing (TOML/JSON via serde/toml) |
error |
CliError / CliResult types |
api_client |
HTTP client for server-sync (feature-gated on server-sync) |
Installation
Install from crates.io:
Or build from source:
The produced binary is target/release/axonml.
Cargo features
Defined in Cargo.toml:
default = ["wandb", "kaggle", "dataset-api", "hub-download", "server-sync"]serve— enables theservesubcommand (pulls intokio+axum)wandb— enables thewandbsubcommand groupkaggle— enables Kaggle HTTP client used bykaggle search/downloaddataset-api— remote dataset listing/downloadshub-download— HTTP downloads of pretrained weightsserver-sync— enableslogin,logout,syncand theapi_clientmodule (pulls inreqwest+tokio)
Command Reference
All commands below are defined in src/cli.rs and dispatched in src/main.rs.
| Command | Description |
|---|---|
new |
Create a new AxonML project |
init |
Initialize AxonML in existing directory |
train |
Train a model from configuration |
resume |
Resume training from checkpoint |
eval |
Evaluate model performance |
predict |
Make predictions with trained model |
convert |
Convert models between formats |
export |
Export models for deployment |
inspect |
Inspect model architecture |
report |
Generate evaluation reports (HTML/JSON/text/all) |
serve |
Start inference server (feature: serve) |
wandb |
W&B integration (feature: wandb) |
upload |
Upload a model file into a workspace |
data |
Dataset management subcommands |
scaffold |
Generate Rust training projects |
zip |
Create/extract/list model+dataset bundles |
rename |
Rename models and datasets |
quant |
Quantize, inspect, or benchmark quant levels |
load |
Load models/datasets into workspace |
analyze |
Comprehensive analysis and reports |
bench |
Benchmark models and hardware |
gpu |
GPU detection and management |
tui |
Launch the terminal user interface |
kaggle |
Kaggle dataset integration |
hub |
Pretrained model hub |
dataset |
Dataset management (NexusConnectBridge) |
start |
Start dashboard and API server |
stop |
Stop running services |
status |
Check service status |
logs |
View service logs |
login |
Login to AxonML server (feature: server-sync) |
logout |
Logout from AxonML server (feature: server-sync) |
sync |
Check/perform sync with server (feature: server-sync) |
Usage
Project Commands
# Create a new AxonML project
# Initialize AxonML in an existing directory
# Generate a Rust training project scaffold
Training Commands
# Train a model from configuration
# Resume training from a checkpoint (requires --data)
# Evaluate model performance
# Make predictions
Model Commands
# Inspect model architecture
# Convert model formats (ferrite / onnx / safetensors)
# Export for deployment
# Quantize model (Q4_0, Q4_1, Q5_0, Q5_1, Q8_0, F16, F32)
# Inspect or benchmark quant levels
# Generate evaluation report
Data Commands
# Analyze a dataset
# Upload and configure dataset
# Validate dataset structure
# Preview dataset samples
# Generate preprocessing config
Workspace Commands
# Load model into workspace
# Load dataset into workspace
# Load both at once
# Workspace status / clear
# Analyze loaded model/dataset
# Generate comprehensive report
Benchmarking
# Benchmark model performance
# Benchmark at different batch sizes
# Compare multiple models
# Benchmark hardware capabilities
GPU Management
Hub & Kaggle Integration
# Pretrained model hub
# Kaggle
Note: kaggle login writes credentials to ~/.kaggle/kaggle.json with Unix mode 0600 and deliberately does not echo the API key (or username) back to stdout to keep it out of shell history / CI logs. Run axonml kaggle status after login to confirm.
Dataset (NexusConnectBridge)
Server Sync (CLI <-> Webapp, feature server-sync)
# Login to AxonML server (defaults to http://localhost:3021)
# Check sync status or force re-sync
# Logout and clear stored credentials
Dashboard & Server
# Start dashboard and API server (default: API on 3000, dashboard on 8080)
# Start only the API server, in foreground
# Check service status
# View logs
# Stop services (SIGTERM; use --force for SIGKILL)
Bundles, rename, upload, TUI
# Create / extract / list bundles
# Rename
# Upload a model file into a workspace directory
# Launch TUI
Weights & Biases (feature wandb)
Inference Server (feature serve)
Configuration
The CLI uses axonml.toml for project configuration. Example:
[]
= "my-ml-project"
= "0.1.0"
= "My machine learning project"
[]
= 50
= 32
= 0.001
= "cuda:0"
= 1
= "./output"
= 4
[]
= "adam"
= 0.0001
= 0.9
= 0.999
[]
= "cosine"
= 50
= 0.00001
= 5
[]
= "resnet18"
= 10
= 0.1
[]
= "./data/train"
= "./data/val"
= 0.1
= true
= true
= true
Global Options
# Enable verbose output (global flag)
# Suppress all output except errors (global flag)
Tests
# Unit tests
# Integration tests (uses assert_cmd / predicates)
License
Licensed under either of:
- MIT License
- Apache License, Version 2.0
at your option.