Skip to main content
Use lambdadb for project-scoped collection management, JSONL imports, queries, and ID-based fetches. To transfer data from Qdrant, Pinecone, or Elasticsearch with inventory, mappings, and checkpoints, use the separate Migration CLI.

Install

The stable release covered by this guide is 0.1.0. Choose one installation method and check command -v lambdadb before switching package managers.
Requires Node.js 22.14.0 or later and npm.
To update to the current stable channel:
To remove:
Installed copies do not update themselves. Pin an exact version for reproducible npm installs; @dev is a separate prerelease channel. See CLI releases and the public tap for availability.

Configure a project

LambdaDB Cloud uses region-specific API base URLs. Use your project’s base URL and project name, together with a project API key created in its API Keys tab. Project creation does not automatically issue a key; save the full value when you create it, because it is shown only once. See API key management. Do not assume a global default URL or a fixed project name.
Use an existing development project and replace the placeholders below. The endpoint is your region’s HTTPS API origin, without /projects/.... The CLI does not create projects or issue keys.
Supply the key through your shell or a CI secret manager. For example, in Bash, read it without putting the value in shell history:
configure saves only the endpoint, project, and name of the key environment variable; it makes no service call. doctor checks authentication and collection-list access. Success does not prove write permission or search readiness.

Create a collection and import JSONL

Choose a new collection name in your development project. Run these examples in a scratch directory. Create an index configuration file containing the field-to-index map, without an indexConfigs wrapper:
Create and import a UTF-8 JSONL file:
--branch main explicitly selects the writable branch. Import validates the entire file before sending sequential batches. Each nonblank line must be a JSON object; files are limited to 64 MiB and 100,000 documents. Existing IDs are upserted, so replay can replace data. Omitted IDs are generated by the service and are not returned in the acceptance response; replay can create duplicates.
Creation reports state: "created"; successful import reports state: "accepted". Both report searchable: "not_verified". Accepted writes are not proof that indexing has completed or documents are searchable. After a delay, repeat reads and inspect the expected IDs and contents. Do not recreate the collection or replay imports as a waiting mechanism.

Query and fetch by ID

Save a query request and select the read ref explicitly:
After indexing, the query should include doc-1, and fetch should return the three IDs. Initial reads can be empty or encounter a transient loading error. A successful empty result still exits with 0; fetch includes missingIds for absent documents. For eligible pending ordinary writes, fetch can use:
For query, set "consistentRead": true in the request file. These reads require a direct branch ref, exclude pending bulk imports, and can return 429. They do not establish committed indexing. See Data versioning.

Select collections and refs

  • Endpoint and project come from configuration, environment, or flags. --collection is required for collection-specific operations.
  • Import requires --branch NAME. Query and fetch require --ref branch:NAME, --ref tag:NAME, or --ref alias:NAME; the CLI does not silently select main.
  • Tags and aliases must already exist. The CLI does not create or manage refs. Branches and aliases can move between calls.
  • If a query file contains ref, it must match --ref. Query size is 1–100, and fetch accepts up to 100 IDs.
List collections with lambdadb collections list --json. One page is returned by default; use --page-token with the returned nextPageToken, or --all to fetch all pages within the network budget.

Configuration and credentials

The default config path is ${XDG_CONFIG_HOME:-$HOME/.config}/lambdadb/config.json. It is user-local, not discovered from the working repository. The CLI does not load .env files. Explicit empty values fail validation. An explicitly selected missing config file fails except when configure creates it. configure uses the same precedence when saving settings. For a different secret variable, use lambdadb configure --api-key-env MY_PROJECT_KEY, then supply MY_PROJECT_KEY in the process environment. No command accepts the raw API key as an argument. Config files are written atomically with mode 0600 on POSIX; only the variable name is persisted. Avoid shell tracing around secrets. The active key is redacted from output, but document contents remain visible. SDK debug logging is disabled even if LAMBDADB_DEBUG is set.

JSON output and failures

--json emits one object and a newline on stdout, including command failures. It uses schemaVersion: 1, command, ok, and optional target, data, and error. Diagnostics go to stderr. Help and version remain plain text. Invoke the executable directly for machine-readable output. Import reports accepted, failed, unknown, and notAttempted counts plus batch line ranges. A timeout or disconnect after dispatch can mean an unknown outcome. There are no automatic write retries, durable checkpoints, or resume support in the general CLI. Inspect the target and report before constructing a retry. The shared network budget covers retries, pages, batches, and large-result downloads. Use --timeout-ms 120000 for a longer operation. Optional --mode bulk uses bulk ingestion; it is unsupported for managed embedding vector fields. See Bulk upsert data.

Next steps