Game Framework
CLI ReferenceCommands

game config

View, validate, and manage Game Framework CLI configuration.

Subcommands

  • show - Display current configuration
  • validate - Validate configuration
  • edit - Open config in default editor

Usage

game config [command]

config show

Display the current configuration from .game.yml and CLI config.

Usage

game config show

Example Output

# Project Configuration (.game.yml)
name: MyGame
version: 1.0.0

engines:
  unity:
    project_path: ../MyUnityProject
    export_path: ../MyUnityProject/Exports
    platforms:
      android:
        enabled: true
      ios:
        enabled: true

# CLI Configuration (~/.game/config.yml)
auth:
  token: eyJhbGc...
  workspace_id: ws-abc123

defaults:
  api_url: http://localhost:4000

config validate

Validate project configuration for correctness.

Usage

game config validate

What It Checks

  • .game.yml exists - Configuration file is present
  • Valid YAML - Properly formatted YAML syntax
  • Required fields - Name, version present
  • Engine paths - Project paths exist
  • Export paths - Export directories are valid
  • Platform settings - Platform configurations are correct

Example Output

✓ Configuration file found
✓ Valid YAML syntax
✓ Required fields present
✓ Unity project path exists
✓ Export path valid
✓ Platform configurations correct

Configuration is valid!

Validation Errors

❌ Unity project path not found: ../MyUnityProject
❌ Export path does not exist: ../MyUnityProject/Exports
⚠️  iOS platform enabled but target_path not set

Fix these issues before running export/sync commands.

config edit

Open the configuration file in your default editor.

Usage

game config edit

This opens .game.yml in:

  • macOS: Default text editor or $EDITOR
  • Linux: $EDITOR or nano
  • Windows: Notepad or %EDITOR%

Set a custom editor:

export EDITOR=code  # VS Code
export EDITOR=vim   # Vim
export EDITOR=nano  # Nano

Configuration Files

Project Configuration (.game.yml)

Located in your Flutter project root:

name: MyGame
version: 1.0.0

publish:
  workspace_id: "ws-abc123"
  private: false
  exclude:
    - "*.log"
    - "temp/"

engines:
  unity:
    project_path: ../MyUnityProject
    export_path: ../MyUnityProject/Exports
    
    export_settings:
      development: false
      build_configuration: Release
      scenes:
        - MainMenu
        - Gameplay
    
    platforms:
      android:
        enabled: true
        target_path: android/unityLibrary
        build_settings:
          export_project: true
          scripting_backend: IL2CPP
          target_architectures: [ARM64]
      
      ios:
        enabled: true
        target_path: ios/UnityFramework.framework
        build_settings:
          symlink_libraries: true

CLI Configuration (~/.game/config.yml)

Located in your home directory:

# Authentication
auth:
  token: "jwt_token_here"
  api_key: "api_key_here"
  expires_at: "2026-12-31T23:59:59Z"

# Default settings
defaults:
  workspace_id: "ws-abc123"
  api_url: "http://localhost:4000"
  oidc_url: "http://localhost:4000"
  client_id: "game-cli"
  scopes: "openid profile email"

# User preferences
preferences:
  auto_export: true
  confirm_publish: true
  verbose: false

Never commit ~/.game/config.yml to version control - it contains sensitive credentials!

Configuration Options

Root Level

  • name (required) - Project name
  • version (optional) - Project version
  • publish (optional) - Publishing configuration

Engine Level

  • project_path (required) - Path to Unity/Unreal project
  • export_path (optional) - Where exports are saved
  • export_settings (optional) - Engine-specific export settings
  • platforms (required) - Platform configurations

Export Settings

  • development (optional) - Development build flag
  • build_configuration (optional) - Build configuration
  • scenes (Unity) - List of scenes to include
  • levels (Unreal) - List of levels to include
  • custom_settings (optional) - Additional settings

Platform Level

  • enabled (required) - Whether platform is enabled
  • target_path (optional) - Where to copy files in Flutter project
  • build_settings (optional) - Platform-specific build settings

Examples

Initialize New Config

# Create default .game.yml
game init

# View it
game config show

# Validate it
game config validate

Edit Config

# Open in editor
game config edit

# Or edit manually
vim .game.yml
nano .game.yml

Check Before Operations

# Validate before export
game config validate
game export unity --platform android

# Validate before publish
game config validate
game publish

Troubleshooting

Config Not Found

Error: No .game.yml found

Solution: Run game init to create one

Invalid YAML

Error: Failed to parse .game.yml

Solutions:

  • Check YAML syntax
  • Verify indentation (use spaces, not tabs)
  • Use game config validate for details

Path Not Found

Error: Unity project path not found

Solutions:

  • Verify project_path in .game.yml is correct
  • Use relative paths: ../MyUnityProject
  • Check path exists: ls ../MyUnityProject

Best Practices

Version Control

Commit .game.yml:

git add .game.yml
git commit -m "Add game configuration"

Never commit CLI config:

# Add to .gitignore
echo "~/.game/" >> .gitignore

Relative Paths

Use relative paths for team collaboration:

# Good ✅
project_path: ../MyUnityProject

# Bad ❌
project_path: /Users/john/Projects/MyUnityProject

Validation

Always validate before operations:

game config validate && game export unity --all
game config validate && game publish

Use game config validate regularly to catch configuration issues early!