Install
openclaw skills install ladybug-opencypherRuns openCypher against Ladybug DB with schema-first DDL, Python sync/async execution, CALL procedures, full-text search (CREATE_FTS_INDEX / QUERY_FTS_INDEX), and Neo4j divergence notes. Use when: (1) Writing or debugging Ladybug Cypher, real_ladybug, or .lbug databases, (2) COPY/LOAD import or structured property graphs, (3) Comparing or migrating queries from Neo4j-style Cypher, (4) FTS extension setup or CALL catalog procedures. NOT for: generic graph theory without Ladybug / openCypher execution context.
openclaw skills install ladybug-opencypherLadybug follows openCypher where possible. Schema, DDL, some clauses, and MATCH semantics differ from Neo4j. Overview: Differences between Ladybug and Neo4j. DDL: Create table.
Ladybug is embedded (in-process) — no server URI; open a file path or :memory: via real_ladybug.
is_trail() / is_acyclic() when you need Neo4j-like trail checks.CALL procedure(...) instead of Neo4j SHOW … for many introspection tasks.Import real_ladybug (Ladybug Python bindings). Full docs: Python API, generated reference.
import real_ladybug as lb
db = lb.Database("path/to/db.lbug")
conn = lb.Connection(db)
rows = conn.execute("""
MATCH (a:User)-[f:Follows]->(b:User)
RETURN a.name, b.name, f.since;
""")
for row in rows:
print(row)
conn.execute / await conn.execute per statement unless the API documents batching.COPY / LOAD FROM paths resolve relative to the process CWD unless absolute.For async, result helpers, UDFs, and Parquet/DataFrame import — see references/api-reference.md.
CREATE NODE TABLE User(name STRING PRIMARY KEY, age INT64);
CREATE NODE TABLE City(name STRING PRIMARY KEY, population INT64);
CREATE REL TABLE Follows(FROM User TO User, since INT64);
CREATE REL TABLE LivesIn(FROM User TO City, MANY_ONE);
Optional IF NOT EXISTS. Multiplicity: MANY_ONE, ONE_MANY, MANY_MANY, ONE_ONE. CREATE NODE TABLE AS / CREATE REL TABLE AS — infer schema from LOAD FROM or MATCH … RETURN.
COPY NodeTable FROM "file.csv" (Parquet and other formats per Import data).LOAD CSV FROM → LOAD FROM in Ladybug.LOAD FROM df / COPY Table FROM df for Pandas/Polars/Arrow without an intermediate file.Load the FTS extension first. Index STRING columns on node tables only; query with CALL QUERY_FTS_INDEX; list with CALL SHOW_INDEXES() RETURN *. Full procedure signatures: references/api-reference.md.
Use the checklist and clause table in references/workflow-patterns.md: walk vs trail, variable-length defaults, unsupported clauses (FOREACH, REMOVE, FINISH, SET +=, …), and CALL vs SHOW.
Bundled helpers (optional — require real_ladybug on PYTHONPATH):
scripts/run_cypher.py — run a Cypher string or .cypher file against a .lbug path.scripts/check_env.py — verify import real_ladybug and print basic info.CALL syntax, and DDL/import tables: references/api-reference.md