CLI (Command-Line Interface)
Laurus provides a command-line tool laurus that lets you create indexes, manage documents, and run search queries without writing code.
Features
- Index management — Create and inspect indexes from TOML schema files, with an interactive schema generator
- Document CRUD — Add, retrieve, and delete documents via JSON
- Search — Execute queries using the Query DSL
- Dual output — Human-readable tables or machine-parseable JSON
- Interactive REPL — Explore your index in a live session
- gRPC server — Start a gRPC server with
laurus serve
Getting Started
# Install
cargo install laurus-cli
# Generate a schema interactively
laurus create schema
# Create an index from the schema
laurus --data-dir ./my_index create index --schema schema.toml
# Add a document
laurus --data-dir ./my_index add doc --id doc1 --data '{"title":"Hello","body":"World"}'
# Commit changes
laurus --data-dir ./my_index commit
# Search
laurus --data-dir ./my_index search "body:world"
See the sub-sections for detailed documentation:
- Installation — How to install the CLI
- Commands — Full command reference
- Schema Format — Schema TOML format reference
- REPL — Interactive mode