Dekart CLI for auth, MCP tool discovery, calls, and file upload flows.
Project description
dekart-cli
Dekart MCP wrapper for your AI agent to create maps from SQL query results.
Works best with the geosql skill — it writes the SQL, this CLI renders the map.
Works with any Dekart instance:
- Dekart Cloud (SaaS, default)
- Local (Docker) (on your machine with persistent local data)
- Self-hosted (your own URL)
Init
pip install dekart
dekart init
dekart init walks you through:
- Picking the instance (Cloud / self-hosted / localhost).
- Authorizing the CLI in your browser.
- Optionally enabling local snapshots.
To switch instance later:
dekart config --url <your-url>
dekart init
Config and token: ~/.config/dekart/.
Local Dekart with Docker
Choose Local during dekart init, or manage it directly:
dekart local up
dekart local status
dekart local status --json
dekart local down
dekart local remove
The CLI uses a labeled container named dekart-local and a labeled persistent Docker volume named dekart-local-data. down stops the container without deleting the container or volume. remove asks for confirmation, then removes both the container and its data volume; use remove --force to skip confirmation. If port 8080 is occupied by another service, the CLI selects the first free port through 8099 and saves that URL before authorization begins.
When the CLI starts or stops Docker, it prints Executing: <docker command> before running it. You can also choose “I will start or connect to Dekart myself” during dekart init; the CLI prints a simple standalone docker run command without CLI labels, container names, or volumes, then asks for the Dekart URL.
The initial Docker command is:
docker run -d \
--name dekart-local \
--label xyz.dekart.cli.managed=true \
--restart unless-stopped \
-p 127.0.0.1:8080:8080 \
-v dekart-local-data:/dekart/data \
dekartxyz/dekart:latest
The CLI never starts, stops, removes, or replaces a same-name container without its management label. Docker is not installed or started automatically; dekart init gives platform-specific instructions when it is unavailable.
Enable local snapshot
Local headless renderer for fast PNG snapshots without a round-trip to the server:
dekart snapshot-local install
Manage:
dekart snapshot-local status
dekart snapshot-local uninstall # remove renderer
dekart snapshot-local uninstall --purge # also remove its browser cache
When local snapshot is enabled, dekart snapshot --report-id <id> --out ./snap.png uses it automatically. Pass --remote-only to force server-side rendering.
Agents can request a specific snapshot viewport without editing the saved map:
dekart snapshot --report-id <id> --zoom 12 --lat 52.52 --lon 13.405 --out ./snap.png
--zoom accepts 0 through 24. Use --lat and --lon together.
Run Prepared Query And Download Rows
Run an already-prepared Dekart query, wait for the job, and save result rows:
dekart run-query --query-id <query-id> --out-dir ./results --wait --json
Queries wait by default; use --no-wait only when you expect an already-finished job. Prepare the query separately with dekart call --name create_query and dekart call --name update_query, then use dekart run-query to run, poll, and download the result. Use --json to return dataset_id, query_id, job_id, terminal status, and result_file metadata. Empty downloads fail with empty result (metadata/SHOW statement?).
Resolve a report URL explicitly from a report id:
dekart report-url --report-id <report-id>
dekart report-url --report-id <report-id> --json
Preview Downloaded Rows
Preview a CSV or parquet file produced by dekart run-query:
dekart preview ./results/<result-file>.parquet --limit 20
dekart preview ./results/<result-file>.parquet --schema
Preview output is tab-separated. Parquet and CSV previewing use the bundled DuckDB Python dependency.
Links
- Dekart: dekart.xyz
- geosql skill: github.com/dekart-xyz/geosql
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dekart-0.14.0.tar.gz.
File metadata
- Download URL: dekart-0.14.0.tar.gz
- Upload date:
- Size: 50.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e6cafc8f271a3c83be0ed47362626b6196b6f4f60dd48a95cb21ed4df5174944
|
|
| MD5 |
835366aecba15557f0366ab0480c0d22
|
|
| BLAKE2b-256 |
7b7a0994126e0e62f9a152472f80629a38f5b02a8b08a5ab0931376fc77dd7fd
|
File details
Details for the file dekart-0.14.0-py3-none-any.whl.
File metadata
- Download URL: dekart-0.14.0-py3-none-any.whl
- Upload date:
- Size: 34.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7710987e02740f8768bbaec31b5372f8bd612bbb72b1a458f94e7e98446ca6dc
|
|
| MD5 |
912da7334400ef677cf9e85005699e3d
|
|
| BLAKE2b-256 |
66965d13550f49ee92faa85d2f8a53cc0053eaab2a56eca44497e9f2f82e7d6a
|