Skip to content

Quickstart

Create and run your first Orbita project in under a minute.

1. Initialize a new project

mkdir my-app && cd my-app
ob init my-app

ob init generates:

  • ob.toml — project manifest for dependencies, scripts, and embedded assets ([embed]).
  • src/main.tyl — starter entry point written in TypeLua.
  • Appends .ob/ to .gitignore if one exists.

2. Run your code

ob run src/main.tyl

3. Use the built-in ob:* standard library

Update src/main.tyl to use JSON and bundled SQLite:

local json = require("ob:json")
local sqlite = require("ob:sqlite")

local db = sqlite.open(":memory:")
db:exec("CREATE TABLE tasks (id INTEGER PRIMARY KEY, title TEXT)")
db:exec("INSERT INTO tasks (title) VALUES (?)", { "Explore Orbita" })

local rows = db:query("SELECT id, title FROM tasks")
print(json.encode_pretty(rows))
db:close()

Run with hot reload (--watch):

ob run src/main.tyl --watch

4. Fullstack Web App (--web)

Scaffold a complete fullstack web application with ob:router, config.toml, paired .tyl + .html templates, and public/ assets:

ob init my-web-app --web
cd my-web-app

# Generate modular apps, routes, components, and SQL migrations
ob g app tasks
ob g route tasks/index
ob g component tasks/task_card
ob g migration create_tasks

# Run migrations and start the dev server with Live Reload
ob db migrate
ob run --watch --allow-net --allow-read=. --allow-write=storage src/main.tyl

5. Next Steps