Where Is the go-modern-guidelines CLI Installed by Agents?
The go-modern-guidelines CLI is installed in a per-user cache directory at ~/.cache/go-modern-guidelines (or $XDG_CACHE_HOME/go-modern-guidelines if the environment variable is set), not as a global system binary.
The JetBrains/go-modern-guidelines repository provides a specialized tool for analyzing modern Go practices, and understanding where agents place this CLI is critical for debugging, updates, and cache management. According to the repository's source code, the binary is built and stored locally following the XDG Base Directory Specification, ensuring project isolation and per-user separation.
Installation Location and XDG Cache Directory
Agents do not install the go-modern-guidelines CLI globally. Instead, the binary is written to a local cache directory that respects the XDG Base Directory Specification.
The default installation locations are:
- Default path:
~/.cache/go-modern-guidelines - XDG override:
$XDG_CACHE_HOME/go-modern-guidelines(when the environment variable is defined)
This behavior is documented in the repository's README.md (lines 27-33), which states: "The CLI is installed into a local cache (for example ~/.cache/go-modern-guidelines) and never modifies your project."
The actual CLI implementation resides in the internal/cli package, with the entry point defined in internal/cli/cli.go (source). This file contains the core command handlers including Run, runList, and runExplain, which agents invoke from the cached binary location.
How Agents Install the CLI
When an agent first requires the tool, it triggers a specific installation sequence that places the binary in the cache directory:
- Agent triggers installation – The agent executes
go install github.com/JetBrains/go-modern-guidelines@latestor calls the./scripts/skills.shwrapper. - Go toolchain builds the binary – The compilation writes the executable to the cache path defined by the XDG specification.
- Agent executes cached binary – Subsequent calls to
go-modern-guidelines list,explain, or other commands resolve to the cached executable. - Updates overwrite the cache – Running
make dev-installor reinstalling viago installreplaces the binary in the same location without affecting project files.
Because the cache is per-user, multiple agents operating on the same machine share the same CLI binary without cross-project contamination.
Locating and Managing the Cached Binary
You can verify the installation location and manage the CLI using standard shell commands.
Locating the installed binary
# Check the default cache location
ls ~/.cache/go-modern-guidelines/go-modern-guidelines
# Respect XDG_CACHE_HOME if set
ls "${XDG_CACHE_HOME:-$HOME/.cache}/go-modern-guidelines/go-modern-guidelines"
Updating the CLI
To install a development build or refresh the cached version:
# From the repository root, rebuild and install to cache
make dev-install
The Makefile provides the dev-install target that compiles the current source and writes the binary to the cache directory, while scripts/dev-install.sh handles the underlying copy operations. To remove the cached CLI, use the make dev-uninstall target.
Summary
- The go-modern-guidelines CLI is stored in
~/.cache/go-modern-guidelinesby default, or$XDG_CACHE_HOME/go-modern-guidelineswhen the XDG variable is set. - Agents install the tool via
go install, placing the compiled binary in the per-user cache rather than a global system path. - The CLI entry point resides in
internal/cli/cli.go, implementing commands likeRun,runList, andrunExplain. - Updates are handled through
make dev-installor re-runninggo install, which overwrite the cached binary without modifying project files.
Frequently Asked Questions
What is the default installation path for the go-modern-guidelines CLI?
The default path is ~/.cache/go-modern-guidelines. If the $XDG_CACHE_HOME environment variable is set, the CLI is installed at $XDG_CACHE_HOME/go-modern-guidelines instead. This follows the XDG Base Directory Specification to ensure proper cache separation.
How do I update the CLI when a new version is released?
Run go install github.com/JetBrains/go-modern-guidelines@latest to fetch and compile the latest release into your cache directory. For development versions, clone the repository and run make dev-install, which executes scripts/dev-install.sh to build and place the binary in the cache.
Does the CLI installation affect my project files?
No. According to the repository documentation in README.md lines 27-33, the CLI is stored exclusively in the cache directory and never modifies your project files. Agents invoke the binary as a read-only analysis tool.
Can multiple agents use the same CLI installation?
Yes. Because the installation is per-user rather than per-project or per-agent, multiple agents on the same machine automatically share the same cached binary located in ~/.cache/go-modern-guidelines or the XDG-specified equivalent.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →