Server & REPL

Learn how to run the τ server and interact with it using the REPL client.

The primary way to interact with τ is by running the database server and connecting to it with a client. The project provides a simple REPL (Read-Eval-Print Loop) client for direct interaction.

Running the Server

The τ server is the core component that manages data and processes commands. You can build and run the server using a single zig build command from the root of the tau-db project.

Terminal
1zig build run-server

By default, the server will start and listen for connections on 127.0.0.1:7828.

When the server is running, you'll see output similar to this, indicating it's ready to accept client connections:

Server Output
1[info] Server listening on 127.0.0.1:7828

The server runs in the foreground. To stop it, press Ctrl+C.

Refer to the Storage Backends documentation to learn how to configure persistent storage for the server.

Using the REPL Client

The REPL client is a command-line tool that allows you to send commands to a running τ server.

To build and run the REPL, open a new terminal window and execute:

Terminal
1zig build run-repl

This will start the REPL, and you'll be greeted with a τ> prompt.

Connecting to the Server

The first step in the REPL is to connect to the database server. Use the .connect command:

REPL
1τ> .connect

If the connection is successful, you will see a confirmation message:

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

Sending Commands

Once connected, you can send any valid database command to the server. For example, to ping the server:

REPL
1τ> PING
2PONG
3τ>

To learn about all available commands, see the API Commands reference.

Quitting the REPL

To exit the REPL client, use the .quit command or press Ctrl+D.

REPL
1τ> .quit
2Goodbye!

Last updated: 2/1/2026