@embed-earth/cli-test
The e2 command-line interface for Earth feature search, cache management,
routing, cloud/local compute, and geospatial storage.
Product: embed.earth · Docs:
CLI docs · Docs home
Related interfaces: SDK docs and MCP
docs.
The CLI is the terminal interface to the same capabilities exposed by the
@embed-earth/sdk-test
SDK and the @embed-earth/mcp-test
MCP server.
Install
Route commands use https://route.embed.earth by default. Set ROUTE_URL to
use another compatible routing service.
npm install -g @embed-earth/cli-test
earth search restaurant --area Manhattan --limit 100
earth cache set 5GB
earth compute count restaurant --db ./e2.db --near park --distance 500
earth storage upload ./places.geojson --db ./e2.db --connect-to restaurant
earth map sources restaurant hospital
Cell encode/decode and catalog commands are also retained. Use earth --help for
the complete command tree. map sources returns MapLibre-ready Planet and
published feature PMTiles sources.
Command layout
| Search | earth search | Search features and return GeoJSON |
| Cache | earth cache set, list, delete, clear | Manage downloaded snapshots |
| Route | earth route run, matrix, isochrone, map-match, to-feature, request | Routing and network analysis |
| Compute | earth compute <primitive>, compare | Cloud, cached, or local spatial analysis |
| Catalogs | earth features, regions, datasets | Discover and resolve catalog entries |
| Storage | earth storage upload, import, import-file, query, stats | Work with local datasets |
| Map | earth map sources | Resolve MapLibre-ready sources |
| Cells | earth cell encode, decode, neighbors, and parent/temporal helpers | Work with E2 cells |
Common options
--json | Emit machine-readable JSON |
--area <name> | Use a named area |
--area-id <id> | Use an exact area ID |
--mode <cloud|offline|auto> | Select the search or compute backend |
--db <path> | Use a local SQLite database |
--limit <number> | Bound returned rows |
Use --area for a human-readable name or --area-id for an exact catalog ID.
You can search available regions and
search available features before
running a command.
Quick workflows
Search
Search returns a GeoJSON FeatureCollection. Use a named --area when a
human-readable place is enough, or the exact raw --area-id when it is not.
earth search restaurant --area "New York" --limit 25 --json
earth search restaurant hospital --area-id 4915 --bbox "-74.1,40.65,-73.9,40.85" --limit 100
earth search restaurant --area-id 4915 --where "wheelchair=yes" --columns "id,name,lat,lng" --limit 50
Compute
Compute accepts nearest, distance, within, count, density,
coverage, gaps, and cluster. Use --near or --within with --distance
in meters for a spatial relation. Add --db to run against a local SQLite
database.
earth compute nearest restaurant --area-id 4915 --near park --distance 500 --limit 3 --json
earth compute density restaurant --db ./e2.db --area "New York" --limit 1000
earth compute compare --features restaurant,school --area "New York" --primitive COUNT --json
Route
Routes use https://route.embed.earth by default. Set ROUTE_URL only when
you intentionally need another compatible routing service.
earth route run --locations "40.74,-73.99;40.71,-74.01" --mode walking --json
earth route matrix --sources "40.74,-73.99;40.71,-74.01" --targets "40.73,-73.98" --mode driving --json
earth route to-feature hospital --from "40.74,-73.99" --area "New York" --mode walking --json
Local data and maps
Manage downloaded snapshots, index your own GeoJSON/CSV/Parquet data, or get
MapLibre-ready source descriptors:
earth cache set 5GB
earth storage upload ./places.geojson --db ./e2.db --connect-to restaurant
earth query restaurant --db ./e2.db --region 4915 --limit 100
earth map sources restaurant hospital --json
Cells
earth cell encode --lat 40.74 --lng -73.99 --time "2026-01-01T00:00:00Z" --spatial-resolution 8 --temporal-resolution 1h
earth cell decode "<e2-cell-id>"
earth cell neighbors "<e2-cell-id>" --k 1
Open-source foundation
The CLI keeps the interface small by composing open-source tools and the
EmbedEarth SDK:
| Commander | Command parsing, options, and help output |
| DuckDB | Local analytical query support |
| SQLite | Local snapshot and user-data storage |
| GeoParquet | Portable geospatial upload output |
| EmbedEarth SDK | Shared search, route, compute, catalog, and map clients |
For the equivalent agent-facing interface, see the
MCP package. For typed
application integrations, see the SDK package.