mbview-go
February 26, 2026 ยท View on GitHub
mbview-go is a Go reimplementation of mapbox/mbview, designed for modern toolchains and distributed as standalone binaries.
The project keeps the local MBTiles inspection workflow from mbview, but replaces the legacy Node.js runtime with Go.
Repository
git clone git@github.com:ATofighi/mbview-go.git
cd mbview-go
Why this project exists
The original mbview is discontinued and no longer practical on newer Node.js versions. mbview-go keeps the same developer experience while remaining easy to install and maintain.
Features
mbview-style CLI workflow for one or more.mbtilesfiles.- MapLibre frontend runtime for vector and raster preview.
- Multiple sources served from a single local server.
- Per-source toggle controls in the frontend menu when multiple MBTiles are loaded.
- Optional automatic browser opening.
- Basemap modes:
- custom style JSON URL/file (
--basemap-style-url) - Mapbox default basemap style (
--basemap) with access token.
- custom style JSON URL/file (
- Tagged GitHub releases with prebuilt binaries via GoReleaser.
Install
From source
go install github.com/ATofighi/mbview-go/cmd/mbview@latest
From releases
Download the archive for your platform from GitHub Releases and run mbview.
Usage
mbview [options] FILE1.mbtiles [FILE2.mbtiles ...]
Default Mapbox basemap mode
If you do not provide --basemap-style-url, set a Mapbox public token:
export MAPBOX_ACCESS_TOKEN='pk.XXXX'
mbview --port 9000 ./roads.mbtiles ./places.mbtiles
Custom basemap style mode
A custom style JSON URL or local file skips Mapbox token requirements:
mbview --basemap-style-url https://demotiles.maplibre.org/style.json ./roads.mbtiles
or
mbview --basemap-style-url ./style.json ./roads.mbtiles
CLI options
--portserver port (default3000)--hostbind host (defaultlocalhost)--quiet,-qsuppress logs except startup URL--no-open,-ndo not auto-open browser--basemap,--base,--mapmapbox style name/id (defaultdark)--basemap-style-urlcustom style JSON URL or file path--mapbox-access-tokenmapbox token (orMAPBOX_ACCESS_TOKENenv)--centerexplicit center aslon,lat,zoom--version,-vprint version--helpprint usage
Notes
- Mixed MBTiles formats in one run are not supported (all inputs must match).
- Tile endpoints are served as
/{source}/{z}/{x}/{y}.{format}. - In the map UI, open
Menuand useSourcescheckboxes to show/hide each MBTiles source. - Vector UI preferences for
Filter,Popup, andTilesare remembered in browser localStorage. - Style rendering is powered by MapLibre GL JS.
Development
go test ./...
Release process
- Push a semantic tag like
v0.1.0. - GitHub Actions runs GoReleaser.
- Release archives and checksums are published automatically.
License
MIT