GitHub API Docs Crystal USearch

CAPABILITIES

Text Chunking
Smart segmentation of documents into optimal-sized pieces for embedding
Embedding Storage
Content-hash deduplication with SQLite registry and persistent vector store
HNSW Search
Fast approximate nearest neighbor search powered by USearch
Text Storage
Optional persistent text with LIKE pattern and FTS5 full-text search
Vocabulary
Word-level semantic similarity built from indexed content
CLI Tool
Index, search, and manage everything from the command line

CLI USAGE

Build the tool, then index, search, and explore.

cd my-project memo index * memo search "database connection pooling" [F3] src/db/pool.cr (score: 0.823) 12 | def connect(config : DBConfig) 13 | pool = ConnectionPool.new(config) [F7] src/db/query.cr (score: 0.781) 45 | # Reuse pooled database connections 46 | conn = pool.checkout 2 result(s) memo terms "database" 0.70 data 0.70 databases 0.57 sqlite

QUICK START

Add Memo to your Crystal project in minutes.

shard.yml
dependencies: memo: github: trans/memo
require "memo" # Create service with database path memo = Memo::Service.new( db_path: "./memo.db", format: "openai", api_key: ENV["OPENAI_API_KEY"] ) # Index a document memo.index( source_type: "article", source_id: 42_i64, text: "Your document text here..." ) # Search results = memo.search(query: "search query", limit: 10) results.each do |r| puts "#{r.source_type}:#{r.source_id} (score: #{r.score})" end # Clean up memo.close

SUPPORTED PROVIDERS

Plug in your preferred embedding service.

text-embedding-3-small
text-embedding-3-large
voyage-3, voyage-3-lite
voyage-code-3
Deterministic embeddings
for testing