lantern-ops

Operate Lantern graph data through the lantern-cli command-line interface.

2|Updated May 3, 2023
One-click install
npx skills add https://github.com/anaregdesign/lantern --skill lantern-ops-anaregdesign
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: lantern-ops
Source: https://github.com/anaregdesign/lantern/tree/main/.github/skills/lantern-ops
Command: npx skills add https://github.com/anaregdesign/lantern --skill lantern-ops-anaregdesign

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Operating data in a running Lantern key-vertex-store requires knowing the exact lantern-cli grammar, flags, TTL semantics, and edge write semantics; this Skill provides the canonical command reference so agents and users issue correct data commands without reading server source code. ## Core Features & Use Cases - Vertex and Edge CRUD: get, put, delete, scan, count, and keys commands with typed values, TTLs, and prefix-based enumeration. - Graph Walks: run bfs, pagerank, and community traversals from a seed key and receive the visited subgraph as JSON. - Bulk Operations: stream NDJSON bulk loads, take whole-graph dump/restore backups, and safely purge keyspaces with the gated delete-prefix command. - Use Case: An agent asked to "find items related to user:42 and purge the tmp/ namespace" can run lantern-cli bfs user:42 --step 2 for the graph walk, then lantern-cli delete-prefix vertices tmp/ dry_run=true followed by confirm=yes for a safe cleanup. ## Quick Start Ask the assistant to fetch a vertex or run a graph walk, for example: use the lantern-ops skill to get the vertex alice and run a bfs walk from it with step 2.

Frequently Asked Questions about lantern-ops

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I read and write data in Lantern from the command line?

Use lantern-cli get vertex <key> to fetch a vertex and lantern-cli put vertex <key> <value> [ttl_seconds] to upsert one. Values are auto-typed (int, float, bool, datetime, string) and can be forced with a type= token; reads print JSON and writes print OK.

What is the difference between add edge and put edge in Lantern?

add edge is additive: repeated calls sum the weight on the same (tail, head) pair, suiting streaming counts and interaction signals. put edge replaces the weight wholesale and is idempotent, suiting measured properties like similarity or distance.

How do I run a graph traversal like BFS or PageRank in Lantern?

Run lantern-cli bfs <seed>, lantern-cli pagerank <seed>, or lantern-cli community <seed> to execute a read-only graph walk. Each returns the visited subgraph as JSON with vertices and edges, tunable via flags like --step, --fan-out, --top-n, and --weighting.

Does lantern-cli support bulk loading and backups?

Yes. lantern-cli bulk streams NDJSON files into batched vertex or edge writes, while lantern-cli dump and restore capture and replay a consistent whole-graph snapshot in protobuf or NDJSON format. Already-sent batches are not rolled back on error.

Why does delete-prefix vertices refuse to run in lantern-cli?

The command is intentionally gated because it bulk-deletes every live vertex under a prefix. You must pass dry_run=true to preview the match count or confirm=yes to execute the deletion; otherwise it exits non-zero with suggested next steps.

When should I not use the lantern-ops CLI skill?

Do not use it for editing Lantern's Go source code, regenerating protobuf or wire code, server deployment and infrastructure-as-code, or the MCP working-context tools. It covers only data operations against a running Lantern server via lantern-cli.