Skip to content

yql — Interactive Client

yql is the interactive client for YantrikDB Server. Think psql for cognitive memory: connect, run commands, get pretty tables back.

It’s a separate binary, MIT-licensed (the server is AGPL).

Terminal window
cargo install yql

Or download a pre-built binary:

Terminal window
wget https://github.com/yantrikos/yantrikdb-server/releases/latest/download/yql-linux-amd64
chmod +x yql-linux-amd64
mv yql-linux-amd64 /usr/local/bin/yql

Available for linux-amd64, windows-amd64, macos-arm64, macos-amd64.

Terminal window
yql --host localhost -p 7438 -t ydb_your_token_here

Or set the token via environment variable:

Terminal window
export YQL_TOKEN=ydb_xxxxxxxx...
yql --host localhost
yql connected to http://localhost:7438
type \h for help, \q to exit
yantrikdb> remember "Alice leads engineering at Acme" importance=0.9 domain=work
✓ stored: 019d623a-3d70-712e-9315-e1da5ee41114
yantrikdb> recall who leads engineering top=5
+---+-------+---------------------------------+--------+--------------------------------+
| # | score | text | domain | why |
+---+-------+---------------------------------+--------+--------------------------------+
| 1 | 1.41 | Alice leads engineering at Acme | work | semantically similar (0.54)... |
+---+-------+---------------------------------+--------+--------------------------------+
(1 rows)
yantrikdb> relate Alice -> Acme as works_at
✓ edge: 019d623a-41cf-71a2 (Alice -[works_at]-> Acme)
yantrikdb> \cluster
yantrikdb> \stats
yantrikdb> \q
CommandPurpose
remember "<text>" [importance=0.9] [domain=work]Store a memory
recall <query> [top=10] [domain=work]Semantic search
forget <rid>Tombstone a memory
relate <entity> -> <target> as <relationship>Create graph edge
  • importance=0.9 (0.0-1.0)
  • domain=work
  • source=user
  • memory_type=semantic (or episodic, procedural)
  • valence=0.5 (-1.0 to 1.0, emotional tone)
  • half_life=168 (decay half-life in hours)
  • certainty=0.95
  • top=10 — number of results
  • domain=work — limit to a domain
  • source=user — limit to a source
  • memory_type=semantic
CommandAliasPurpose
\stats\sEngine statistics
\dt\lList databases
\conflicts\cList open conflicts
\personality\pDerived personality traits
\think\tRun consolidation + conflict scan
\clusterCluster status (replication / failover)
\healthServer health check
\json <path>Raw GET request to any endpoint
\help\h \?Show help
\quit\qExit

Run a single command and exit:

Terminal window
yql --host localhost -t $TOKEN -c '\stats'
yql --host localhost -t $TOKEN -c 'remember "hello" importance=0.8'
yql --host localhost -t $TOKEN -c 'recall hello'

Useful for shell scripts, cron jobs, monitoring.

yql saves your command history to ~/.yql_history so you can up-arrow through previous commands across sessions. Same as psql.