Quick start
Connect, load a sample table, and run your first judgement.
Launch it
jevqlWith nothing configured, jevql asks for a database URL and a TypeSafe API key (hidden input) and offers to save them to ~/.config/jevql/env with mode 0600. Next time it just connects.
If you prefer environment variables, it reads the same ones psql does plus two of its own:
export DATABASE_URL=postgres://user:pass@localhost:5432/app # or PGHOST, PGUSER, ...
export TYPESAFE_API_KEY=tsk_...
jevqlLoad some rows
Any table will do. If you want the sample data from the repository:
curl -fsSL https://raw.githubusercontent.com/kylemclaren/jevql/main/testdata/people.sql | jevqlThat creates people, cities and tickets with a dozen rows each. Plain SQL passes straight through, so this is just psql behaviour.
Ask a question
SELECT name, job_title
FROM people
WHERE jev(people, 'could work from home'); name | job_title
---------------+-------------------------
Ada Fernandes | Staff software engineer
Miguel Costa | Technical writer
Tom Baker | Customer support lead
(3 rows)
jev: 12 judged, 1 req, 0 cache hits, 2.1k in tokens, $0.0001, 2.57sThe footer tells you what it cost. Run the same statement again and you will see 12 cache hits, 0 req.
Look before you leap
jevql --explain -c "SELECT name FROM people WHERE jev(people, 'could work from home')"--explain prints the SQL Postgres will run, how many rows survive the SQL filters, and a token and dollar estimate. It makes no TypeSafe calls.
Next
- SQL surface for
jev_prob,jev_choice,jev_scoreand friends. - CLI reference for flags, formats and meta commands.