process command
Manage AO processes for your application.
Syntax
ao-forge process <subcommand> [options]
Subcommands
start
- Start AO processstop
- Stop AO processrestart
- Restart AO processlist
- List processesstatus
- Check process statusmonitor
- Monitor processwatch
- Watch process outputlogs
- View process logshelp
- Show help information
start subcommand
Syntax
ao-forge process start [process-name] [options]
Options
Option | Description | Default |
---|---|---|
--name <name> | Process name | Default from config |
--wallet <path> | Wallet file path | Default wallet |
--module <id> | Module ID | Default module |
--cron <schedule> | Cron schedule | - |
--sqlite | Use SQLite module | false |
--monitor | Enable monitoring | false |
--tag-name <name> | Tag name | - |
--tag-value <value> | Tag value | - |
--help | Show help information | - |
Examples
# Start default process
ao-forge process start
# Start specific process
ao-forge process start counter
# Start with custom name
ao-forge process start --name my-process
# Start with specific wallet
ao-forge process start --wallet ./wallet.json
# Start with monitoring
ao-forge process start --monitor
# Start with cron job
ao-forge process start --cron "1-minute"
# Start with SQLite module
ao-forge process start --sqlite
stop subcommand
Syntax
ao-forge process stop [process-name] [options]
Examples
# Stop default process
ao-forge process stop
# Stop specific process
ao-forge process stop counter
# Stop all processes
ao-forge process stop --all
# Force stop
ao-forge process stop --force
restart subcommand
Syntax
ao-forge process restart [process-name] [options]
Examples
# Restart default process
ao-forge process restart
# Restart specific process
ao-forge process restart counter
# Restart with new configuration
ao-forge process restart --reload-config
list subcommand
Syntax
ao-forge process list [options]
Examples
# List all processes
ao-forge process list
# List with details
ao-forge process list --details
# List for specific wallet
ao-forge process list --wallet ./wallet.json
# List with format
ao-forge process list --format json
status subcommand
Syntax
ao-forge process status [process-name] [options]
Examples
# Check default process status
ao-forge process status
# Check specific process status
ao-forge process status counter
# Check with details
ao-forge process status --details
# Check all processes
ao-forge process status --all
monitor subcommand
Syntax
ao-forge process monitor [process-name] [options]
Examples
# Monitor default process
ao-forge process monitor
# Monitor specific process
ao-forge process monitor counter
# Monitor with real-time updates
ao-forge process monitor --real-time
# Monitor with filtering
ao-forge process monitor --filter "error"
watch subcommand
Syntax
ao-forge process watch [process-name] [options]
Examples
# Watch default process
ao-forge process watch
# Watch specific process
ao-forge process watch counter
# Watch with tail
ao-forge process watch --tail 100
# Watch with follow
ao-forge process watch --follow
logs subcommand
Syntax
ao-forge process logs [process-name] [options]
Examples
# View default process logs
ao-forge process logs
# View specific process logs
ao-forge process logs counter
# View recent logs
ao-forge process logs --tail 50
# View logs with timestamps
ao-forge process logs --timestamps
# View logs with filtering
ao-forge process logs --filter "error"
Process Configuration
ao.config.yml
# Process configuration
processes:
- name: 'counter'
file: './ao/counter.lua'
autoStart: true
monitoring: true
wallet: './wallet.json'
module: 'module-id'
cron: '1-minute'
tags:
- name: 'type'
value: 'counter'
- name: 'token'
file: './ao/token.lua'
autoStart: false
monitoring: false
Process Management
# Start all configured processes
ao-forge process start --all
# Start specific processes
ao-forge process start counter token
# Stop all processes
ao-forge process stop --all
# Restart all processes
ao-forge process restart --all
Process Monitoring
Real-time Monitoring
# Monitor with real-time updates
ao-forge process monitor --real-time
# Monitor with custom refresh rate
ao-forge process monitor --refresh 5
# Monitor with filtering
ao-forge process monitor --filter "error" --filter "warning"
Process Health Checks
# Check process health
ao-forge process health
# Check specific process health
ao-forge process health counter
# Check with timeout
ao-forge process health --timeout 30
Process Deployment
Deploy to Arweave
# Deploy process to Arweave
ao-forge process deploy
# Deploy with specific wallet
ao-forge process deploy --wallet ./wallet.json
# Deploy to testnet
ao-forge process deploy --testnet
# Deploy with tags
ao-forge process deploy --tag-name "type" --tag-value "counter"
Process Updates
# Update process
ao-forge process update
# Update specific process
ao-forge process update counter
# Update with new module
ao-forge process update --module new-module-id
Error Handling
Common Errors
- Process not found
Error: Process 'counter' not found Solution: Check process name or use 'ao-forge process list' to see available processes
- Process already running
Error: Process 'counter' is already running Solution: Use 'ao-forge process stop' to stop the process first
- Process failed to start
Error: Process failed to start Solution: Check process configuration and logs
Best Practices
Process Management
- Use descriptive names for processes
- Monitor processes regularly
- Use proper error handling in Lua code
- Test processes before deployment
- Keep processes updated with latest changes
Performance
- Optimize Lua code for better performance
- Use appropriate modules for your needs
- Monitor resource usage regularly
- Scale processes as needed
- Use caching where appropriate
Related Commands
ao-forge dev
- Start development serverao-forge build
- Build for productionao-forge config
- Manage configuration