TuringDB home pagelight logodark logo
  • Discord
  • GitHub
  • Website
TuringDB

Get Started

  • Introduction
  • Get Started
  • Claude Code Skill
  • Commands

Concepts

  • Overview
  • A Columnar Graph Database
  • Versioning System
  • The DataPart System
  • Zero-Locking Architecture
  • Snapshots Isolation

Benchmarks

  • Results Summary
  • Technical Report

Query Language

  • Overview
  • Matching
  • Paths
  • Results and Aggregation
  • Subqueries
  • Functions and Types
  • Writing Data
  • Procedures and Commands
  • CheatSheet

Importing data

  • JSONL
  • CSV
  • Neo4j
  • GML
  • Parquet

Graph Development

  • Create Graph
  • Load Graph
  • Load External data
  • Create a Change
  • List Changes
  • Create Nodes and Edges
  • Update Properties
  • Submit a Change
  • Time Travel
  • Graph Examples

Vector Search

  • Vector Search

Graph Algorithms

  • Shortest Path

Tutorials

  • Example Notebooks

Python SDK

  • Get Started
  • Reference

Troubleshooting

  • Troubleshooting

  • Start
  • Options
  • Examples
  • Interactive shell
  • UI
  • Options
  • Examples
  • Stop
  • Options
  • Examples
  • Environment variables
  • HTTP API
Get Started

CLI Commands

Reference for TuringDB CLI commands: start, UI, and stop.

​
Start

Starts the TuringDB server. This is the default command, running turingdb without a subcommand is equivalent to turingdb start.

turingdb start [options]

​
Options

FlagDescriptionDefault
-demonRun TuringDB as a background daemonoff
-p <port>HTTP server listen port6666
-i <addr>HTTP server listen address127.0.0.1
-turing-dir <path>Root Turing home directory~/.turing
-load <graph>Load a graph at startup (can be repeated)
-in-memoryRun without writing graphs to diskoff
-reset-defaultDelete the default graph before startingoff
-uiLaunch the built-in visualizer proxyoff
-ui-port <port>Visualizer proxy port8080
-auth-onRequire a bearer token on every request. The token is read from the TURINGDB_AUTH_TOKEN environment variable, and must be set when you use this flagoff
-start-timeout <ms>Time to wait for daemon readiness500

​
Examples

Interactive mode (default):

turingdb

Daemon mode on a custom port:

turingdb start -demon -p 7777

Daemon mode with the visualizer:

turingdb -demon -ui

Load a graph at startup:

turingdb -load mygraph

Require authentication:

TURINGDB_AUTH_TOKEN=s3cret turingdb start -demon -auth-on

Serve the binary protocol instead of JSON (see Environment variables):

USE_TURING_PROTO=1 turingdb start -demon

Server logs are written to <turing-dir>/logs/turingdb.log. Additional details about an import, such as a LOAD JSONL, are written there.

​
Interactive shell

Without -demon, turingdb start serves HTTP and opens an interactive Cypher shell. Besides Cypher queries and engine commands, the shell has a few local commands:

CommandDescription
cd <graph>Switch the active graph
checkout change-<id>Work on a change. checkout <commit> opens a past commit, and checkout returns to the latest commit of main
read <file>Run the queries in a file
helpList the available commands
quit / exitLeave the shell

​
UI

Launches the built-in graph visualizer.

turingdb start -ui [options]

Once started, open the visualizer at http://127.0.0.1:8080 (or the port set via -ui-port).

​
Options

FlagDescriptionDefault
-uiLaunch the built-in visualizeroff
-ui-port <port>Visualizer port8080

​
Examples

Start TuringDB with the UI:

turingdb -ui

Start TuringDB as a daemon with the UI on a custom port:

turingdb -demon -ui -ui-port 9090

​
Stop

Gracefully stops a TuringDB instance running as a daemon. It sends a stop signal through the Unix socket and waits for the process to shut down gracefully.

turingdb stop [options]

​
Options

FlagDescriptionDefault
-turing-dir <path>Root Turing directory of the instance to stop~/.turing
-timeout <ms> / -t <ms>Time to wait for the process to release its lock3000

​
Examples

Stop the default instance:

turingdb stop

Stop an instance running in a custom directory:

turingdb stop -turing-dir /data/myturing

​
Environment variables

VariableRead byEffect
USE_TURING_PROTOserver1 makes the server speak TuringDB’s binary protocol instead of JSON over HTTP. The server then serves the binary protocol only: connect with TuringDB(type="native"), and use a server in the default mode for curl, the JSON client and the visualizer. See client backends
TURINGDB_AUTH_TOKENserver and Python SDKWith -auth-on, the token the server requires. The SDK sends it as a bearer token when set
TURINGDB_TYPEPython SDKDefault client backend (json, native or embedded) when type is not passed

​
HTTP API

The Python SDK is a thin client over a single endpoint, so you can query a server from any language. With the default (JSON) server:

curl -s -X POST 'http://localhost:6666/query?graph=mygraph' -d "MATCH (n) RETURN count(n)"
  • The request body is the query text. The optional query-string parameters change=<hex change id> and commit=<hash> target a change or a past commit.
  • With -auth-on, send Authorization: Bearer <token>. A missing or incorrect token returns HTTP 401 with an empty body.
  • A successful response is {"header": {"column_names": [...], "column_types": [...]}, "data": [chunk, ...], "time": <ms>}, where each chunk is a list of columns.
  • An error response is {"error": "PARSE_ERROR", "error_details": "...", "time": <ms>}. The code is one of PARSE_ERROR, ANALYZE_ERROR, PLAN_ERROR, EXEC_ERROR, CHANGE_NOT_FOUND or COMMIT_NOT_FOUND.
  • Queries on a non-HEAD commit need LOAD COMMIT '<hash>' first when you talk to the API directly. The CLI and the SDK do this for you.
Claude Code SkillOverview
githublinkedinyoutubediscord