E2 for JavaScript and TypeScript

A local-first SDK for Earth feature search, routing, spatial analysis, user-owned data, and space-time cells.

Documentation navigation

Install

terminal
npm install @embed-earth/sdk-test
Use @embed-earth/sdk-test everywhere. The package selects the browser HTTP backend or the Node local-data backend automatically. Import @embed-earth/sdk-test/node only when you need Node-only helpers such as SQLite, cache management, or uploads. The Node runtime requires Node 20 or newer.

Quick start

search.ts
import { E2 } from "@embed-earth/sdk-test";

const e2 = new E2({ cacheDirectory: "./.e2-cache" });
const places = await e2.search({
  feature: ["restaurant", "hospital"],
  area: ["Manhattan", "Brooklyn"],
  mode: "auto", limit: 500,
});

console.log(places.type); // "FeatureCollection"

Browser-safe and Node APIs

ImportIncludes
@embed-earth/sdk-testE2 with browser HTTP search, routing, catalogs, compute builder, and cell operations.
@embed-earth/sdk-test/nodeNode-only cache, database, upload, download, and snapshot helpers.

Search and compute use the browser HTTP /search backend or Node snapshots automatically. Pass a local database as compute only for local analysis.

Guides

Next step