|
| 1 | +# maps cli |
| 2 | + |
| 3 | +This directory is a Node.js CLI for extracting a set of pmtiles |
| 4 | +and uploading them to an S3 bucket. |
| 5 | + |
| 6 | +## usage |
| 7 | + |
| 8 | +You can run the `main.ts` as an executable if you have Node.js 22+ installed. |
| 9 | +It will load the `.env` next to it |
| 10 | + |
| 11 | +``` |
| 12 | +main.ts <command> |
| 13 | +
|
| 14 | +Commands: |
| 15 | + main.ts config Output config and usage |
| 16 | + main.ts run Run the tool |
| 17 | +
|
| 18 | +Options: |
| 19 | + --version Show version number [boolean] |
| 20 | + --help Show help [boolean] |
| 21 | +``` |
| 22 | + |
| 23 | +## configuration |
| 24 | + |
| 25 | +These are the configurations you can set for how the CLI behaves. |
| 26 | +Set them in a `config.json` in this directory or with the corresponding CLI flags or environment variables. |
| 27 | +powered by [Gruber](https://gruber.r0b.io). |
| 28 | + |
| 29 | +| name | type | flag | variable | fallback | |
| 30 | +| ------------------ | ------ | ---- | ---------------------- | ------------------------------------------------ | |
| 31 | +| env | string | ~ | NODE_ENV | production | |
| 32 | +| meta.name | string | ~ | APP_NAME | @openlab/protomaps-cli | |
| 33 | +| meta.version | string | ~ | APP_VERSION | 0.0.0 | |
| 34 | +| protomaps.builds | url | ~ | PROTOMAPS_BUILDS_URL | https://build.protomaps.com/ | |
| 35 | +| protomaps.metadata | url | ~ | PROTOMAPS_METADATA_URL | https://build-metadata.protomaps.dev/builds.json | |
| 36 | +| s3.accessKey | string | ~ | S3_ACCESS_KEY | gruber://unset | |
| 37 | +| s3.bucketName | string | ~ | S3_BUCKET_NAME | gruber://unset | |
| 38 | +| s3.endpoint | url | ~ | S3_ENDPOINT | gruber://unset | |
| 39 | +| s3.prefix | string | ~ | S3_PREFIX | | |
| 40 | +| s3.secretKey | string | ~ | S3_SECRET_KEY | gruber://unset | |
| 41 | + |
| 42 | +Default: |
| 43 | + |
| 44 | +```json |
| 45 | +{ |
| 46 | + "env": "development", |
| 47 | + "meta": { |
| 48 | + "name": "@openlab/protomaps-cli", |
| 49 | + "version": "0.0.0" |
| 50 | + }, |
| 51 | + "targets": [], |
| 52 | + "protomaps": { |
| 53 | + "metadata": "https://build-metadata.protomaps.dev/builds.json", |
| 54 | + "builds": "https://build.protomaps.com/" |
| 55 | + }, |
| 56 | + "s3": { |
| 57 | + "prefix": "", |
| 58 | + "accessKey": "gruber://unset", |
| 59 | + "secretKey": "gruber://unset", |
| 60 | + "bucketName": "gruber://unset", |
| 61 | + "endpoint": "gruber://unset" |
| 62 | + } |
| 63 | +} |
| 64 | +``` |
| 65 | + |
| 66 | +## notes |
| 67 | + |
| 68 | +The CLI relies on minio `8.0.4` **specifically**, this is to remedy [this issue](https://github.com/minio/minio-js/issues/1395). |
0 commit comments