CLI Reference
The irgo CLI provides commands for creating, developing, and building irgo applications.
Installation
go install github.com/stukennedy/irgo/cmd/irgo@latestCommands
irgo new
Create a new irgo project.
# Create new project in directoryirgo new myapp# Initialize in current directoryirgo new .This creates a complete project structure with:
- Entry points for mobile, desktop, and web
- Sample handlers and templates
- Tailwind 4 CSS setup (no config file needed)
- HTMX and hx-ws.js downloaded automatically
- Hot reload configuration via air
irgo dev
Start the development server with hot reload.
irgo devStarts a web server at http://localhost:8080 with automatic reload when Go or templ files change.
irgo run
Run the application for a specific platform.
# Desktopirgo run desktop # Run desktop appirgo run desktop --dev # With devtools enabled# iOSirgo run ios # Build and run on Simulatorirgo run ios --dev # Hot reload development# Androidirgo run android # Build and run on Emulatorirgo run android --dev # Hot reload developmentirgo build
Build the application for production.
# Desktopirgo build desktop # Current platformirgo build desktop macos # macOS .app bundleirgo build desktop windows # Windows .exeirgo build desktop linux # Linux binary# Mobileirgo build ios # iOS frameworkirgo build android # Android AARirgo build all # All mobile platformsirgo templ
Generate Go code from templ templates.
irgo templRuns templ generate to compile .templ files to _templ.go.
irgo install-tools
Install required development tools.
irgo install-toolsInstalls:
- templ - Template compiler
- air - Hot reload tool
- gomobile - Mobile compiler (if not installed)
irgo version
Print the irgo CLI version.
irgo versionirgo help
Show help for any command.
irgo helpirgo help buildirgo help runEnvironment Variables
| Variable | Description | Default |
|---|---|---|
IRGO_PORT | Dev server port | 8080 |
CGO_ENABLED | Required for desktop builds | 0 (must set to 1) |
ANDROID_HOME | Android SDK location | - |
ANDROID_NDK_HOME | Android NDK location | - |
Command Summary
| Command | Description |
|---|---|
irgo new <name> | Create new project |
irgo dev | Start dev server with hot reload |
irgo run desktop [--dev] | Run as desktop app |
irgo run ios [--dev] | Run on iOS Simulator |
irgo run android [--dev] | Run on Android Emulator |
irgo build desktop [platform] | Build desktop app |
irgo build ios | Build iOS framework |
irgo build android | Build Android AAR |
irgo build all | Build all mobile platforms |
irgo templ | Generate templ files |
irgo install-tools | Install dev dependencies |
irgo version | Print version |
irgo help [command] | Show help |
