Overview
The Soul CLI provides a comprehensive set of commands for developing, building, and managing Soul applications. This guide covers all available commands and their usage.Global Flags
These flags can be used with any Soul command:Core Commands
soul run - Execute Soul Programs
Run Soul source code directly without compilation:
Run Command Details
Run Command Details
Features:
- Executes Soul programs immediately without creating binaries
- Auto-installs missing packages by scanning imports
- Validates that exactly one
genesis()function exists - Creates temporary executable for execution
- Supports path aliases defined in
soul.json
- Must have exactly one
genesis()function with no parameters - All dependencies must be available or auto-installable
soul build - Compile Soul Programs
Compile Soul source code into standalone executables:
Build Command Details
Build Command Details
Features:
- Creates self-contained executable binaries
- Embeds source code in the executable
- Auto-installs missing packages before compilation
- Validates package dependencies
- Output binary has same name as source file (without extension)
- Standalone executable that doesn’t require Soul runtime
- Can be distributed and run on systems without Soul installed
Version Management
soul version - Check Version
Display the current Soul version:
soul update - Update Soul
Update Soul to the latest version:
Update Process
Update Process
How it works:
- Fetches latest version from GitHub releases
- Downloads platform-specific archive (macOS, Linux, Windows)
- Extracts and replaces current Soul binary
- Automatically handles ARM64 and AMD64 architectures
- Creates backup and rolls back on failure
Package Management
Soul includes a comprehensive package management system accessed through thepkg subcommands.
soul pkg init - Initialize Package
Create a new Soul package with soul.json manifest:
soul.json file with:
soul pkg install - Install Dependencies
- Install All
- Install Package
- Install Local
Install all dependencies from
soul.json:soul pkg list - List Available Packages
View all packages in the Soul package registry:
- Package names with latest versions
- Package descriptions and categories
- All available versions
- Total package count
soul pkg search - Search Packages
Search for packages by name, description, or keywords:
- Package names
- Descriptions
- Keywords
- Categories
soul pkg validate - Validate Dependencies
Check package dependencies and version constraints:
- Soul version compatibility
- All dependency version constraints
- Package compatibility across the project
- Displays dependency summary with installed versions
soul pkg tidy - Tidy Dependencies
Automatically manage dependencies based on imports:
- Creates
soul.jsonif it doesn’t exist - Scans all
.soulfiles for import statements - Extracts and adds package dependencies
- Updates existing
soul.jsonwith new dependencies - Ignores relative imports and file paths
soul pkg clear-cache - Clear Cache
Clear package cache to force fresh downloads:
- Package download cache
- Temporary installation files
- Shows freed disk space in human-readable format
Program Structure
Genesis Function
Every Soul program must have exactly onegenesis() function as the entry point:
Configuration
Project Configuration (soul.json)
Complete example of a soul.json file:
Error Handling
Soul CLI provides detailed error messages and validation:Genesis Function Errors
Genesis Function Errors
- Missing genesis function
- Multiple genesis functions
- Genesis function with parameters
- Genesis function validation across multiple files
Dependency Errors
Dependency Errors
- Missing packages
- Version constraint conflicts
- Soul version compatibility issues
- Invalid package specifications
Build Errors
Build Errors
- Source file not found
- Compilation failures
- Permission issues
- Disk space issues

