airlayer
In-process semantic engine. Compiles YAML semantic definitions to dialect-specific SQL. Designed as a tool-use interface for LLMs.
GitHubApache-2.0
Semantic layer
Define views with dimensions and measures. Query them from the CLI. Airlayer compiles to dialect-specific SQL.
5s
views/orders.view.yml
name: orders
table: public.orders
dialect: postgres
dimensions:
- name: status
type: string
expr: status
- name: created_at
type: time
expr: created_at
measures:
- name: total_revenue
type: sum
expr: amount
- name: order_count
type: count
expr: idInstall
$ bash <(curl -sSfL https://raw.githubusercontent.com/oxy-hq/airlayer/main/install_airlayer.sh)Installs the airlayer binary to your system.
Supported databases
postgressnowflakebigqueryduckdbmotherduckmysqlclickhousedatabricksredshiftsqlite
Quick start
Initialize airlayer in your project directory. The CLI will walk you through database connection and schema discovery.
terminal
$ airlayer initThis generates:
config.yml— database connectionviews/*.view.yml— semantic layer definitionsCLAUDE.md— project instructions for Claude Code.claude/— agents and skills for Claude Code
airlayer init
Claude Code integration
Airlayer generates Claude Code agents and skills for working with your semantic layer:
- analyst— answers data questions via semantic queries
- builder— creates and edits view definitions
Skills include bootstrap, profile, and query for schema discovery, data profiling, and semantic queries.