moss.
Authentication
Credentials are resolved in this order:- CLI flags:
--project-idand--project-key - Environment variables:
MOSS_PROJECT_IDandMOSS_PROJECT_KEY - Config profile: selected by
--profile,MOSS_PROFILE, or the active profile in~/.moss/config.json
Quick start
Index management
| Flag | Description |
|---|---|
--file / -f | Path to JSON/CSV document file, or - for stdin |
--model / -m | Embedding model (default: moss-minilm) |
--wait / -w | Block until the build job finishes |
--poll-interval | Seconds between status checks (default: 2.0) |
--confirm / -y | Skip confirmation prompt on delete |
Document management
| Flag | Description |
|---|---|
--file / -f | Path to JSON/CSV document file, or - for stdin |
--upsert / -u | Update documents that already exist |
--ids / -i | Comma-separated document IDs |
--wait / -w | Block until the job finishes |
Query
Queries download the index locally by default and run on-device. Add--cloud to skip the download and hit the cloud query API.
| Flag | Description |
|---|---|
--top-k / -k | Number of results (default: 10) |
--alpha / -a | Semantic weight; 0.0 is pure keyword, 1.0 is pure semantic (default: 0.8) |
--cloud / -c | Query via cloud API instead of downloading the index |
--filter | Metadata filter as JSON string. Local mode only. |
--interactive | REPL session against a single loaded index |
Interactive mode
--cloud) and is not compatible with --json. With redirected or piped stdin, the piped query is run once and the session exits.
Job tracking
Profiles
Document file formats
JSON
{"documents": [...]}.
CSV
stdin
Global options
| Flag | Short | Description |
|---|---|---|
--project-id | -p | Project ID; overrides env and config |
--project-key | Project key; overrides env and config | |
--profile | Credential profile name; overrides MOSS_PROFILE | |
--json | Machine-readable JSON output | |
--verbose | -v | Enable debug logging |
Models
| Model | Description |
|---|---|
moss-minilm | Lightweight, optimized for speed (default) |
moss-mediumlm | Higher accuracy with reasonable performance |
custom | Used automatically when documents include pre-computed embeddings |