oforum binary.
Available Commands
The CLI includes the following commands:serve
Start the forum server (default command)
init
Generate a .env configuration file
migrate
Run database migrations
seed
Seed database with demo data
version
Print version information
update
Update to latest release
Getting Help
Display available commands and usage information:- Command list with descriptions
- Environment variable requirements
- Usage examples
- Current version number
Command Syntax
serve is used by default:
Environment Variables
Most commands require configuration through environment variables:PostgreSQL connection string. Required for
serve, migrate, and seed commands.Example: postgres://user:pass@localhost:5432/oforum?sslmode=disableServer port for the
serve command.Example: PORT=3000Environment variables can be set in a
.env file or exported in your shell. Use oforum init to generate a .env file interactively.Common Workflows
First-Time Setup
serve command automatically runs migrations before starting the server.
Development
Production Deployment
Updating
Exit Codes
The CLI uses standard exit codes:0- Success1- Error (missing configuration, database connection failure, etc.)