Skip to content
Preview – data under validation

CLI reference

aportee is a command-line client over the à portée /v1 API. Every command has a --json mode that prints the raw payload and an exit code that maps to the HTTP status, so a script or coding agent can branch on it without parsing text. It has no data logic of its own: every command is an HTTP call to the API.

The @aportee/cli package is not published yet. Run it from a checkout of this repository:

Terminal window
npm --prefix site/cli ci
npm --prefix site/cli run build
node site/cli/bin/aportee.js amenities

Anonymous works for most read endpoints (100 requests/day per IP). A key (10,000/day) unlocks named POIs, batch, and image rendering.

Terminal window
export APORTEE_API_KEY=your-key # or pass --key <k>
export APORTEE_BASE=https://aportee.ca # override for a preview deploy (or --base)
Command What it does
aportee access <lat> <lon> Walk-access snapshot. --include, --types, --lang.
aportee describe <lat> <lon> Just the generated walkability narrative.
aportee where <lat> <lon> Nearest populated place.
aportee find <name> Place search. Add --near <lat,lon> (keyed) to also search POIs.
aportee compare <lat,lon> <lat,lon> Per-type minutes delta between two points.
aportee batch <file.csv|-> Batch lookups from lat,lon CSV rows (keyed). --format json|geojson.
aportee image <lat> <lon> Branded map PNG (keyed). --out FILE.
aportee embed <lat> <lon> iframe snippet.
aportee amenities The 18 amenity types with en/fr labels.

access, describe, where, image, and embed also accept --place "<name>" instead of <lat> <lon> – it resolves the name against the baked place gazetteer (no external geocoder). Global flags: --json, --key <k>, --base <url>.

Terminal window
aportee access 43.25085 -79.81809 --include all
aportee find "Fickle Fig" --near 48.43,-123.37 --key $APORTEE_API_KEY
aportee compare 43.25,-79.82 43.65,-79.38 --types grocery,pharmacy
aportee image --place Hamilton --out hamilton.png --key $APORTEE_API_KEY

An agent branches on the exit code without parsing output:

Code Meaning
0 success
2 bad input (400 / 422)
3 no data (204)
4 outside coverage (404)
5 rate limited (429)
1 internal / network / 5xx

Grid check – run a CSV of points through batch and keep the GeoJSON:

Terminal window
aportee batch points.csv --include minutes,poi_counts --format geojson \
--key $APORTEE_API_KEY > grid.geojson

“Is X in the data, and as what type?”

Terminal window
aportee find "Save-On-Foods" --near 48.43,-123.37 --key $APORTEE_API_KEY

Generate a shareable PNG of an area:

Terminal window
aportee image --place "Kitchener" --types grocery,pharmacy,school \
--out kitchener.png --key $APORTEE_API_KEY