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).
Install
Section titled “Install”cargo install yqlOr download a pre-built binary:
wget https://github.com/yantrikos/yantrikdb-server/releases/latest/download/yql-linux-amd64chmod +x yql-linux-amd64mv yql-linux-amd64 /usr/local/bin/yqlAvailable for linux-amd64, windows-amd64, macos-arm64, macos-amd64.
Connect
Section titled “Connect”yql --host localhost -p 7438 -t ydb_your_token_hereOr set the token via environment variable:
export YQL_TOKEN=ydb_xxxxxxxx...yql --host localhostyql connected to http://localhost:7438type \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> \clusteryantrikdb> \statsyantrikdb> \qMemory commands (natural language)
Section titled “Memory commands (natural language)”| Command | Purpose |
|---|---|
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 |
Optional fields for remember
Section titled “Optional fields for remember”importance=0.9(0.0-1.0)domain=worksource=usermemory_type=semantic(orepisodic,procedural)valence=0.5(-1.0 to 1.0, emotional tone)half_life=168(decay half-life in hours)certainty=0.95
Filters for recall
Section titled “Filters for recall”top=10— number of resultsdomain=work— limit to a domainsource=user— limit to a sourcememory_type=semantic
Meta commands (psql-style)
Section titled “Meta commands (psql-style)”| Command | Alias | Purpose |
|---|---|---|
\stats | \s | Engine statistics |
\dt | \l | List databases |
\conflicts | \c | List open conflicts |
\personality | \p | Derived personality traits |
\think | \t | Run consolidation + conflict scan |
\cluster | Cluster status (replication / failover) | |
\health | Server health check | |
\json <path> | Raw GET request to any endpoint | |
\help | \h \? | Show help |
\quit | \q | Exit |
Non-interactive mode
Section titled “Non-interactive mode”Run a single command and exit:
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.
Command history
Section titled “Command history”yql saves your command history to ~/.yql_history so you can up-arrow through previous commands across sessions. Same as psql.