Location AI

New Mapbox CLI for coding agents

Bring Mapbox into your terminal and AI coding workflows with the new open-source CLI.

You can now install the new Mapbox CLI, an open-source command-line tool that lets you add location to any application, and allows coding agents like Codex, Claude Code, and Cursor to do the same.

The CLI brings Mapbox into the terminal and handles the details: managing tokens, geocoding addresses, getting ETAs, and rendering maps.

Install on macOS or Linux (see https://github.com/mapbox/mapbox-cli for Windows)
curl -fsSL https://cli.mapbox.com/install.sh | sh

# Authentication - this will open a browser to help with login / account creation)
mapbox auth login

# Check logged in user
mapbox auth whoami

# Explore available commands
mapbox --help

# Search for coffee with travel times on foot
mapbox search forward --q coffee --poi-category coffee \
  --proximity -73.9742,40.7644 \
  --eta-type navigation --navigation-profile walking --origin -73.9742,40.7644 \
  --limit 5 -o json \
| jq -r '.features[].properties|"\(.eta|round) min  \(.name)"'

2 min  Sip and Co
3 min  Starbucks
4 min  Blank Street
4 min  Starbucks
5 min  Zibetto Espresso Bar

# Render a static map
mapbox static get-image streets-v12 "pin-l-restaurant+f74e4e(-122.4194,37.7749)" \
  -122.4194 37.7749 15 0 0 800 600 "@2x" .png --username mapbox > map.png
file map.png
map.png: PNG image data, 1600 x 1200

Built for agents

A coding agent can drive the CLI without a human by giving it: output it can parse, a way to learn any command, a safe way to preview changes, and clear failures. Two Agent Skills make it fluent. Here’s how to install them:

# write a skill describing the Mapbox CLI's commands
mapbox generate-skills

# install the Mapbox Agent Skills
mapbox agent-skills install

In an interactive terminal, the CLI output is human-readable, but agents receive the full API response as JSON by default. You can also use -o json to request JSON explicitly. 

mapbox geocoder forward --q "1600 Pennsylvania Avenue NW, Washington, DC" --limit 1 -o json
{
  "attribution": "NOTICE: © 2026 Mapbox and its suppliers. All rights reserved. Use of this data is subject to the Mapbox Terms of Service (https://www.mapbox.com/about/maps/). This response and the information it contains may not be retained.",
  "features": [
    {
      "geometry": {
        "coordinates": [
          -77.036574,
          38.897684
        ],
        "type": "Point"
      },
      "id": "dXJuOm1ieGFkcjo0ZDQzYzljYy03OGI1LTQwOGUtYTAxNC0zZjQ5MmIzNWU0YjY",
      "properties": {
        "context": {
          "address": {
            "address_number": "1600",
            "mapbox_id": "dXJuOm1ieGFkcjo0ZDQzYzljYy03OGI1LTQwOGUtYTAxNC0zZjQ5MmIzNWU0YjY",
            "name": "1600 Pennsylvania Avenue Northwest",
            "street_name": "Pennsylvania Avenue Northwest"
          },
...

Passing the --schema argument on a command returns its arguments, types, required fields, allowed values, and the request it would send, as JSON. It needs no credentials and makes no API call. The output comes from the same command definitions the CLI runs, so it matches the installed version.

The --dry-run argument on a mutating command resolves parameters, reads --data and --file, and applies the same validation as the real call. It prints the request with the token redacted and does not send it to the API.

Errors are written to stderr as a JSON object. These include: a machine-readable error code, a short fix, and a list of next_actions to perform. An agent can act on the error code without parsing the full message text.

Watch an agent build San Francisco from prompts

Claude Code builds a live 3D map of San Francisco using the Mapbox CLI, one prompt at a time. It opens on a flat map at the Ferry Building, then it adds 3D buildings, facades, and lane-level roads.It previews each style change with --dry-run before editing the live style in your Mapbox account. Then it brings the city to life with vehicles on the road, and people walking and cycling. It ends with a flight from the Transamerica Pyramid to the Salesforce Tower as the light shifts to night.

The agent chose each step itself and drove the whole build from the terminal, usingthe Mapbox CLI for styling and geocoding, with the Directions API filling in the routes.

The same workflow works with Codex, Cursor, and Copilot.

Open source, with more to come

The Mapbox CLI is available on GitHub under the MIT license. Upcoming releases will extend coverage to most of Mapbox's public APIs. They will also add Homebrew support, shell autocompletion, and version notifications, plus improved support for long-running workflows. 

Want a Mapbox API in the terminal? A workflow simplified? Or have an idea for developers and agents? Open an issue on GitHub. Pull requests are welcome, too.

Try today

The Mapbox CLI is available today. Read the documentation, install it, sign in. Then run a command against a project you are already working on, or build something new.

Related articles

Location AI

From answers to addresses: Grounding an LLM for location

Location AI

GeoAI in 2026: Four predictions on agents, MCP, and live data

Location AI

Maps turn conversational