skeg-cli
Operator tools for skeg. Three
subcommands: build (offline Vamana index builder), inspect (data
directory introspection), and stats (RESP3 client for live server
counters).
&&
Pre-built aarch64 tarballs (Apple Silicon, Linux ARM) are attached to every GitHub Release.
Commands
build: offline Vamana index
Reads a vector dataset, constructs a Vamana graph, and writes a ready-to-serve skeg data directory. For a static corpus (RAG dump, embedding snapshot, scientific dataset) building offline gives the server a clean index instead of paying the streaming-insert path's consolidation cost.
| Flag | Meaning | Default |
|---|---|---|
--input <FILE> |
Dataset: .npy (NumPy v1.0 little-endian f32, C order) or .fbin ([u32 n][u32 dim][f32 data]) |
required |
--output <DIR> |
Output data directory (created if missing) | required |
--name <NAME> |
VINDEX name the server will register | default |
--r <R> |
Max graph out-degree | 64 |
--l <L> |
Query-time search-list size | 100 |
Then serve it:
# or
The input file is memory-mapped: vectors are read from the mapping rather than copied into the heap, so a dataset close to or larger than RAM can still be indexed.
inspect: what's in a data directory
Walks a data directory, enumerates every shard-<N>/ subdirectory,
lists the VINDEXes registered in each, and prints their dim, vector
count, and on-disk sizes. The server does not need to be running.
vindex=docs dim=1024 n=1000000 graph=512.00
n is ? when the VINDEX directory exists but DiskVamanaIndex::open
fails (interrupted build, corrupted graph, partial write). kv_bytes
sums every regular file directly under shard-<N>/ that is not a
vindex-* subdirectory: the vLog segments and the index snapshot.
stats: live server counters
Connects to a running skeg-resp3 server, runs HELLO 3,
SKEG.STATS, SKEG.SHARDS, and SKEG.VINDEX.LIST, and prints the
combined result. Read-only; the TCP connection is closed before exit.
)
For a live dashboard over the same data points, use
skeg-top.
Global flags
| Flag | Meaning |
|---|---|
-h, --help |
Print help (top-level or for a specific subcommand) |
-V, --version |
Print the version |
Library use
skeg-cli also ships as a library. The skeg_cli crate exposes:
build_index,build_index_from,read_vectors,read_header,BuildStatsfor building indexes from Rust code.inspect::inspectreturning anInspectReportfor embedding the data-directory walker in another tool.stats::fetchreturning aServerStatsfor embedding the RESP3 client.
use Path;
use ;
use VamanaConfig;
build_index?;
let report = inspect?;
println!;
let s = fetch?;
println!;
License
Apache-2.0. See LICENSE.