Altair

Batteries-included web framework for Crystal. The full stack — routing, controllers, views, an ORM, generators and a CLI — with sane defaults.

Crystal 705 specs passing SQLite + PostgreSQL Linux · macOS · Windows
curl -fsSL https://github.com/Arab-Open-Source/Altair/releases/latest/download/install.sh | sh

What Altair is

Altair is a batteries-included web framework for Crystal. It ships the full stack — routing, controllers, views, an ORM, generators and a CLI — with sane defaults, so building a web app feels like the framework is working for you.

altair new blog
cd blog
shards install
altair server

Open http://localhost:3000. Inside a generated project the CLI finds the project automatically — altair server, altair routes and altair db:migrate work from any subdirectory, no bin/ prefix needed.

What ships today

Routing

Segment-based router with resources, nested routes, constraints and glob segments.

Controllers

Actions, typed parameters, filters, callbacks and rendering hooks on a type-checked base class.

Views

ECR templates with auto-escaping, layouts, partials, helpers and a form builder.

Record (ORM)

SQLite3 and PostgreSQL adapters, migrations, validations, callbacks and associations.

Sessions and auth

Signed-cookie sessions, flash messages, CSRF protection and login helpers.

Security

Safe-by-default headers, request ids and opt-in CORS in the middleware stack.

Configuration

.env and config/database.yml merged into typed per-environment config at boot.

CLI + Generators

altair new, altair g scaffold, server, routes and database commands.

Install

One-command installers for Linux, macOS and Windows with checksum verification.

Installation

Install the prebuilt binary on Linux, macOS or Windows:

curl -fsSL https://github.com/Arab-Open-Source/Altair/releases/latest/download/install.sh | sh

Windows PowerShell:

iex (irm https://github.com/Arab-Open-Source/Altair/releases/latest/download/install.ps1)

Windows command prompt:

curl -fsSL https://github.com/Arab-Open-Source/Altair/releases/latest/download/install.cmd | cmd

Documentation