CLI Commands
The joel command-line tool provides various commands for working with JOEL.
Command Overview
joel <command> [options]Commands
run
Run a JOEL file in interpreted mode.
joel run <file.joel>Examples:
# Run a simple program
joel run hello.joel
# Run with relative path
joel run examples/hello.joel
# Run with absolute path
joel run /path/to/program.joelOutput:
🚀 JOEL Runtime - Mode: Interpreted
[Program output]build
Build a JOEL file for a specific target.
joel build <file.joel> [--target <target>] [--optimize] [--debug] [--arch <arch>]Options:
--target, -t- Target platform (default:native)native- Native binary (LLVM IR)wasm32- WebAssemblyevm- Ethereum Virtual Machinewasm-solana- Solana WASMios- iOS frameworkandroid- Android librarycosmos- Cosmos SDK contractpolkadot- Polkadot/Substrate runtime
--optimize, -O- Enable optimizations--debug, -g- Enable debug symbols and source maps--arch <arch>- Target architecture (x86_64, arm64, riscv64)
Examples:
# Build for native
joel build app.joel --target native
# Build with optimizations
joel build app.joel --target native --optimize
# Build with debug symbols
joel build app.joel --target native --debug
# Build for specific architecture
joel build app.joel --target native --arch arm64
# Build for WebAssembly with source maps
joel build app.joel --target wasm32 --debug
# Build smart contract
joel build contract.joel --target evm
# Build optimized and debug-enabled
joel build app.joel --target native --optimize --debug
# Build for iOS
joel build app.joel --target ios --arch arm64
# Build for Android
joel build app.joel --target android --arch aarch64
# Build Cosmos contract
joel build contract.joel --target cosmos
# Build Polkadot runtime
joel build runtime.joel --target polkadotversion
Show version information.
joel versionOutput:
JOEL Language v0.1.0
A polymodal programming languageCommand-Line Options
Global Options
--help, -h- Show help message--version, -V- Show version (same asjoel version)
Examples
Basic Workflow
# 1. Create a file
echo '[Interpreted]
fn main() {
print("Hello")
}
main()' > hello.joel
# 2. Run it
joel run hello.joel
# 3. Build it (when compilation is ready)
joel build hello.joel --target nativeDevelopment Workflow
# Run in interpreted mode for fast iteration
joel run app.joel
# Build for production
joel build app.joel --target native
# Build for web
joel build app.joel --target wasm32Error Messages
File Not Found
❌ Error reading file: No such file or directorySolution: Check the file path and ensure the file exists.
Missing Header
❌ Error: missing [Compiled] or [Interpreted] header
Add [Interpreted] or [Compiled] at the top of your fileSolution: Add [Interpreted] or [Compiled] at the top of your JOEL file.
Runtime Error
❌ Runtime error: [error message]Solution: Check the error message and fix the issue in your code.
Toolchain Commands
JOEL includes specialized toolchains for different domains. See the Toolchain Overview for complete documentation:
- joelsql - SQL operations and database management
- joelui - UI component compilation
- joelctl - Container and infrastructure management
- joelpkg - Package and dependency management
- flow - Workflow execution and management
- dstore - Decentralized storage operations
- ai - AI/ML model training and inference
Getting Help
# Show help
joel --help
# Show version
joel version
# Show command help
joel run --help
joel build --help