Complete guide to the Aeonmi command-line interface for quantum computing and .ai language development.
- Getting Started
- Project Commands
- File Commands
- Development Commands
- Quantum Commands
- Vault Commands
- Shell & Interactive
- Global Options
Build the Aeonmi CLI:
cargo build --releaseThe binary will be available as:
target/release/aeonmi_shard.exe(main executable)target/release/aeonmi.exe(CLI alias)
aeonmi <COMMAND> [OPTIONS]Get help:
aeonmi --help
aeonmi <COMMAND> --helpCommands for managing Aeonmi projects defined by Aeonmi.toml manifests.
Description: Build an Aeonmi project and generate bundle artifacts.
Usage:
aeonmi build [OPTIONS]Options:
--release- Build with optimizations (release profile)--manifest-path <FILE>- Use a custom manifest file path
Examples:
# Build in debug mode (default)
aeonmi build
# Build optimized release version
aeonmi build --release
# Build with custom manifest
aeonmi build --manifest-path /path/to/Aeonmi.tomlOutput:
- Creates
target/debug/[project-name].bundle.json(ortarget/release/) - Bundle contains package metadata and compiled module index
Description: Validate project syntax and semantics without producing artifacts.
Usage:
aeonmi check [OPTIONS]Options:
--manifest-path <FILE>- Use a custom manifest file path
Examples:
# Check current project
aeonmi check
# Check specific manifest
aeonmi check --manifest-path /path/to/Aeonmi.tomlWhat it checks:
- All
.aisource files parse correctly - Required
fn mainentry point exists - Module imports are valid
- No syntax errors
Description: Run project test suite (inline tests and tests/ directory).
Usage:
aeonmi test [OPTIONS]Options:
--release- Run tests in release mode--manifest-path <FILE>- Use a custom manifest file path--filter <SUBSTRING>- Only run tests whose name contains this filter
Examples:
# Run all tests
aeonmi test
# Run only tests matching "addition"
aeonmi test --filter addition
# Run tests in release mode
aeonmi test --release
# Run specific test file with filter
aeonmi test --filter arithmeticTest Discovery:
- Inline tests:
test test_name:blocks in source modules - Project tests: All
.aifiles intests/directory
Output Format:
ok - test_name
ok - group::test_name
FAILED - failed_test
reason: assertion failed
test result: ok. 4 passed; 0 failed
Description: Execute the project's main function. When invoked without an input file, runs the project defined by Aeonmi.toml.
Usage:
aeonmi run [OPTIONS]Options (project mode):
--release- Execute using release profile--manifest-path <FILE>- Use a custom manifest file path
Examples:
# Run the project
aeonmi run
# Run with release optimizations
aeonmi run --release
# Run custom manifest project
aeonmi run --manifest-path /path/to/Aeonmi.tomlBehavior:
- Builds the project if needed
- Executes
fn mainfrom the entry point - Loads all modules defined in manifest
Commands for working with individual .ai files (not project-based).
Description: Compile a single .ai file to various output formats.
Usage:
aeonmi emit <INPUT> [OPTIONS]Positional Arguments:
<INPUT>- Input file path (.aior.qube)
Options:
--emit <FORMAT>/--format <FORMAT>- Output format (default:js)js- JavaScript codeai- Canonical Aeonmi form
-o, --out <FILE>- Output file path (default:output.jsoroutput.ai)--tokens- Dump token stream (debug)--ast- Dump abstract syntax tree (debug)--debug-titan- Enable Titan debug mode--watch- Watch file for changes and recompile
Examples:
# Compile to JavaScript
aeonmi emit demo.ai --emit js -o demo.js
# Compile to canonical AI form
aeonmi emit demo.ai --emit ai -o demo.ai
# Debug: show tokens and AST
aeonmi emit demo.ai --tokens --ast
# Watch mode (recompile on changes)
aeonmi emit demo.ai --watchDescription: Execute a single .ai file directly.
Usage:
aeonmi run <INPUT> [OPTIONS]Positional Arguments:
<INPUT>- Input.aifile to execute
Options:
--out <FILE>- Intermediate output file path--watch- Watch and re-run on file changes--native- Force native VM execution (no JavaScript)--bytecode- Use bytecode VM (requiresbytecodefeature)--emit-ai <FILE>- Additionally emit canonical AI form--opt-stats- Print optimization statistics (bytecode mode)--opt-stats-json- Emit optimization stats as JSON--disasm- Disassemble compiled bytecode
Environment Variables:
AEONMI_NATIVE=1- Enable native VM modeAEONMI_BYTECODE=1- Enable bytecode VM mode
Examples:
# Run file (uses Node.js if available)
aeonmi run demo.ai
# Force native VM execution
aeonmi run demo.ai --native
# Use bytecode VM with optimization stats
aeonmi run demo.ai --bytecode --opt-stats
# Watch mode (re-run on changes)
aeonmi run demo.ai --watch
# Emit AI form and run
aeonmi run demo.ai --emit-ai output.ai --nativeDescription: Format .ai files according to Aeonmi style guidelines.
Usage:
aeonmi format <INPUTS>... [OPTIONS]Positional Arguments:
<INPUTS>...- One or more.aifiles to format
Options:
--check- Check formatting without modifying files
Examples:
# Format files in place
aeonmi format src/main.ai src/engine.ai
# Check formatting (CI mode)
aeonmi format --check src/**/*.aiDescription: Lint .ai files for code quality issues.
Usage:
aeonmi lint <INPUTS>... [OPTIONS]Positional Arguments:
<INPUTS>...- One or more.aifiles to lint
Options:
--fix- Automatically fix issues where possible
Examples:
# Lint files
aeonmi lint src/main.ai
# Lint and auto-fix
aeonmi lint --fix src/**/*.aiCommands for inspecting and debugging code.
Description: Display the token stream for a file (lexical analysis).
Usage:
aeonmi tokens <INPUT>Positional Arguments:
<INPUT>- Input file to tokenize
Examples:
aeonmi tokens demo.aiOutput: Displays each token with its type and value.
Description: Display the abstract syntax tree (AST) for a file.
Usage:
aeonmi ast <INPUT>Positional Arguments:
<INPUT>- Input file to parse
Examples:
aeonmi ast demo.aiOutput: Pretty-printed AST structure showing the parse tree.
Description: Launch the integrated code editor / IDE.
Usage:
aeonmi edit [FILE]Positional Arguments:
[FILE]- Optional file to open (opens editor otherwise)
Examples:
# Launch editor
aeonmi edit
# Open specific file
aeonmi edit src/main.aiFeatures:
- Syntax highlighting for
.aifiles - Real-time error checking
- Integrated REPL
Description: Start an interactive Read-Eval-Print Loop for Aeonmi.
Usage:
aeonmi replExamples:
aeonmi replREPL Commands:
- Type Aeonmi expressions and see results immediately
- Multi-line input supported
- Access to full language features
Commands for quantum computing operations (requires quantum feature).
Description: Execute quantum circuits using various backends.
Usage:
aeonmi quantum <BACKEND> <FILE> [OPTIONS]Positional Arguments:
<BACKEND>- Quantum backend to use:simulator- Local Titan quantum simulatorqiskit- IBM Qiskit backend (Python bridge)cloud- Cloud quantum hardware (requires credentials)
<FILE>- Aeonmi file containing quantum circuit code
Options:
--shots <N>- Number of measurement shots (default: 1024)
Examples:
# Run on local simulator
aeonmi quantum simulator quantum_demo.ai
# Run on Qiskit backend
aeonmi quantum qiskit quantum_demo.ai --shots 2048
# Execute on cloud hardware
aeonmi quantum cloud entanglement.aiCircuit Export:
- Automatically converts Aeonmi AST to OpenQASM 2.0
- Dispatches to selected backend
- Returns measurement results
Requirements:
- Qiskit backend: Python 3.x with
qiskitpackage installed - Cloud backend: Valid API credentials
Commands for managing encrypted quantum vaults (requires quantum-vault feature).
Description: Initialize a new quantum vault.
Usage:
aeonmi vault init [OPTIONS]Options:
--path <DIR>- Vault directory path--algorithm <ALG>- Encryption algorithm (default:kyber)
Examples:
# Initialize vault in default location
aeonmi vault init
# Custom vault location
aeonmi vault init --path ~/my-vaultDescription: Store data in the vault.
Usage:
aeonmi vault store <KEY> <VALUE>Positional Arguments:
<KEY>- Unique identifier for the data<VALUE>- Data to store (encrypted)
Examples:
aeonmi vault store quantum-key "secret data"Description: Retrieve data from the vault.
Usage:
aeonmi vault retrieve <KEY>Positional Arguments:
<KEY>- Key to retrieve
Examples:
aeonmi vault retrieve quantum-keyDescription: Rotate vault encryption keys.
Usage:
aeonmi vault rotateExamples:
aeonmi vault rotateNote: Automatically re-encrypts all vault data with new keys.
Description: Launch the Neon Shard interactive shell - an integrated environment for Aeonmi development.
Usage:
aeonmi shellFeatures:
- Interactive command-line environment
- File system operations
- Quantum circuit visualization
- Mother AI integration (if enabled)
Important: The Aeonmi shell has its own command set and does NOT support standard cargo or aeonmi commands. Exit the shell to use those commands.
When inside the Aeonmi shell (aeonmi shell), use these commands:
pwd - Print working directory
⟦AEONMI⟧ › pwd
cd [dir] - Change directory
⟦AEONMI⟧ › cd /path/to/project
⟦AEONMI⟧ › cd ..
⟦AEONMI⟧ › cd ~
ls [dir] - List directory contents
⟦AEONMI⟧ › ls
⟦AEONMI⟧ › ls src/
mkdir <path> - Create directory
⟦AEONMI⟧ › mkdir new-project
mv <src> <dst> - Move/rename files
⟦AEONMI⟧ › mv old.ai new.ai
cp <src> <dst> - Copy files or directories
⟦AEONMI⟧ › cp template.ai project.ai
cat <file> - Display file contents
⟦AEONMI⟧ › cat main.ai
rm <path> - Remove file or directory
⟦AEONMI⟧ › rm old-file.ai
edit [--tui] [FILE] - Open editor
⟦AEONMI⟧ › edit main.ai
⟦AEONMI⟧ › edit --tui main.ai # TUI mode
compile <file.ai> [OPTIONS] - Compile Aeonmi file
Options:
--emit js|ai- Output format--out FILE- Output path--no-sema- Disable semantic analysis
⟦AEONMI⟧ › compile demo.ai --emit js --out output.js
⟦AEONMI⟧ › compile demo.ai --emit ai
run <file.ai> [OPTIONS] - Execute file (JavaScript path by default)
Options:
--native- Use native VM execution--out FILE- Output path
⟦AEONMI⟧ › run demo.ai
⟦AEONMI⟧ › run demo.ai --native
⟦AEONMI⟧ › run demo.ai --native --out temp.js
native-run <file.ai> [--out FILE] - Legacy alias for native VM execution
⟦AEONMI⟧ › native-run demo.ai
qsim <file.ai> [OPTIONS] - Run quantum simulation
Options:
--shots NUM- Number of measurement shots--backend titan|qiskit- Backend to use
⟦AEONMI⟧ › qsim quantum_demo.ai
⟦AEONMI⟧ › qsim quantum_demo.ai --shots 2048 --backend qiskit
qstate - Display quantum system information
⟦AEONMI⟧ › qstate
qgates - Show available quantum gates
⟦AEONMI⟧ › qgates
qexample [name] - Run quantum examples
⟦AEONMI⟧ › qexample
⟦AEONMI⟧ › qexample bell-state
help - Show shell help
⟦AEONMI⟧ › help
exit - Quit the shell
⟦AEONMI⟧ › exit
- ✅ Interactive exploration
- ✅ Quick file operations
- ✅ Running single
.aifiles - ✅ Quantum circuit experiments
- ✅ Learning and prototyping
- ✅ Project builds (
aeonmi build) - ✅ Running test suites (
aeonmi test) - ✅ CI/CD pipelines
- ✅ Cargo integration
- ✅ Production workflows
Outside Shell (standard terminal):
# Build the Aeonmi toolchain
cargo build --release
# Work with projects
cd my-project
aeonmi build
aeonmi test
aeonmi runInside Shell (after running aeonmi shell):
⟦AEONMI⟧ › cd my-project
⟦AEONMI⟧ › compile main.ai --emit js
⟦AEONMI⟧ › run main.ai --native
⟦AEONMI⟧ › qsim quantum.ai --backend titan
⟦AEONMI⟧ › exit
Note: To run project commands like aeonmi build or aeonmi test, you must exit the shell first
Options that work with all commands:
Override the default configuration file location.
Default Locations:
- Windows:
%APPDATA%\aeonmi\config.toml - Unix:
~/.config/aeonmi/config.toml
Example:
aeonmi --config /custom/config.toml buildEnable Titan library debug output (overrides config).
Example:
aeonmi --debug-titan run demo.aiDisable semantic analysis during compilation.
Example:
aeonmi --no-sema emit demo.aiEnable pretty-printed error messages with color and context.
Example:
aeonmi --pretty-errors checkAeonmi supports conditional compilation with Cargo features:
full-suite- All features enabledminimal- Minimal feature set (default)quantum- Quantum computing supportmother-ai- Mother AI consciousness integrationtitan-libraries- Titan mathematical librariesholographic- 3D holographic visualizationvoice- Voice interfacequantum-vault- Encrypted quantum vaultqiskit- Qiskit Python bridgebytecode- Bytecode VM executiondebug-metrics- Performance metrics collection
# Build with specific features
cargo build --features quantum,bytecode
# Build with all features
cargo build --features full-suite
# Run with features
cargo run --features quantum -- quantum simulator demo.aiRequired for project commands (build, check, test, run).
Example:
[package]
name = "my-project"
version = "0.1.0"
[aeonmi]
entry = "src/main.ai" # Entry point (default: src/main.ai)
modules = [ # Additional modules to include
"src/engine.ai",
"src/logic.ai"
]
tests = [ # Optional: explicit test files
{ name = "unit", path = "tests/unit.ai" }
]project/
├── Aeonmi.toml # Project manifest
├── src/
│ ├── main.ai # Entry point (must have fn main)
│ ├── engine.ai # Module 1
│ └── logic.ai # Module 2
└── tests/
└── arithmetic.ai # Auto-discovered tests
# 1. Create new project
mkdir my-project
cd my-project
# 2. Create manifest
cat > Aeonmi.toml << EOF
[package]
name = "my-project"
version = "0.1.0"
[aeonmi]
entry = "src/main.ai"
EOF
# 3. Create source files
mkdir src
cat > src/main.ai << EOF
fn main:
print "Hello, Aeonmi!"
EOF
# 4. Check syntax
aeonmi check
# 5. Run tests
aeonmi test
# 6. Build project
aeonmi build
# 7. Execute
aeonmi run# 1. Write quantum circuit
cat > bell_state.ai << EOF
fn create_bell_state:
qubit q1
qubit q2
hadamard q1
cnot q1, q2
measure q1
measure q2
EOF
# 2. Test locally
aeonmi quantum simulator bell_state.ai
# 3. Run on Qiskit
aeonmi quantum qiskit bell_state.ai --shots 4096# Quick script execution
aeonmi run script.ai
# Compile to JavaScript
aeonmi emit script.ai --emit js -o output.js
# Watch mode for development
aeonmi run script.ai --watch --native0- Success1- General error2- Compilation error3- Test failure4- Missing entry point
AEONMI_NATIVE=1- Force native VM executionAEONMI_BYTECODE=1- Enable bytecode VMRUST_LOG=debug- Enable debug loggingNO_COLOR=1- Disable colored output
- Use
--releasefor production builds and benchmarks - Enable
bytecodefeature for faster execution - Use
--opt-statsto identify optimization opportunities
- Use
--watchduring development for instant feedback - Enable
--pretty-errorsfor better error messages - Run
aeonmi checkfrequently (it's fast!)
- Organize tests in the
tests/directory for auto-discovery - Use
--filterto run specific test subsets during development - Inline tests in modules for unit testing
- Use
aeonmi tokensto debug lexical issues - Use
aeonmi astto understand parse structure - Enable
--debug-titanfor Titan library debugging
aeonmi <command> --helpaeonmi --version- Build guide:
build.md - Language guide:
docs/Aeonmi_Language_Guide.md - Architecture:
MOTHER_AI_ARCHITECTURE.md
Solution: Create a manifest file or use --manifest-path
Solution: Add a fn main: function to your entry point file
Solution:
# Install Qiskit
pip install qiskit
# Verify qiskit_runner.py is in project root
ls qiskit_runner.pySolution: Build with required features:
cargo build --features quantum,bytecodeAeonmi CLI v1.0.0-quantum-consciousness