Omen Source code Documentation

Ask your data a question.

Claude reads your schema and generates the one PostgreSQL statement that settles it.

Omen runs that statement read-only in Rails and draws the rows. Your data never leaves the app.

Your data never leaves

Claude is shown the shape of your database — its tables and their columns — and never a row of what they hold. Nothing the statement returned is ever sent back.

Your secrets stay secret

Encrypted columns are found by the table Postgres reports them from, so no alias launders one. Credentials are refused outright, whatever is asked.

Nothing can be written

The statement runs as a Postgres role granted SELECT and nothing else, inside a read-only transaction. A grant the database enforces, not a convention that could slip.

Install with gem install omen then follow the configuration steps.

Somebody asked

How many locations do we serve?

SELECT count(*)
FROM locations
1,284

1 row · 12 ms

Somebody asked

Which weekday do people book on most?

SELECT to_char(created_at, 'Day')
FROM bookings GROUP BY 1
ORDER BY count(*) DESC LIMIT 1
Tuesday

1 row · 34 ms

Somebody asked

What share of bookings ever found a provider?

SELECT round(100.0 * count(*)
FILTER (WHERE matched_at IS NOT NULL)
/ count(*), 1) FROM bookings
70.4%

1 row · 41 ms

Somebody asked

Which state holds the most homes?

SELECT s.code FROM homes h
JOIN states s ON s.id = h.state_id
GROUP BY 1 ORDER BY count(*) DESC LIMIT 1
NY

1 row · 58 ms

Somebody asked

How many providers finished a job last month?

SELECT count(DISTINCT provider_id)
FROM jobs WHERE finished_at >=
date_trunc('month', now()) - interval '1 month'
47

1 row · 19 ms

Somebody asked

How many contacts have no phone number?

SELECT count(*) FROM contacts
WHERE phone IS NULL
312

1 row · 8 ms

Somebody asked

What did we invoice in July?

SELECT sum(cents) / 100.0
FROM invoices WHERE issued_on
BETWEEN '2026-07-01' AND '2026-07-31'
$84,910

1 row · 26 ms

Somebody asked

How many chats are still waiting on a reply?

SELECT count(*) FROM chats
WHERE replied_at IS NULL
26

1 row · 6 ms

Somebody asked

Which service gets asked for most often?

SELECT name FROM services s
JOIN bookings b ON b.service_id = s.id
GROUP BY 1 ORDER BY count(*) DESC LIMIT 1
Faucet repair

1 row · 63 ms

Somebody asked

How many homes were built before 1950?

SELECT count(*) FROM homes
WHERE built_in < 1950
3,908

1 row · 22 ms

Somebody asked

How long does a first reply take, typically?

SELECT percentile_cont(0.5) WITHIN GROUP
(ORDER BY replied_at - created_at)
FROM chats
1h 38m

1 row · 47 ms

Somebody asked

What is a booking worth on average?

SELECT round(avg(cents) / 100.0, 2)
FROM bookings WHERE cents > 0
$412.60

1 row · 31 ms

MIT license Built at HouseAccount