laurus-cli 0.3.0

Command-line interface for the Laurus search engine
laurus-cli-0.3.0 is not a library.

laurus-cli

Crates.io License: MIT

Command-line interface for the Laurus search engine.

Features

  • Index management -- Create and inspect indexes from TOML schema files, with an interactive schema generator
  • Document CRUD -- Add, put (upsert), retrieve, and delete documents via JSON
  • Search -- Execute queries using the Laurus Query DSL
  • Dual output -- Human-readable tables or machine-parseable JSON (--format json)
  • Interactive REPL -- Explore your index in a live session with command history
  • Server integration -- Start a gRPC server or MCP server directly from the CLI

Installation

cargo install laurus-cli

Quick Start

# Create an index from a schema file
laurus --index-dir ./my_index create index --schema schema.toml

# Add a document
laurus --index-dir ./my_index add doc \
  --id doc1 --data '{"title":"Hello","body":"World"}'

# Put (upsert) a document
laurus --index-dir ./my_index put doc \
  --id doc1 --data '{"title":"Updated","body":"Content"}'

# Commit changes
laurus --index-dir ./my_index commit

# Search
laurus --index-dir ./my_index search "body:world"

# Get documents by ID
laurus --index-dir ./my_index get docs --id doc1

# Delete documents by ID
laurus --index-dir ./my_index delete docs --id doc1

# Start the interactive REPL
laurus --index-dir ./my_index repl

Commands

Command Description
create index [--schema <FILE>] Create a new index (interactive wizard if no schema given)
create schema [--output <FILE>] Interactive schema generation wizard
get stats Show index statistics
get schema Show the current schema as JSON
get docs --id <ID> Get all documents (including chunks) by ID
add doc --id <ID> --data <JSON> Add a document as a new chunk (append)
add field --name <NAME> --field-option <JSON> Dynamically add a field to the index
put doc --id <ID> --data <JSON> Put (upsert) a document (replaces existing)
delete docs --id <ID> Delete all documents (including chunks) by ID
delete field --name <NAME> Remove a field from the schema
commit Commit pending changes to disk
search <QUERY> [--limit N] [--offset N] Execute a search query
repl Start an interactive REPL session
serve [OPTIONS] Start the gRPC server
mcp [--endpoint <URL>] Start the MCP server on stdio

Documentation

License

This project is licensed under the MIT License - see the LICENSE file for details.