/install ladybug-opencypher
Ladybug openCypher
Ladybug 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.
Core principles
- Schema first — node and relationship tables must exist before insert. One label per node/rel table; every node table needs a primary key.
- Walk vs trail — patterns use walk semantics (edges may repeat). Use
is_trail()/is_acyclic()when you need Neo4j-like trail checks. - Variable-length paths — require an upper bound for termination; if omitted, default upper bound is 30.
- Catalog — prefer
CALL procedure(...)instead of Neo4jSHOW …for many introspection tasks.
Execute from Python (quick start)
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.executeper statement unless the API documents batching.- Multiple statements (semicolon-separated) return a list of results; a single statement returns one result.
COPY/LOAD FROMpaths resolve relative to the process CWD unless absolute.
For async, result helpers, UDFs, and Parquet/DataFrame import — see references/api-reference.md.
Schema snippet (DDL)
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.
Import
COPY NodeTable FROM "file.csv"(Parquet and other formats per Import data).- Neo4j’s
LOAD CSV FROM→LOAD FROMin Ladybug. - In Python:
LOAD FROM df/COPY Table FROM dffor Pandas/Polars/Arrow without an intermediate file.
Full-text search (FTS)
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.
When results differ from Neo4j
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.
Utility scripts
Bundled helpers (optional — require real_ladybug on PYTHONPATH):
scripts/run_cypher.py— run a Cypher string or.cypherfile against a.lbugpath.scripts/check_env.py— verifyimport real_ladybugand print basic info.
Additional resources
- Detailed Python API, FTS
CALLsyntax, and DDL/import tables: references/api-reference.md - Debugging workflows, Neo4j comparison table, query habits: references/workflow-patterns.md
Doc links
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install ladybug-opencypher - 安装完成后,直接呼叫该 Skill 的名称或使用
/ladybug-opencypher触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
ladybug-opencypher 是什么?
Runs openCypher against Ladybug DB with schema-first DDL, Python sync/async execution, CALL procedures, full-text search (CREATE_FTS_INDEX / QUERY_FTS_INDEX)... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 142 次。
如何安装 ladybug-opencypher?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install ladybug-opencypher」即可一键安装,无需额外配置。
ladybug-opencypher 是免费的吗?
是的,ladybug-opencypher 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
ladybug-opencypher 支持哪些平台?
ladybug-opencypher 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 ladybug-opencypher?
由 Hugo(@trenza1ore)开发并维护,当前版本 v1.0.0。