target/release/zlf repl [db_path]
Opens or reopens a database at db_path (default from configuration). The REPL reads facts, rules, directives, and queries:
node(alice, [person], { name: "Alice" }).
knows(alice, bob).
friend(X, Y) :- knows(X, Y).
? knows(alice, Who).
? retract(knows(alice, bob)).
? or :- are parsed as facts and applied through the storage writer.? ... runs a query; :- ... runs a directive or rule...:quit, :exit, or Ctrl-D; :help prints examples.? person(X).
? property(X, name, Value).
? bm25("软件", Node, Score).
node(alice, [person], { name: "Alice" }).
edge(alice, knows, bob, { since: 2024 }).
impart(zlf, katurupi, tongtong).
friend(X, Y) :- knows(X, Y).
? retract(person(alice)).
? retract(edge(alice, knows, bob)).
? retract(prop_name(alice, _)).
? retract(impart(zlf, _, _)).
A successful ground query has no variable bindings and prints as [{}]. Queries with variables print a JSON array of binding objects. Errors print error: <message>.