Getting Started

A step-by-step guide to get up and running with τ.

This guide will walk you through the entire process of setting up τ, running the server, and interacting with it using the REPL client. By the end, you'll have a running database and will have performed basic data operations.

Installation

First, you need to install τ by building it from source. This process requires git and the zig compiler. If you haven't installed it yet, please follow the Installation Guide.

The key steps are:

  1. Clone the repository.
  2. Run zig build to compile the server and client.

Start the Server

Once τ is built, you can start the database server. The server process runs in the foreground and listens for client connections.

From the tau-db project directory, run:

Terminal
1zig build run-server
Server Output
1[info] Server listening on 127.0.0.1:7828

Keep this terminal window open. The server must be running to accept client connections. For more details, see the Server & REPL Guide.

Connect with the REPL

With the server running, open a new terminal window and start the REPL client.

Terminal
1zig build run-repl

Once the REPL starts, use the .connect command to establish a connection with the server.

REPL
1τ> .connect
2Connected to 127.0.0.1:7828
3τ>

Create a Schedule

Now that you're connected, let's create a Schedule. A Schedule is a time-series data structure that stores events.

Let's create a schedule to track temperature readings.

REPL
1τ> create_schedule temperature
2OK

You can learn more about this primitive in the Frame documentation (Schedules are a component of Frames).

Append Data

With our temperature schedule created, let's add some data to it. The append command adds an event to a schedule with a value, a valid time, and an expiry time.

Let's add three temperature readings. The timestamps are provided in nanoseconds.

REPL
1τ> append temperature 22.5 1000000000 9999999999999999999
2OK
3τ> append temperature 23.1 2000000000 9999999999999999999
4OK
5τ> append temperature 22.8 3000000000 9999999999999999999
6OK

We've now stored three temperature readings at three different points in time.

Query Your Data

The final step is to query the data back. You can use the at command to see the value of a schedule at a specific point in time.

What was the temperature at t=2.5s?

REPL
1τ> at temperature 2500000000
223.1

τ correctly interpolates the value between the events at 2 and 3 seconds.

You can also query a range of values.

REPL
1τ> range temperature 1000000000 3000000000
2(1000000000, 22.5)
3(2000000000, 23.1)
4(3000000000, 22.8)

Next Steps

You've successfully installed τ, created a schedule, appended data, and run queries. You're now ready to explore its more advanced features.

Last updated: 2/1/2026