geo-loc

Crates.iogeo-loc
lib.rsgeo-loc
version0.1.0
created_at2025-10-04 07:34:03.356909+00
updated_at2025-10-04 07:34:03.356909+00
descriptionA command-line tool to print the host's geographic location in pipe-friendly formats
homepage
repository
max_upload_size
id1867637
size62,763
Divan Visagie (divanvisagie)

documentation

README

geo-loc

A command-line utility to print the host's current geographic location in a pipe-friendly format. It queries native location services (CoreLocation on macOS, GeoClue on Linux) or falls back to IP-based geolocation, outputting in human-readable or machine-parseable formats.

Why?

Many location tools are GUI-based or verbose. geo-loc follows Unix principles: silent operation, clean exit codes, and output suitable for scripting and pipelines. It's designed for automation, monitoring, or quick location checks without opening browsers or editing files.

Installation

From Crates.io (when published)

cargo install geo-loc

From Source

git clone <repo>
cd geo-loc
cargo build --release
make install  # For system-wide install
# or make local-install  # For user install

Usage

Get your location:

geo-loc
# Output: 58.5054 15.9724

For detailed options, formats, providers, and examples, see the man page:

man geo-loc  # After system install
# or
man ./geo-loc.1  # From source

License

BSD 3-Clause

Commit count: 0

cargo fmt