CLI

Command-line interface

RAIQL 1.0 keeps the project workflow. The CLI automatically discovers raiql.config.json and app.raiql, so normal commands no longer require a filename.

Install

Install the release package served by raiql.dev. Node.js 20 or newer is required.

terminal
npm install -g https://www.raiql.dev/downloads/raiql-cli-1.0.2.tgz
raiql --version

Initialize a project

Create a complete RAIQL project instead of manually creating a source file.

terminal
raiql init commerce-core
cd commerce-core
raiql validate

init creates app.raiql, raiql.config.json, a project README and gitignore. Memory is the default zero-setup template; use --template postgres for PostgreSQL + Prisma persistence, or --template secure for PostgreSQL plus executable JWT authentication, roles and access rules.

Project configuration

raiql.config.json
{
  "$schema": "https://www.raiql.dev/schema/raiql.config.schema.json",
  "version": "1.0",
  "source": "app.raiql",
  "output": "generated",
  "install": true
}

Commands discover this file from the current directory or a parent directory. The configured output is treated as RAIQL-managed and may be safely regenerated.

Validate & compile

terminal
raiql validate
raiql validate --json
raiql compile

You can still pass an explicit source path for scripts or one-off specifications.

Generate

terminal
raiql generate

The project output defaults to generated/. Re-running generation replaces that managed directory without requiring --force.

Development server

dev regenerates the project and installs dependencies when needed. For PostgreSQL projects, RAIQL 1.0 also prepares .env, checks the Docker daemon, starts PostgreSQL, applies the development migration and then starts the generated Next.js server.

terminal
raiql dev

Doctor

Use raiql doctor to check Node, npm, project compilation and Docker readiness before starting a PostgreSQL project.

terminal
raiql doctor

Dependency lock

terminal
raiql lock

Creates or refreshes package-lock.json without running package lifecycle scripts and records its SHA-256.

Dependency audit

terminal
raiql audit
raiql audit --production

Fails on floating generated dependency declarations and high/critical npm advisories.

Test

terminal
raiql test

Test regenerates the project and runs the suite produced by GENERATE TESTS. PostgreSQL projects start and synchronize the local database first.

Build

terminal
raiql build

Build performs generation, dependency preparation and the generated application's production build.

Compatibility

terminal
raiql compatibility

Prints the project schema, language contract, compatibility mode and plugin API status.

Migrate project metadata

terminal
raiql migrate --dry-run
raiql migrate

Upgrades supported older project metadata to the stable 1.0 contract and records a backup/report under .raiql/migrations. Source is not rewritten when no grammar migration is required.

Explicit-file mode

RAIQL 1.0 keeps the explicit-file workflow for CI and standalone source files.

terminal
raiql validate ./specs/commerce.raiql
raiql generate ./specs/commerce.raiql -o ./commerce --force
Continue exploring RAIQLOpen the playground →