pub enum Command {
Show 24 variants
Version,
Init {
path: Option<PathBuf>,
},
Ingest {
path: Option<PathBuf>,
stdin: bool,
uri: Option<String>,
kind: Option<String>,
append: bool,
store: Option<PathBuf>,
no_ignore: bool,
include_ext: Vec<String>,
follow: bool,
follow_interval_secs: u64,
follow_idle_timeout_secs: Option<u64>,
format: Format,
},
Diff {
path: Option<PathBuf>,
store: Option<PathBuf>,
format: Format,
},
Export {
store: Option<PathBuf>,
path: Option<String>,
query: Option<String>,
output: Option<PathBuf>,
},
Forget {
pattern: String,
store: Option<PathBuf>,
apply: bool,
format: Format,
},
Inspect {
store: Option<PathBuf>,
limit: usize,
format: Format,
},
Entities {
store: Option<PathBuf>,
kind: Option<EntityKindArg>,
value_contains: Option<String>,
session_id: Option<String>,
limit: usize,
show_chunks: usize,
show_sessions: usize,
show_projects: usize,
show_users: usize,
show_topics: usize,
format: Format,
},
EntityNeighbors {
id: String,
store: Option<PathBuf>,
kind: Option<EntityKindArg>,
session_id: Option<String>,
limit: usize,
show_chunks: usize,
show_sessions: usize,
show_projects: usize,
show_users: usize,
format: Format,
},
EntitySessionNeighbors {
id: String,
store: Option<PathBuf>,
kind: Option<EntityKindArg>,
session_id: Option<String>,
limit: usize,
show_sessions: usize,
show_projects: usize,
show_users: usize,
show_chunks: usize,
format: Format,
},
Sessions {
store: Option<PathBuf>,
limit: usize,
format: Format,
},
RelatedSessions {
session_id: String,
store: Option<PathBuf>,
limit: usize,
show_entities: usize,
format: Format,
},
TemporalSessions {
session_id: String,
store: Option<PathBuf>,
window_secs: Option<i64>,
limit: usize,
format: Format,
},
Stash {
store: Option<PathBuf>,
format: Format,
},
Memory {
command: MemoryCommand,
},
Feedback {
chunk_id: String,
vote: FeedbackVote,
store: Option<PathBuf>,
format: Format,
},
QuerySuccess {
chunk_id: String,
store: Option<PathBuf>,
format: Format,
},
Compact {
store: Option<PathBuf>,
half_life_secs: u64,
minimum_age_secs: u64,
dry_run: bool,
format: Format,
},
Reindex {
store: Option<PathBuf>,
format: Format,
},
Show {
id: String,
store: Option<PathBuf>,
show_entities: usize,
format: Format,
},
Embed {
store: Option<PathBuf>,
model: String,
ollama_url: String,
limit: Option<usize>,
format: Format,
},
Search {Show 14 fields
query: String,
store: Option<PathBuf>,
limit: usize,
kind: Option<String>,
path: Option<String>,
session_id: Option<String>,
format: SearchFormat,
semantic: bool,
vec_semantic: bool,
hybrid: bool,
model: String,
instruction: Option<String>,
ollama_url: String,
min_confidence: Option<f64>,
},
Mcp {
store: Option<PathBuf>,
port: Option<u16>,
},
Query {
query: String,
store: Option<PathBuf>,
limit: usize,
kind: Option<String>,
path: Option<String>,
session_id: Option<String>,
format: SearchFormat,
min_confidence: Option<f64>,
},
}Variants§
Version
Print the lantern version (same output as --version)
Init
Initialize a local Lantern store
Ingest
Ingest files/directories, or content piped in via stdin
Fields
kind: Option<String>Kind for stdin content (default: text/plain). Use application/jsonl to trigger the transcript extractor.
append: boolAppend-only stdin ingest: preserve each batch as its own source under a unique derivative of –uri. Use for session transcripts streamed in chunks under a stable session label.
include_ext: Vec<String>Additional file extensions to treat as ingestible. Accepts a
comma-separated list like proto,sql,tf and normalizes away any
leading dots.
follow: boolPoll the target path and re-ingest new or modified files on a fixed interval. Runs until interrupted (Ctrl-C). Useful for live transcript directories where agent sessions keep appearing.
Diff
Compare indexed filesystem sources against the current filesystem
Fields
Export
Export sources and chunks as JSON (optionally filtered)
Fields
Forget
Remove indexed sources (and their chunks) whose path or URI matches
Fields
Inspect
Report store status: schema version, counts, recent sources
Fields
Entities
List entities extracted from ingested chunks (URLs, repository slugs, domains, emails, file paths, @-mentions, #hashtags). Ordered by chunk-reference count, then value.
Fields
kind: Option<EntityKindArg>Restrict to a single entity kind (url, repo, domain, email, filepath, mention, hashtag)
value_contains: Option<String>Only include entities whose value contains this substring (literal,
case-sensitive — % and _ are matched literally).
session_id: Option<String>Restrict to entities that appear in chunks tagged with this exact
session_id. When set, chunk counts (and any sampled chunk refs)
reflect the within-session count, not the global tally.
limit: usizeMaximum number of entries to return. Total match count is reported independently so truncation is visible.
show_chunks: usizeInclude up to N linked chunk references per entity (chunk id, source uri, short snippet). Default 0 — chunk references are omitted, preserving the cheap flat listing. Set this to walk the entity → chunk graph edge in one call.
show_sessions: usizeInclude up to N sampled session_id values per entity as concrete
evidence of which sessions reference it. Default 0 — evidence is
omitted, preserving the cheap default listing. Under
--session-id the sample collapses to that single id.
show_projects: usizeInclude up to N distinct upstream project values per entity as
concrete evidence of which projects reference it. Default 0 —
evidence is omitted, preserving the cheap default listing. Under
--session-id the sample is scoped to that session’s chunks but
does NOT collapse to one project: a session may legitimately span
multiple projects.
show_users: usizeInclude up to N distinct upstream user values per entity as
concrete evidence of which users reference it. Default 0 —
evidence is omitted, preserving the cheap default listing. Under
--session-id the sample is scoped to that session’s chunks but
does NOT collapse to one user: a single session may legitimately
span multiple users (e.g. a shared agent thread).
show_topics: usizeInclude up to N distinct upstream topic values per entity as
concrete evidence of which topics reference it. Default 0 —
evidence is omitted, preserving the cheap default listing. Under
--session-id the sample is scoped to that session’s chunks but
does NOT collapse to one topic: a single session may legitimately
span multiple topics.
EntityNeighbors
List entities that co-occur with the given entity id (i.e. share at least one chunk with it), ranked by shared-chunk count.
Fields
kind: Option<EntityKindArg>Restrict neighbors to a single entity kind
session_id: Option<String>Restrict the traversal to chunks tagged with this exact
session_id. When set, both shared-chunk counts and any sampled
shared-chunk evidence are scoped to that session, so a neighbor
only surfaces if it co-occurs with the source inside the session.
show_chunks: usizeInclude up to N shared chunk references per neighbor (chunk id, source uri, short snippet). Default 0 keeps the flat neighbor view.
show_sessions: usizeInclude up to N sampled distinct session_id values per neighbor,
drawn from the chunks shared with the source entity. Default 0
keeps the cheap default shape; under --session-id the sample
collapses to that single id.
show_projects: usizeInclude up to N sampled distinct non-NULL project values per
neighbor, drawn from the chunks shared with the source entity.
Default 0 keeps the cheap default shape; under --session-id the
sample is scoped to that session’s chunks but does NOT collapse to
one project (a session may legitimately span multiple projects).
show_users: usizeInclude up to N sampled distinct non-NULL user values per
neighbor, drawn from the chunks shared with the source entity.
Default 0 keeps the cheap default shape; under --session-id the
sample is scoped to that session’s chunks but does NOT collapse to
one user (a single session may legitimately span multiple users —
e.g. a shared agent thread).
EntitySessionNeighbors
List entities that share at least one session with the given entity id,
ranked by shared-session count. Unlike entity-neighbors, two entities
can surface here without ever sharing a chunk — it is enough that both
appear inside the same session. Chunks with no session_id are
excluded on both sides.
Fields
kind: Option<EntityKindArg>Restrict neighbors to a single entity kind
session_id: Option<String>Restrict the traversal to chunks tagged with this exact
session_id. When set, the source must appear in that session for
any neighbors to surface, and every surviving neighbor must also
appear in that session. source_session_count, per-neighbor
shared_sessions, and session_count all collapse to 0 or 1 by
construction (the filter pins everything to a single session).
limit: usizeMaximum number of session-neighbors to return. Total count is reported independently so truncation is visible.
show_sessions: usizeInclude up to N sampled shared session_id values per neighbor as
concrete evidence for the same-session edge. Defaults to 0 (no
evidence in text or JSON) so the cheap default shape is preserved.
When a --session-id filter is set the sample collapses to that
single id.
show_projects: usizeInclude up to N sampled distinct non-NULL project values per
neighbor, drawn from the chunks (containing the source or neighbor)
within the sessions they share. Default 0 keeps the cheap default
shape; under --session-id the sample is scoped to that session’s
chunks but does NOT collapse to one project (a session may
legitimately span multiple projects).
show_users: usizeInclude up to N sampled distinct non-NULL user values per
neighbor, drawn from the chunks (containing the source or neighbor)
within the sessions they share. Default 0 keeps the cheap default
shape; under --session-id the sample is scoped to that session’s
chunks but does NOT collapse to one user (a single session may
legitimately span multiple users — e.g. a shared agent thread).
show_chunks: usizeInclude up to N sampled chunk references (chunk id, source uri,
short snippet) per neighbor as concrete evidence for the
same-session edge. Each sampled chunk lives inside a session shared
by both entities and references at least one of them — unlike
entity-neighbors, the chunk need NOT contain both. Default 0
keeps the cheap default shape; under --session-id the sample is
scoped to that single session’s chunks.
Sessions
List sessions grouped from chunk session_id metadata. Read-only;
chunks without a session_id are excluded.
Fields
RelatedSessions
List sessions that share at least one entity with the given session, ranked by shared-entity count.
Fields
limit: usizeMaximum number of related sessions to return. Total count is reported independently so truncation is visible.
TemporalSessions
List sessions whose timestamp ranges are closest to the given session.
Fields
window_secs: Option<i64>Maximum temporal gap in seconds. Omit to rank every timestamped session by gap and session id.
Stash
Snapshot the current store to a dated tar.gz archive under
Fields
Memory
Create, list, and archive first-class memory records.
Fields
command: MemoryCommandFeedback
Record user feedback (thumbs-up / thumbs-down) for a chunk.
The chunk id is the 32-hex value shown in search --format json hits
(and the detailed text output). Feedback is additive — repeated up
votes keep lifting the score, down votes subtract. Net scores feed
into the search confidence blend via compute_confidence.
Fields
vote: FeedbackVoteVote direction
QuerySuccess
Record an observed query-success for a chunk.
This increments query_success_count, the positive-only signal used by
confidence scoring to reflect that a chunk actually helped answer a
query.
Fields
Compact
Compact stale access metadata so old reads stop dominating confidence.
Fields
Reindex
Rebuild the full-text index from stored chunks
Fields
Show
Display full provenance and chunk text for a single source
Fields
Embed
Generate embeddings for chunks that don’t have them yet (via Ollama)
Fields
Search
Keyword, semantic, or hybrid search over ingested chunks
Fields
kind: Option<String>Only include hits whose source kind matches exactly (e.g. text/markdown, text/plain, application/jsonl)
format: SearchFormatOutput format: summary (compact, default), text (per-hit provenance block), or json (machine-readable envelope)
Mcp
Expose Lantern over the Model Context Protocol (stdio by default).
Fields
Query
Alias for search tuned for broader exploration: defaults to a
limit of 20 and the compact summary format. Supports the same
filters as search.
Fields
format: SearchFormatOutput format
Trait Implementations§
Source§impl FromArgMatches for Command
impl FromArgMatches for Command
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Subcommand for Command
impl Subcommand for Command
Source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
Source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Self can parse a specific subcommand