mitchellh/go-homedir
Go library for detecting and expanding the user's home directory without cgo. observed · 2026-08-28
Health v2 · maintenance only
10/100
- Activity 0
- Release rhythm 35
- Longevity 100
Flags: no_releases archived
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: n/a
- age_days: 4397
- days_rel: n/a
- days_push: 895
- n_releases_24m: 0
Adoption not part of the score
1419 stars · 131 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
A small Go library that detects the user's home directory and expands `~` in paths without requiring cgo. It exists because the standard `os/user` package needs cgo on Darwin, which breaks cross-compilation.
Use cases
- get the user's home directory in Go without cgo
- expand ~ in file paths to the home directory
- cross-compile Go programs that need the home directory
- replace os/user home directory lookups in Go tools
- resolve user home directory portably across Linux, macOS, and Windows
When to choose
- you need home directory detection in a Go program that must cross-compile
- you want to expand ~ paths without pulling in cgo dependencies
- you need a tiny, dependency-free utility for path expansion
When to avoid
- you only target Linux, where os/user works without cgo
- you need more than home directory detection or ~ expansion
- you need a project with active issue triage and new feature development
Facets
library · maturity maintenance
file-system developer-tools developer-tools cross-platform go cross-platform windows bsd home-directory tilde-expansion no-cgo cross-compilation go-library path-expansion command-line linux macos
2 sources
- readme: https://github.com/mitchellh/go-homedir · fetched 2026-08-28 · 283773545296
- homepage: https://gist.github.com/mitchellh/90029601268e59a29e64e55bab1c5bdc · fetched 2026-08-29 · 45ba7fc863a7
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| mitchellh/go-homedir | main | 10 |
For agents
markdown · JSON · MCP: product_card(name="mitchellh/go-homedir")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem