CLI Overview
The game-cli is a powerful command-line tool that automates Unity and Unreal Engine game exports, file synchronization, builds, and publishing workflows for Game Framework projects.
The CLI streamlines your development workflow by automating repetitive tasks and providing cloud publishing capabilities.
Key Features
Local Development
- Automated Exports - Export Unity/Unreal games for all platforms with a single command
- Smart Sync - Automatically copy exported files to your Flutter project
- Configuration Management - Simple
.game.ymlconfiguration file - Multi-Platform - Support for Android, iOS, macOS, Windows, Linux
- Build Integration - Trigger exports during Flutter builds
- Validation - Check configurations and paths before building
Cloud Publishing
- Package Publishing - Publish Flutter packages to Game Framework Cloud
- Artifact Management - Upload game artifacts (Unity/Unreal builds) with packages
- Workspace Management - Organize packages by workspaces
- Authentication - Secure API key and Bearer token (OIDC) support
- Version Control - Automatic version management and validation
Modern Interactive UI
The CLI features a polished, professional interface:
- Arrow key navigation for selecting options
- Hidden credential input for security
- Real-time progress indicators
- Visual feedback with clear success/error indicators
- Professional UX matching modern CLIs like npm and gh
# Interactive commands
game login # Interactive auth with arrow keys
game workspace list # Beautiful workspace display
game workspace select # Arrow-key workspace selectionCommon Commands
login
Authenticate with Game Framework Cloud
scaffold
Create a new game package with engine project
export
Export Unity/Unreal game for target platforms
sync
Sync exported files to Flutter project
build
All-in-one: export, sync, and build Flutter app
publish
Publish package and artifacts to the cloud
Quick Command Reference
Package Creation
# Create a new game package interactively
game scaffold
# Create Unity game package
game scaffold --name my_game --engine unity
# Add engine to existing project
game add engine unityDevelopment Workflow
# Export Unity for Android
game export unity --platform android
# Sync files to Flutter
game sync unity --platform android
# All-in-one: export + sync + build
game build android --engine unityCloud Operations
# Login to Game Framework Cloud
game login
# Select workspace
game workspace select
# Publish package
game publishConfiguration
# Initialize configuration
game init
# View configuration
game config show
# Validate configuration
game config validateInstallation
The CLI can be installed via Homebrew, binary download, or built from source.
See the Installation Guide for detailed installation instructions.
Configuration Files
Project Configuration (.game.yml)
The .game.yml file defines your project's engine configurations, export settings, and platform targets:
name: MyGame
version: 1.0.0
engines:
unity:
project_path: ../MyUnityProject
export_path: ../MyUnityProject/Exports
platforms:
android:
enabled: true
target_path: android/unityLibrary
ios:
enabled: true
target_path: ios/UnityFramework.frameworkCLI Configuration (~/.game/config.yml)
User-level configuration stored in your home directory:
auth:
token: "jwt_token_here"
api_key: "api_key_here"
defaults:
workspace_id: "ws-abc123"
api_url: "http://localhost:4000"Never commit your CLI configuration file! It contains sensitive authentication credentials.
Workflow Examples
Daily Development
# Make changes in Unity/Unreal
# ...
# Export and sync
game export unity --platform android
game sync unity --platform android
# Or use build command (does everything)
game build android --engine unityPublishing
# One-time setup
game login
game workspace select
# Publish package with artifacts
game publishMulti-Platform Release
# Export all platforms
game export unity --all
# Sync all platforms
game sync unity --all
# Build Flutter apps
flutter build apk
flutter build ios
flutter build macosGetting Help
Command Help
Get help for any command:
# General help
game --help
# Command-specific help
game export --help
game scaffold --helpResources
- Installation Guide - Install the CLI
- Commands Reference - Detailed command documentation
- Configuration Guide - Configure your projects
- Workflows - Common development workflows
- GitHub Issues - Report bugs
Next Steps
Ready to start using the CLI?
- Install the CLI
- Initialize a project with
game init - Add an engine with
game add engine unity - Export your game with
game export unity - Sync to Flutter with
game sync unity
New to Game Framework? Start with the Quick Start Guide for a complete tutorial.