{"id":13586123,"url":"https://github.com/mapbox/mapbox-cli-py","last_synced_at":"2025-04-07T14:33:42.594Z","repository":{"id":47124607,"uuid":"45640756","full_name":"mapbox/mapbox-cli-py","owner":"mapbox","description":"Command line interface to Mapbox Web Services","archived":false,"fork":false,"pushed_at":"2024-04-17T08:57:04.000Z","size":1544,"stargazers_count":162,"open_issues_count":20,"forks_count":41,"subscribers_count":118,"default_branch":"master","last_synced_at":"2024-05-17T02:42:35.872Z","etag":null,"topics":["imagery","satellite"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mapbox.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-11-05T21:32:57.000Z","updated_at":"2024-06-19T00:04:57.234Z","dependencies_parsed_at":"2024-06-19T00:04:53.501Z","dependency_job_id":"5d0956f0-aca3-4e72-adb7-e15f883dd5b3","html_url":"https://github.com/mapbox/mapbox-cli-py","commit_stats":{"total_commits":194,"total_committers":15,"mean_commits":"12.933333333333334","dds":"0.44845360824742264","last_synced_commit":"7bc7d8aadf5f487702aacf72328296641f95f4c5"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mapbox%2Fmapbox-cli-py","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mapbox%2Fmapbox-cli-py/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mapbox%2Fmapbox-cli-py/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mapbox%2Fmapbox-cli-py/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mapbox","download_url":"https://codeload.github.com/mapbox/mapbox-cli-py/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247670479,"owners_count":20976581,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["imagery","satellite"],"created_at":"2024-08-01T15:05:20.439Z","updated_at":"2025-04-07T14:33:42.587Z","avatar_url":"https://github.com/mapbox.png","language":"Python","readme":"# PAUSED DEVELOPMENT\n\nSince [the SDK that it wraps](https://github.com/mapbox/mapbox-sdk-py/blob/master/CONTRIBUTING.md#attention-this-project-is-paused) has been deprecated, we have also archived this CLI. We encourage you to migrate to [the equivalent tiling and upload endpoints.](https://docs.mapbox.com/api/maps/mapbox-tiling-service/)\n\n# mapbox-cli-py\n\n[![Build Status](https://travis-ci.org/mapbox/mapbox-cli-py.svg?branch=master)](https://travis-ci.org/mapbox/mapbox-cli-py) [![Coverage Status](https://coveralls.io/repos/mapbox/mapbox-cli-py/badge.svg?branch=master\u0026service=github)](https://coveralls.io/github/mapbox/mapbox-cli-py?branch=master)\n\nCommand line interface to Mapbox Web Services based on https://github.com/mapbox/mapbox-sdk-py.\n\n## Installation\n\n**For users on OS X**, we recommend installing with [homebrew](http://brew.sh/)\n```\n$ brew install mapbox/cli/mapbox\n```\n\n**For users familiar with Python** and who already have [`pip`](https://pip.pypa.io/en/stable/installing/) installed on their system, you can create a [virtual environment](http://docs.python-guide.org/en/latest/dev/virtualenvs/) and install with\n```\n(venv)$ pip install mapboxcli\n```\n\nInstalling locally without a virtual environment using\n```\n$ pip install --user mapboxcli\n```\nYou'll then need to include `~/.local/bin` in your $PATH.\n\nInstalling globally is *not recommended* but some users may want to do so under certain circumstances\n```\n$ sudo pip install mapboxcli\n```\n\nIf you're interested in contributing, you'll want to [install from master branch](https://github.com/mapbox/mapbox-cli-py/blob/master/CONTRIBUTING.md#contributing).\n\n## Setup\n\nUse of the `mapbox` command line interface requires an access token.\nYour token is shown on the [API access tokens](https://www.mapbox.com/studio/account/tokens/) page when you are logged in.\nThe token can be provided on the command line\n\n```\n$ mapbox --access-token MY_TOKEN ...\n```\n\nor as an environment variable named `MAPBOX_ACCESS_TOKEN`\n\n```\n$ export MAPBOX_ACCESS_TOKEN=MY_TOKEN\n$ mapbox ...\n```\n\n## Usage\n\n* [directions](#directions)\n* [geocoding](#geocoding)\n* [mapmatching](#mapmatching)\n* [staticmap](#staticmap)\n* [upload](#upload)\n* [datasets](#datasets)\n\nFor any command that takes waypoints or features as an input you can either specify:\n\n* Coordinate pair(s) of the form `\"[0, 0]\"` or `\"0,0\"` or `\"0 0\"`\n* Sequence of GeoJSON features on `stdin`\n* GeoJSON FeatureCollection on `stdin`\n* Paths to GeoJSON file(s) containing either a single Feature or FeatureCollection.\n\nNote that functions that accept points only, any non-point feature is filtered out.\n\n### directions\n```\nUsage: mapbox directions [OPTIONS] FEATURES...\n\n  The Mapbox Directions API will show you how to get where you're going.\n\n  mapbox directions \"[0, 0]\" \"[1, 1]\"\n\n  An access token is required.  See \"mapbox --help\".\n\nOptions:\n  --profile [mapbox/driving|mapbox/driving-traffic|mapbox/walking|mapbox/cycling]\n                                  Routing profile\n  --alternatives / --no-alternatives\n                                  Whether to try to return alternative routes\n  --geometries [geojson|polyline|polyline6]\n                                  Format of returned geometry\n  --overview [full|simplified|False]\n                                  Type of returned overview geometry\n  --steps / --no-steps            Whether to return steps and turn-by-turn\n                                  instructions\n  --continue-straight / --no-continue-straight\n                                  Whether to see the allowed direction of\n                                  travel when departing the original waypoint\n  --waypoint-snapping TEXT        Controls waypoint snapping\n  --annotations TEXT              Additional metadata along the route\n  --language TEXT                 Language of returned turn-by-turn\n                                  instructions\n  -o, --output TEXT               Save output to a file\n  --help                          Show this message and exit.\n```\n\n\n### geocoding\n```\nUsage: mapbox geocoding [OPTIONS] [QUERY]\n\n  This command returns places matching an address (forward mode) or places\n  matching coordinates (reverse mode).\n\n  In forward (the default) mode the query argument shall be an address such\n  as '1600 pennsylvania ave nw'.\n\n    $ mapbox geocoding '1600 pennsylvania ave nw'\n\n  In reverse mode the query argument shall be a JSON encoded array of\n  longitude and latitude (in that order) in decimal degrees.\n\n    $ mapbox geocoding --reverse '[-77.4371, 37.5227]'\n\n  An access token is required, see `mapbox --help`.\n\nOptions:\n  --forward / --reverse           Perform a forward or reverse geocode.\n                                  [default: forward]\n  -i, --include                   Include HTTP headers in the output.\n  --lat FLOAT                     Bias results toward this latitude (decimal\n                                  degrees). --lon is also required.\n  --lon FLOAT                     Bias results toward this longitude (decimal\n                                  degrees). --lat is also required.\n  -t, --place-type NAME           Restrict results to one or more place types.\n  -o, --output TEXT               Save output to a file.\n  -d, --dataset [mapbox.places|mapbox.places-permanent]\n                                  Source dataset for geocoding, [default:\n                                  mapbox.places]\n  --country TEXT                  Restrict forward geocoding to specified\n                                  country codes,comma-separated\n  --bbox TEXT                     Restrict forward geocoding to specified\n                                  bounding box,given in minX,minY,maxX,maxY\n                                  coordinates.\n  --features                      Return results as line-delimited GeoJSON\n                                  Feature sequence, not a FeatureCollection\n  --limit INTEGER                 Limit the number of returned features\n  --help                          Show this message and exit.\n```\n\n### mapmatching\n```\nUsage: mapbox mapmatching [OPTIONS] FEATURES...\n\n  Mapbox Map Matching API lets you use snap your GPS traces to the\n  OpenStreetMap road and path network.\n\n        $ mapbox mapmatching trace.geojson\n\n  An access token is required, see `mapbox --help`.\n\nOptions:\n  --gps-precision INTEGER         Assumed precision of tracking device\n                                  (default 4 meters)\n  --profile [mapbox.driving|mapbox.cycling|mapbox.walking]\n                                  Mapbox profile id\n  --help                          Show this message and exit.\n```\n\n### staticmap\n```\nUsage: mapbox staticmap [OPTIONS] MAPID OUTPUT\n\n  Generate static map images from existing Mapbox map ids. Optionally\n  overlay with geojson features.\n\n    $ mapbox staticmap --features features.geojson mapbox.satellite out.png\n    $ mapbox staticmap --lon -61.7 --lat 12.1 --zoom 12 mapbox.satellite\n    out2.png\n\n  An access token is required, see `mapbox --help`.\n\nOptions:\n  --features TEXT              GeoJSON Features to render as overlay\n  --lat FLOAT                  Latitude\n  --lon FLOAT                  Longitude\n  --zoom INTEGER               Zoom\n  --size \u003cINTEGER INTEGER\u003e...  Image width and height in pixels\n  --help                       Show this message and exit.\n```\n\n\n### upload\n```\nUsage: mapbox upload [OPTIONS] TILESET [INFILE]\n\n  Upload data to Mapbox accounts. All endpoints require authentication.\n  Uploaded data lands at https://www.mapbox.com/studio/tilesets/ and can be used in new\n  or existing projects.\n\n  You can specify the tileset id and input file\n\n    $ mapbox upload username.data mydata.geojson\n\n  Or specify just the tileset id and take an input file on stdin\n\n    $ cat mydata.geojson | mapbox upload username.data\n\n  The --name option defines the title as it appears in Studio and defaults\n  to the last part of the tileset id, e.g. \"data\"\n\n  Note that the tileset must start with your username. An access token with\n  upload scope is required, see `mapbox --help`.\n\nOptions:\n  --name TEXT  Name for the data upload\n  --help       Show this message and exit.\n```\n\n### datasets\n```\nUsage: mapbox datasets [OPTIONS] COMMAND [ARGS]...\n\n  Read and write GeoJSON from Mapbox-hosted datasets\n\n  All endpoints require authentication. An access token with appropriate\n  dataset scopes is required, see `mapbox --help`.\n\n  Note that this API is currently a limited-access beta.\n\nOptions:\n  --help  Show this message and exit.\n\nCommands:\n  create                 Create an empty dataset\n  create-tileset         Generate a tileset from a dataset\n  delete-dataset         Delete a dataset\n  delete-feature         Delete a single feature from a dataset\n  list                   List datasets\n  list-features          List features in a dataset\n  put-feature            Insert or update a single feature in a dataset\n  read-dataset           Return information about a dataset\n  read-feature           Read a single feature from a dataset\n  update-dataset         Update information about a dataset\n```\n\n### datasets list\n```\nUsage: mapbox datasets list [OPTIONS]\n\n  List datasets.\n\n  Prints a list of objects describing datasets.\n\n      $ mapbox datasets list\n\n  All endpoints require authentication. An access token with `datasets:read`\n  scope is required, see `mapbox --help`.\n\nOptions:\n  -o, --output TEXT  Save output to a file\n  --help             Show this message and exit.\n```\n\n### datasets create\n```\nUsage: mapbox datasets create [OPTIONS]\n\n  Create a new dataset.\n\n  Prints a JSON object containing the attributes of the new dataset.\n\n      $ mapbox datasets create\n\n  All endpoints require authentication. An access token with\n  `datasets:write` scope is required, see `mapbox --help`.\n\nOptions:\n  -n, --name TEXT         Name for the dataset\n  -d, --description TEXT  Description for the dataset\n  --help                  Show this message and exit.\n```\n\n### datasets read-dataset\n```\nUsage: mapbox datasets read-dataset [OPTIONS] DATASET\n\n  Read the attributes of a dataset.\n\n  Prints a JSON object containing the attributes of a dataset. The\n  attributes: owner (a Mapbox account), id (dataset id), created (Unix\n  timestamp), modified (timestamp), name (string), and description (string).\n\n      $ mapbox datasets read-dataset dataset-id\n\n  All endpoints require authentication. An access token with `datasets:read`\n  scope is required, see `mapbox --help`.\n\nOptions:\n  -o, --output TEXT  Save output to a file\n  --help             Show this message and exit.\n```\n\n### datasets update-dataset\n```\nUsage: mapbox datasets update-dataset [OPTIONS] DATASET\n\n  Update the name and description of a dataset.\n\n  Prints a JSON object containing the updated dataset attributes.\n\n      $ mapbox datasets update-dataset dataset-id\n\n  All endpoints require authentication. An access token with\n  `datasets:write` scope is required, see `mapbox --help`.\n\nOptions:\n  -n, --name TEXT         Name for the dataset\n  -d, --description TEXT  Description for the dataset\n  --help                  Show this message and exit.\n```\n\n### datasets delete-dataset\n```\nUsage: mapbox datasets delete-dataset [OPTIONS] DATASET\n\n  Delete a dataset.\n\n      $ mapbox datasets delete-dataset dataset-id\n\n  All endpoints require authentication. An access token with\n  `datasets:write` scope is required, see `mapbox --help`.\n\nOptions:\n  --help  Show this message and exit.\n```\n\n### datasets list-features\n```\nUsage: mapbox datasets list-features [OPTIONS] DATASET\n\n  Get features of a dataset.\n\n  Prints the features of the dataset as a GeoJSON feature collection.\n\n      $ mapbox datasets list-features dataset-id\n\n  All endpoints require authentication. An access token with `datasets:read`\n  scope is required, see `mapbox --help`.\n\nOptions:\n  -r, --reverse TEXT  Read features in reverse\n  -s, --start TEXT    Feature id to begin reading from\n  -l, --limit TEXT    Maximum number of features to return\n  -o, --output TEXT   Save output to a file\n  --help              Show this message and exit.\n```\n\n### datasets put-feature\n```\nUsage: mapbox datasets put-feature [OPTIONS] DATASET FID [FEATURE]\n\n  Create or update a dataset feature.\n\n  The semantics of HTTP PUT apply: if the dataset has no feature with the\n  given `fid` a new feature will be created. Returns a GeoJSON\n  representation of the new or updated feature.\n\n      $ mapbox datasets put-feature dataset-id feature-id 'geojson-feature'\n\n  All endpoints require authentication. An access token with\n  `datasets:write` scope is required, see `mapbox --help`.\n\nOptions:\n  -i, --input TEXT  File containing a feature to put\n  --help            Show this message and exit.\n```\n\n### datasets read-feature\n```\nUsage: mapbox datasets read-feature [OPTIONS] DATASET FID\n\n  Read a dataset feature.\n\n  Prints a GeoJSON representation of the feature.\n\n      $ mapbox datasets read-feature dataset-id feature-id\n\n  All endpoints require authentication. An access token with `datasets:read`\n  scope is required, see `mapbox --help`.\n\nOptions:\n  -o, --output TEXT  Save output to a file\n  --help             Show this message and exit.\n```\n\n### datasets delete-feature\n```\nUsage: mapbox datasets delete-feature [OPTIONS] DATASET FID\n\n  Delete a feature.\n\n      $ mapbox datasets delete-feature dataset-id feature-id\n\n  All endpoints require authentication. An access token with\n  `datasets:write` scope is required, see `mapbox --help`.\n\nOptions:\n  --help  Show this message and exit.\n```\n\n### datasets create-tileset\n```\nUsage: mapbox datasets create-tileset [OPTIONS] DATASET TILESET\n\n  Create a vector tileset from a dataset.\n\n      $ mapbox datasets create-tileset dataset-id username.data\n\n  Note that the tileset must start with your username and the dataset must\n  be one that you own. To view processing status, visit\n  https://www.mapbox.com/data/. You may not generate another tilesets from\n  the same dataset until the first processing job has completed.\n\n  All endpoints require authentication. An access token with `uploads:write`\n  scope is required, see `mapbox --help`.\n\nOptions:\n  -n, --name TEXT  Name for the tileset\n  --help           Show this message and exit.\n```\n\n## Alternative command syntax\n\nWhen saving a fraction of a second matters you can call the mapboxcli module\ndirectly instead of using the installed program.\n\n```$ python -m mapboxcli --help```\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmapbox%2Fmapbox-cli-py","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmapbox%2Fmapbox-cli-py","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmapbox%2Fmapbox-cli-py/lists"}