Reference for the ao.config.yml
configuration file and its options.
The ao.config.yml
file is the main configuration file for ao-forge projects. It defines project settings, AO processes, build options, and deployment configurations.
# Project information
name : 'my-ao-app' # Project name
version : '1.0.0' # Project version
description : 'My AO-powered application' # Project description
# Framework configuration
framework : 'nextjs' # Framework: 'nextjs' or 'nuxtjs'
packageManager : 'pnpm' # Package manager: 'npm', 'pnpm', or 'yarn'
# AO process configuration
luaFiles : [ 'counter.lua' , 'token.lua' ] # List of Lua files
autoStart : false # Auto-start AO processes
processName : 'my-process' # Default process name
Copy to clipboard # Development settings
ports :
dev : 3000 # Development server port
ao : 8080 # AO process port
monitoring : 9090 # Process monitoring port
# Development features
debug : false # Enable debug mode
hotReload : true # Enable hot reloading
sourceMaps : true # Generate source maps
Copy to clipboard # Build settings
build :
output : './dist' # Build output directory
optimize : true # Enable optimization
sourceMaps : false # Generate source maps
minify : true # Minify assets
compression : true # Enable compression
# Build optimization
optimization :
treeshaking : true # Enable tree shaking
codesplitting : true # Enable code splitting
deadCodeElimination : true # Remove dead code
constantFolding : true # Optimize constants
Copy to clipboard # Deployment settings
deploy :
platform : 'vercel' # Deployment platform
environment : 'production' # Deployment environment
domain : 'my-app.vercel.app' # Deployment domain
customDomain : 'my-app.com' # Custom domain
# Platform-specific settings
vercel :
projectId : 'your-project-id' # Vercel project ID
teamId : 'your-team-id' # Vercel team ID
netlify :
siteId : 'your-site-id' # Netlify site ID
buildCommand : 'ao-forge build' # Build command
publishDirectory : './dist' # Publish directory
Copy to clipboard Option Type Default Description name
string - Project name version
string '1.0.0' Project version description
string - Project description framework
string - Framework ('nextjs' or 'nuxtjs') packageManager
string 'pnpm' Package manager
Option Type Default Description luaFiles
array List of Lua files autoStart
boolean false Auto-start processes processName
string - Default process name processes
array Process configurations
Option Type Default Description ports.dev
number 3000 Development server port ports.ao
number 8080 AO process port ports.monitoring
number 9090 Monitoring port debug
boolean false Debug mode hotReload
boolean true Hot reloading
Option Type Default Description build.output
string './dist' Output directory build.optimize
boolean true Enable optimization build.sourceMaps
boolean false Generate source maps build.minify
boolean true Minify assets
Option Type Default Description deploy.platform
string - Deployment platform deploy.environment
string 'production' Environment deploy.domain
string - Deployment domain
# config/development.yml
ports :
dev : 3000
debug : true
hotReload : true
sourceMaps : true
Copy to clipboard # config/staging.yml
ports :
dev : 3001
debug : false
hotReload : false
build :
optimize : true
sourceMaps : true
Copy to clipboard # config/production.yml
ports :
dev : 3000
debug : false
hotReload : false
build :
optimize : true
sourceMaps : false
minify : true
Copy to clipboard # Validation configuration
validation :
required :
- framework
- packageManager
- luaFiles
optional :
- ports
- build
- deploy
types :
framework : [ 'nextjs' , 'nuxtjs' ]
packageManager : [ 'npm' , 'pnpm' , 'yarn' ]
Copy to clipboard # Validate configuration
ao-forge config validate
# Check for errors
ao-forge config validate --strict
# Fix configuration issues
ao-forge config fix
Copy to clipboard # Get configuration value
ao-forge config get framework
# Set configuration value
ao-forge config set framework nextjs
# List all configuration
ao-forge config list
# Reset to defaults
ao-forge config reset
Copy to clipboard # Override configuration with environment variables
export AO_FRAMEWORK = nextjs
export AO_PACKAGE_MANAGER = pnpm
export AO_PORT = 3000
Copy to clipboard Use version control for configuration filesDocument configuration optionsValidate configuration before deploymentUse environment-specific configurationsKeep secrets in environment variablesNever commit sensitive informationUse environment variables for secretsValidate inputs in configurationUse secure defaults for productionRegularly review configuration securityname : 'my-ao-app'
framework : 'nextjs'
packageManager : 'pnpm'
luaFiles : [ 'counter.lua' ]
autoStart : false
ports :
dev : 3000
Copy to clipboard name : 'my-ao-app'
version : '1.0.0'
description : 'My AO-powered application'
framework : 'nextjs'
packageManager : 'pnpm'
# AO processes
luaFiles : [ 'counter.lua' , 'token.lua' ]
autoStart : false
processName : 'my-process'
# Development
ports :
dev : 3000
ao : 8080
monitoring : 9090
# Build
build :
output : './dist'
optimize : true
sourceMaps : false
# Deployment
deploy :
platform : 'vercel'
environment : 'production'
domain : 'my-app.vercel.app'
Copy to clipboard Configuration not found Error: Configuration file not found
Solution: Run 'ao-forge config init' to create default configuration
Copy to clipboard Invalid configuration Error: Invalid configuration value
Solution: Use 'ao-forge config validate' to check for errors
Copy to clipboard Configuration not applied Error: Configuration not applied
Solution: Restart development server or reload configuration
Copy to clipboard