Skip to content

Quick Start Guide

Get started with USL in 5 minutes!

Install USL

curl -fsSL https://raw.githubusercontent.com/shaifulshabuj/USL/main/scripts/install.sh | sh

Verify:

usl --version

Create Project

mkdir hello-usl && cd hello-usl
usl init

Write Your First Spec

Create hello.usl:

domain HelloApp {
  entity Greeting {
    id: GreetingId @primary
    message: String
    createdAt: Timestamp
  }
}

service GreetingService {
  action sayHello(name: String) -> Greeting
    effects { Write(Greeting) }
    implementation {
      let greeting = Greeting {
        id: generateId(),
        message: "Hello, " + name + "!",
        createdAt: now()
      }
      store(greeting)
      return greeting
    }
}

Compile

usl compile hello.usl

Generate Code

usl generate --target typescript --output ./backend

Run It

cd backend
npm install
npm run dev

Test It

curl -X POST http://localhost:3000/api/sayHello \
  -H "Content-Type: application/json" \
  -d '{"name": "World"}'

Response:

{
  "id": "greeting_abc123",
  "message": "Hello, World!",
  "createdAt": "2026-01-15T10:30:00Z"
}

What's Next?

Need Help?