Installation
Quick start
topk import discovers a schema, shows the plan, and imports on confirmation — see import.Authentication
To authenticate, run:Commands
login
Log in with TopK CLI:If the CLI cannot open your browser automatically, or you prefer to open it manually, use
topk login --no-browser to print the login URL.logout
Remove the saved session:project
list
List projects in the current organization.get
Get a project by ID.create
Create a project.delete
Delete a project by ID.region
list
List available regions.import
Bulk import into TopK collections. Every run prints the plan as a TOML spec and asks before writing; collections are created right after.Authenticate
Log in, then provide--project-id and --region when importing:
Import a database
<object>=<collection> renames.
Import files
Copy a TopK collection
Preview and edit the plan
Resume a stopped run
Stop a run —^C, a lost connection — and pick it up where it left off:
--resume, a re-run re-imports everything — upserts are idempotent.
Sources
Spec
One TOML table per collection —from, id, filter/partition/limit as the flags, and a fields whitelist (only declared fields import):
Discovery takes the source’s types; declaring a different
type converts. Embeddings that arrive as float lists, text ("[1,2,3]") or packed bytes become vectors by declaring f32_vector and dim (f32_matrix and cols for multi-vectors); a sparse vector reads numeric keys or parallel indices/values lists; epoch numbers or date text become timestamp. Conversions are exact or the document fails; a narrower declaration (truncate included) is how loss is accepted.
Failures and limits
A document fails when a value does not convert exactly, its id is missing or empty, or it is over 200 KB. A failure stops the run, ready to--resume; --continue-on-error skips them instead.
- there is no schema migration: an existing collection whose schema differs is rejected
- an upsert replaces the whole document, so a spec that omits an existing field clears it
Global flags
These flags are accepted by every command:--output
Options:
text(default)json