CLI and Python library for Singapore OneMap APIs — search, geocode, routing, themes, population data, and more
Project description
onemap-sg-cli
CLI and Python library for OneMap Singapore APIs — search, geocode, routing, thematic layers, demographics, and URA property data.
Install
pip install onemap-sg-cli
Or with pipx:
pipx install onemap-sg-cli
Or with uvx (no install needed):
uvx onemap-sg-cli search "Orchard Road"
Setup
Set environment variables (or create a .env file):
export ONEMAP_EMAIL="your@email.com"
export ONEMAP_EMAIL_PASSWORD="your_password"
# Optional: URA property data
export URA_ACCESS_KEY="your_ura_key"
Get credentials:
CLI Usage
# Search
onemap search "Orchard Road"
# Route finding — accepts addresses, postal codes, or lat,lon
onemap route transit "Chinese Garden MRT" "One Raffles Quay"
onemap route transit "Chinese Garden MRT" "One Raffles Quay" --time "09:00"
# Coordinate conversion
onemap convert wgs84-to-svy21 1.342 103.732
# Demographics
onemap pop age "Bedok" 2020
# Nearby transport
onemap nearby mrt 1.342 103.732 --radius 2000
# Static map
onemap map default --lat 1.342 --lon 103.732 -o map.png
See onemap --help for all commands.
Python Library
import asyncio
import onemap_sg
result = asyncio.run(onemap_sg.search("Orchard Road"))
route = asyncio.run(onemap_sg.route_public_transport(
1.342, 103.732, 1.281, 103.852,
departure_time="2026-06-08T09:00:00+08:00", mode="TRANSIT",
))
Agent Instructions
One-line install for any AI agent:
# Auto-detect & install to all found agents (recommended)
curl -sSL https://raw.githubusercontent.com/samuelncui/onemap-sg-cli/main/install-agent.sh | bash
# Install to all agents unconditionally
curl -sSL https://raw.githubusercontent.com/samuelncui/onemap-sg-cli/main/install-agent.sh | bash -s all
# Specific agent
curl -sSL https://raw.githubusercontent.com/samuelncui/onemap-sg-cli/main/install-agent.sh | bash -s hermes
Supported: hermes, cursor, claude, cline, copilot, windsurf, aider, agents. Default: auto-detect all.
License
MIT
Project details
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 onemap_sg_cli-0.2.0.tar.gz.
File metadata
- Download URL: onemap_sg_cli-0.2.0.tar.gz
- Upload date:
- Size: 30.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ad1301f76bfa1837c94ce655157283d18b85ba7d1188faaf825f216b5ec08914
|
|
| MD5 |
8eed6391137c732f35ffc6242a673e88
|
|
| BLAKE2b-256 |
d26322f54e6c0d79c5d1128eaba00afd462c151a4df32d34fe090a7ab43397b2
|
Provenance
The following attestation bundles were made for onemap_sg_cli-0.2.0.tar.gz:
Publisher:
workflow.yml on samuelncui/onemap-sg-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
onemap_sg_cli-0.2.0.tar.gz -
Subject digest:
ad1301f76bfa1837c94ce655157283d18b85ba7d1188faaf825f216b5ec08914 - Sigstore transparency entry: 1755248557
- Sigstore integration time:
-
Permalink:
samuelncui/onemap-sg-cli@87ac00976b38ba200ae9ac53368978f2dd730d57 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/samuelncui
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@87ac00976b38ba200ae9ac53368978f2dd730d57 -
Trigger Event:
push
-
Statement type:
File details
Details for the file onemap_sg_cli-0.2.0-py3-none-any.whl.
File metadata
- Download URL: onemap_sg_cli-0.2.0-py3-none-any.whl
- Upload date:
- Size: 32.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7d0633a142e65991766e8d1f9fdbff1756c914e05b09b581b25aeba0000641fd
|
|
| MD5 |
bbd70d89bfdc4123bd61f9547c56c49f
|
|
| BLAKE2b-256 |
54ac9adc06babbc0964326bf292105119450f00e243f306e88b55474afbd315a
|
Provenance
The following attestation bundles were made for onemap_sg_cli-0.2.0-py3-none-any.whl:
Publisher:
workflow.yml on samuelncui/onemap-sg-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
onemap_sg_cli-0.2.0-py3-none-any.whl -
Subject digest:
7d0633a142e65991766e8d1f9fdbff1756c914e05b09b581b25aeba0000641fd - Sigstore transparency entry: 1755248598
- Sigstore integration time:
-
Permalink:
samuelncui/onemap-sg-cli@87ac00976b38ba200ae9ac53368978f2dd730d57 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/samuelncui
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@87ac00976b38ba200ae9ac53368978f2dd730d57 -
Trigger Event:
push
-
Statement type: