CLI Reference

The irgo CLI provides commands for creating, developing, and building irgo applications.

Installation

go install github.com/stukennedy/irgo/cmd/irgo@latest

Commands

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:

irgo dev

Start the development server with hot reload.

irgo dev

Starts 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 development

irgo 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 platforms

irgo templ

Generate Go code from templ templates.

irgo templ

Runs templ generate to compile .templ files to _templ.go.

irgo install-tools

Install required development tools.

irgo install-tools

Installs:

irgo version

Print the irgo CLI version.

irgo version

irgo help

Show help for any command.

irgo helpirgo help buildirgo help run

Environment Variables

VariableDescriptionDefault
IRGO_PORTDev server port8080
CGO_ENABLEDRequired for desktop builds0 (must set to 1)
ANDROID_HOMEAndroid SDK location-
ANDROID_NDK_HOMEAndroid NDK location-

Command Summary

CommandDescription
irgo new <name>Create new project
irgo devStart 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 iosBuild iOS framework
irgo build androidBuild Android AAR
irgo build allBuild all mobile platforms
irgo templGenerate templ files
irgo install-toolsInstall dev dependencies
irgo versionPrint version
irgo help [command]Show help