Getting started
Download a pack, run your first queries from the command line, then from your language.
This page takes you from nothing to answers in a few minutes: a pack, the tgd command line to
look inside it, and the same queries from code.
Get a pack
A pack is one file. The world lite pack holds the world's countries, first-level units and cities of 5,000 or more, India's districts and statutory towns, and Nepal in full: 172,339 places named in Nepali, Hindi and English, with heights, admin units, timezones and boundaries.
curl -LO https://github.com/teispace/teigeodata/releases/download/data-2026.11.14.3/world-np-lite.tgd
shasum -a 256 world-np-lite.tgd
# 243ae55509a538b1f61da50994a791cc78e7deb70bb4bf743b9f59d458cbe3f3 world-np-lite.tgdIt is 15.6 MB on disk and 9.8 MB compressed on the wire, under CC BY 4.0: you may ship it in an app, with the credits it carries.
Install the command line
tgd inspects, verifies and queries packs, and serves them over HTTP and MCP. Build it from
the repository (a Rust toolchain is all it needs):
cargo install --locked --git https://github.com/teispace/teigeodata --tag v1.0.0 teigeodata-cliRelease builds for macOS, Linux and Windows come with the first registry release.
Ask it something
tgd search Pokhara -k 3 --pack "$PACK"Pokhara settlement 28.266890,83.968000 tgd:np/1xhb 1006 m (model) Asia/Kathmandu score 132
Pokhara admin 3 28.209407,83.981817 tgd:np/1xnr 842 m (model) Asia/Kathmandu score 105
Pokhara settlement 28.063631,82.378569 tgd:np/15t1 612 m (model) Asia/Kathmandu score 90The first is the city (a settlement), the second the metropolitan municipality that holds it
(an admin unit at level 3), the third a smaller settlement of the same name farther west. tgd:np/1xhb is
the city's stable ID. From a point:
tgd admin 28.2096 83.9856 --pack "$PACK"Nepal country NP 28.000000,84.000000 tgd:np/1wmc 1046 m (model) Asia/Kathmandu
Gandaki admin 1 NP-P4 28.384514,84.035774 tgd:np/2922 2689 m (model) Asia/Kathmandu
Kaski admin 2 28.345513,83.970886 tgd:np/295c 1231 m (model) Asia/Kathmandu
Pokhara admin 3 28.209407,83.981817 tgd:np/1xnr 842 m (model) Asia/KathmanduThe command-line guide shows every query.
Use it from code
Pick your language. Each guide installs the package, opens this pack, and runs every query with its output:
In Python, for example:
for p in rows(engine.search("Pokhara", 3)):
print(f"{p['id']} {p['name']} {p['kind']} {p['lat']:.4f}, {p['lon']:.4f} score {p['score']}")What to read next
- Places and IDs: what a place is, its kinds and levels, and why IDs stay stable.
- Packs and components: what is inside a pack and how to ship only the parts you use.
- Results: the columns every query returns and how to read them fast.
- Licences: what you must credit, and where.