Installation
CLI
Download the pre-built binary for your platform:
macOS (Apple Silicon)
bash
curl -L https://github.com/zsbahtiar/geocoder-id/releases/latest/download/geocoder-darwin-arm64 -o geocoder
chmod +x geocoder
sudo mv geocoder /usr/local/bin/Linux (x86_64)
bash
curl -L https://github.com/zsbahtiar/geocoder-id/releases/latest/download/geocoder-linux-amd64 -o geocoder
chmod +x geocoder
sudo mv geocoder /usr/local/bin/Verify Installation
bash
geocoder --versionGo Library
Using go get
bash
go get github.com/zsbahtiar/geocoder-idUsing go install (CLI only)
bash
go install github.com/zsbahtiar/geocoder-id/cmd/geocoder@latestDatabase
The database (~233MB) is automatically downloaded on first use to ~/.geocoder-id/geocoder.duckdb.
Custom Database Location
Set the GEOCODER_DB_PATH environment variable:
bash
export GEOCODER_DB_PATH=/path/to/geocoder.duckdbDatabase Search Order
$GEOCODER_DB_PATHenvironment variable./geocoder.duckdb(current directory)./data/geocoder.duckdb<binary-dir>/geocoder.duckdb<binary-dir>/data/geocoder.duckdb~/.geocoder-id/geocoder.duckdb(auto-downloaded)