Skip to content

Project Commands

Project commands handle the full lifecycle of a FORGE application — from scaffolding a new project to checking version information and keeping the CLI up to date.

forge new

Create a new full-stack application with a single command. FORGE scaffolds the backend (Rust + Axum), frontend (Next.js), database migrations, Docker configuration, SSL certificates, and local host entries.

Usage

bash
forge new [OPTIONS]

Options

OptionTypeDefaultDescription
--namestringProject name (kebab-case). Used for directories, database, and Docker containers.
--backendstringrustBackend framework. Currently supports rust (Axum).
--frontendstringnextjsFrontend framework. Currently supports nextjs.
--templatestringbaseStarter template to apply. See Provider Commands for available templates.
--authstringemail_passwordAuthentication strategy: email_password, mobile_otp, or mobile_password.
--default-langstringenDefault language code (ISO 639-1).
--languagesstringenComma-separated language codes to include, e.g. en,ar,fr.
--no-sslflagfalseSkip SSL certificate generation.
--no-hostsflagfalseSkip adding entries to /etc/hosts.
--no-dockerflagfalseSkip Docker Compose file generation.
--interactiveflagfalseLaunch the interactive setup wizard.

What forge new Creates

When you run forge new, the following steps are executed in order:

1. Validate inputs and resolve template
2. Create project directory structure
3. Generate forge.yaml configuration
4. Scaffold Rust/Axum backend (API)
5. Scaffold Next.js frontend (web + admin)
6. Generate database migrations and seeders
7. Create Docker Compose configuration
8. Generate SSL certificates via mkcert
9. Add entries to /etc/hosts
10. Initialize Git repository
11. Install dependencies

Examples

Quick start with defaults:

bash
forge new --name my-app

Arabic-first bilingual project with mobile OTP auth:

bash
forge new --name hajz \
  --auth mobile_otp \
  --default-lang ar \
  --languages ar,en

Minimal setup (no Docker, SSL, or hosts):

bash
forge new --name prototype \
  --no-ssl \
  --no-hosts \
  --no-docker

Interactive mode:

bash
forge new --interactive

Interactive mode walks through each option step by step:

? Project name: my-app
? Backend framework: (rust)
? Frontend framework: (nextjs)
? Authentication strategy:
  > email_password
    mobile_otp
    mobile_password
? Default language: en
? Additional languages (comma-separated): ar
? Generate SSL certificates? (Y/n)
? Add /etc/hosts entries? (Y/n)
? Generate Docker configuration? (Y/n)

Creating project "my-app"...
  [1/11] Validating inputs...          done
  [2/11] Creating directory structure...done
  ...
  [11/11] Installing dependencies...   done

Project created successfully!
  cd my-app && forge serve

TIP

Use --interactive the first time you create a project. Once you are comfortable with the options, the flag-based approach is faster for repeated use.


forge info

Display metadata and configuration details about the current FORGE project.

Usage

bash
forge info

Example Output

Project:    my-app
Backend:    rust (axum)
Frontend:   nextjs
Auth:       email_password
Languages:  en (default), ar
Template:   base
Database:   PostgreSQL
Docker:     enabled
SSL:        enabled
Created:    2025-04-12

forge doctor

Check the overall health of your FORGE project. Verifies that configuration, dependencies, database connections, and generated file integrity are all in order.

Usage

bash
forge doctor

Example Output

FORGE Doctor — Project Health Check

  ✓ forge.yaml valid
  ✓ forge.lock integrity verified
  ✓ All migrations applied
  ✓ Backend compiles (cargo check)
  ✓ Frontend builds (npm run build)
  ✓ API contract satisfied
  ✓ Required pages present
  ✓ Permissions seeded correctly

All checks passed. Project is healthy.

TIP

Run forge doctor after upgrading FORGE, adding new templates, or modifying infrastructure configuration. It catches issues early and suggests fixes for each failing check.


forge update

Update the FORGE CLI to the latest release.

Usage

bash
forge update

WARNING

After updating, run forge upgrade:check inside existing projects to see if any generated files need updating. See Validation Commands for details. You can also use forge --version to confirm the installed version.

Example Output

Checking for updates...
  Current version: 0.5.1
  Latest version:  0.5.2
Downloading...    done
Installing...     done
Updated to forge 0.5.2

forge help

Show usage information for any FORGE command.

Usage

bash
forge help [COMMAND]

Examples

bash
# General help
forge help

# Help for a specific command
forge help new
forge help make:model

See Also

Released under the MIT License.