Skip to main content

Walkthrough

We can play with Glean using the shell. You can do this directly from the Docker image if you want, or Build Glean from source first.

To try experiments we can work with a local schema definition and local database (as opposed to connecting to a Glean server). If you want to play along with the examples, you can do so as follows:

mkdir /tmp/glean
mkdir /tmp/glean/db
mkdir /tmp/glean/schema
glean shell --db-root /tmp/glean/db --schema /tmp/glean/schema

Put the example schema in /tmp/glean/schema/example.angle and the example data in /tmp/glean/facts.glean. Then reload schema and create a database from the example data using :reload and :load <file> in the shell:

> :reload
reloading schema [2 schemas, 7 predicates]
> :load /tmp/glean/facts.glean
facts>

Now head over to Angle Guide to try some example queries and learn about how the query language works.