diff --git a/cmd/update-tools/main.go b/cmd/update-tools/main.go index 8ff5c10..ebaa108 100644 --- a/cmd/update-tools/main.go +++ b/cmd/update-tools/main.go @@ -227,16 +227,6 @@ func main() { }, NixFile: filepath.Join(repoRoot, "nix", "pkgs", "gogcli.nix"), }, - { - Name: "goplaces", - Repo: "steipete/goplaces", - Assets: []AssetSpec{ - {System: "aarch64-darwin", Regex: regexp.MustCompile(`goplaces_[0-9.]+_darwin_arm64\.tar\.gz`)}, - {System: "x86_64-linux", Regex: regexp.MustCompile(`goplaces_[0-9.]+_linux_amd64\.tar\.gz`)}, - {System: "aarch64-linux", Regex: regexp.MustCompile(`goplaces_[0-9.]+_linux_arm64\.tar\.gz`)}, - }, - NixFile: filepath.Join(repoRoot, "nix", "pkgs", "goplaces.nix"), - }, { Name: "camsnap", Repo: "steipete/camsnap", diff --git a/nix/pkgs/goplaces.nix b/nix/pkgs/goplaces.nix index 7fb2954..dcd893e 100644 --- a/nix/pkgs/goplaces.nix +++ b/nix/pkgs/goplaces.nix @@ -1,47 +1,31 @@ -{ lib, stdenv, fetchurl }: +{ lib, buildGoModule, fetchFromGitHub }: -let - sources = { - "aarch64-darwin" = { - url = "https://github.com/steipete/goplaces/releases/download/v0.2.1/goplaces_0.2.1_darwin_arm64.tar.gz"; - hash = "sha256-haImHN6IS2eAMPd6YusOFreSuRc4e0uxpwrYTJkxle8="; - }; - "x86_64-linux" = { - url = "https://github.com/steipete/goplaces/releases/download/v0.2.1/goplaces_0.2.1_linux_amd64.tar.gz"; - hash = "sha256-oDsFtk+M/NOC3CLCgVpVws15VfY7NQdUMUZgdzTqwW0="; - }; - "aarch64-linux" = { - url = "https://github.com/steipete/goplaces/releases/download/v0.2.1/goplaces_0.2.1_linux_arm64.tar.gz"; - hash = "sha256-3PzBz0/DjOmD86yjQRW9Ak/J50/+NDLpjoByEuatmEU="; - }; - }; -in -stdenv.mkDerivation { +buildGoModule rec { pname = "goplaces"; - version = "0.2.1"; + version = "0.2.2-dev"; - src = fetchurl sources.${stdenv.hostPlatform.system}; + src = fetchFromGitHub { + owner = "joshp123"; + repo = "goplaces"; + rev = "c7be7782989c4f2d24aba8c1122d0b6207247d31"; + hash = "sha256-noyIyj7dtVscUUSUlcUhKt45QUH/bZL/fINwqR6fZS0="; + }; - dontConfigure = true; - dontBuild = true; + subPackages = [ "cmd/goplaces" ]; - unpackPhase = '' - tar -xzf "$src" - ''; + ldflags = [ + "-s" + "-w" + "-X github.com/steipete/goplaces/internal/cli.Version=${version}" + ]; - installPhase = '' - runHook preInstall - mkdir -p "$out/bin" - cp $(find . -type f -name goplaces | head -1) "$out/bin/goplaces" - chmod 0755 "$out/bin/goplaces" - runHook postInstall - ''; + vendorHash = "sha256-OFTjLtKwYSy4tM+D12mqI28M73YJdG4DyqPkXS7ZKUg="; meta = with lib; { description = "Modern Go client + CLI for the Google Places API"; - homepage = "https://github.com/steipete/goplaces"; + homepage = "https://github.com/joshp123/goplaces"; license = licenses.mit; - platforms = builtins.attrNames sources; + platforms = platforms.darwin ++ platforms.linux; mainProgram = "goplaces"; }; } diff --git a/tools/goplaces/skills/goplaces/SKILL.md b/tools/goplaces/skills/goplaces/SKILL.md index d296227..7c1e439 100644 --- a/tools/goplaces/skills/goplaces/SKILL.md +++ b/tools/goplaces/skills/goplaces/SKILL.md @@ -31,12 +31,14 @@ Closest place to me - Pick the top result as the closest match unless distance is explicitly returned in output. Directions (A → B) -- goplaces does NOT provide directions or ETA between two points. -- `goplaces route` finds places along a route (Routes API) — not a directions/ETA tool. -- For directions, generate a Google Maps link (no guessing): - - Coordinates: `https://www.google.com/maps/dir/?api=1&origin=,&destination=,` - - Place IDs: `https://www.google.com/maps/dir/?api=1&origin_place_id=&destination_place_id=` -- If the user asks for time/distance, provide the link and ask them to open it. +- Use the Directions API via the CLI (default mode: walking). +- Place IDs (preferred for agent workflows): + - `goplaces directions --from-place-id --to-place-id ` +- Add turn-by-turn steps: + - `goplaces directions --from-place-id --to-place-id --steps` +- Compare driving ETA alongside walking: + - `goplaces directions --from-place-id --to-place-id --compare drive` +- `goplaces route` is only for searching places along a route (Routes API), not directions/ETA. Notes - `--no-color` or `NO_COLOR` disables ANSI color.