Documentation

Scintirete CLI Command Documentation

This document introduces the restructured Scintirete CLI command structure. Commands are now organized in a more hierarchical subcommand format.

Basic Commands

Connection and System Commands

  • ping - Test connection to server
  • version - Display version information
  • help [command] - Display help information
  • quit / exit - Exit CLI
  • use <database> - Switch to specified database

Persistence Commands

  • save - Synchronously save RDB snapshot
  • bgsave - Asynchronously save RDB snapshot

Subcommand System

Database Operations (database)

database list # List all databases database create <name> # Create new database database drop <name> # Delete database

Examples:

database list database create mydb database drop olddb

Collection Operations (collection)

Note: Need to use use <database> to select database first

collection list # List all collections in current database collection create <name> <metric> [m] [ef_construction] # Create new collection collection drop <name> # Delete collection collection info <name> # Get collection information

Supported distance metrics:

  • L2 / EUCLIDEAN - Euclidean distance
  • COSINE - Cosine distance
  • INNER_PRODUCT / IP - Inner product

HNSW parameters:

  • m - Maximum connections per node (default 16)
  • ef_construction - Search width during construction (default 200)

Examples:

collection list collection create vectors L2 16 200 collection create embeddings COSINE collection info vectors collection drop oldcollection

Vector Operations (vector)

Note: Need to use use <database> to select database first

vector insert <collection> <vector> [metadata] # Insert vector (ID auto-generated) vector search <collection> <vector> [top-k] [ef-search] # Search similar vectors vector delete <collection> <id1> [id2] ... # Delete vectors

Vector format: JSON array, e.g., [1.0, 2.0, 3.0]

ID Management:

  • IDs are automatically generated by the server (uint64 type)
  • Generated ID is returned after successful insertion
  • No need for clients to provide ID parameters

Examples:

vector insert vectors "[1.0, 2.0, 3.0, 4.0]" # ID auto-generated vector search vectors "[1.1, 2.1, 3.1, 4.1]" 10 vector delete vectors 1 2 # Delete vectors with specified IDs

Text Embedding Operations (text)

Note: Need to use use <database> to select database first

text insert <collection> [model] <id> <text> [metadata] # Insert text (auto-embed) text search <collection> [model] <text> [top-k] [ef-search] # Search text (auto-embed)

Model parameter:

  • Optional parameter to specify embedding model (e.g., text-embedding-ada-002)
  • Uses server default model if not specified
  • Model parameter is now positioned after collection for convenient model switching

ID Management:

  • IDs are automatically generated by the server, no need for clients to provide
  • System returns generated ID for future reference

Examples:

# Use default model (ID auto-generated) text insert documents "This is a sample text" text search documents "sample" 5 # Specify model (ID auto-generated) text insert documents text-embedding-ada-002 "Another example" '{"category": "test"}' text search documents text-embedding-3-small "Search query" 10 50

Command Line Options

When starting the CLI, you can use the following options:

scintirete-cli [options] [command]

Options:

  • -h <host> - Server host (default: localhost)
  • -p <port> - Server port (default: 9090)
  • -a <password> - Authentication password
  • -d <database> - Default database to use
  • --help - Display help information

Examples:

# Connect to remote server scintirete-cli -h 192.168.1.100 -p 9090 -a mypassword # Execute command directly scintirete-cli -d mydb collection list # Execute text embedding operation directly scintirete-cli -d mydb text insert documents auto "Test text" # Interactive mode scintirete-cli -h localhost -p 9090

Interactive Mode

Starting CLI without parameters enters interactive mode:

$ scintirete-cli Scintirete CLI v1.0.0 (commit: abc123) Type 'help' for available commands or 'quit' to exit. scintirete> use mydb Switched to database 'mydb'. scintirete[mydb]> collection list Collections: 1) vectors (dimension: 4, vectors: 100, metric: L2) 2) embeddings (dimension: 768, vectors: 50, metric: COSINE) scintirete[mydb]> vector search vectors "[1.0, 2.0, 3.0, 4.0]" 5 Search completed in 2.35ms, found 5 results: 1. ID: 1, Distance: 0.000000 2. ID: 15, Distance: 0.123456 ... scintirete[mydb]> text search documents "hello world" 3 Search results for text: "hello world" Found 3 results: 1. ID: 42, Distance: 0.234567 2. ID: 128, Distance: 0.345678 ...