Getting started
Install Rad, define a schema, serve it, and generate a client.
Install
On macOS or Linux:
curl -fsSL https://raw.githubusercontent.com/Southclaws/rad/main/install.sh | sh
This drops a single rad binary into ~/.rad/bin. It is the database server,
the devtool, and the code generator, all in one. On Windows, use install.ps1
from the repository.
Define a schema
A schema is YAML. Each table lists its columns; a column has a type and
optional flags — pk, unique, index, nullable, ref, and default.
tables:
- name: boards
columns:
- { name: id, type: string, pk: true, default: uuid() }
- { name: name, type: string }
- name: tasks
columns:
- { name: id, type: string, pk: true, default: uuid() }
- { name: board_id, type: string, ref: boards.id, index: true }
- { name: title, type: string }
- { name: status, type: string, default: todo }
indexes:
- { columns: [board_id, status] }
Serve
rad serve
Rad boots on rad://0.0.0.0:7237, migrates the database to match your schema,
and exposes a browser devtool on the same port. Storage is chosen by
environment variable — in-memory, on the filesystem, or against S3.
Generate a client
rad generate --lang go -o ./tracker
rad generate --lang ts -o ./tracker
The generated package carries its own copy of the schema, so it can migrate the database it connects to. Now write your application against it — see Queries.