Go implementation of the XDG Base Directory Specification and XDG user directories
1k
Stars
36
Forks
9
Open issues
13
Contributors
AI Analysis
A Go library implementing the XDG Base Directory Specification and XDG user directories, providing portable paths for application configuration, data, and cache files across Unix-like systems, Windows, macOS, and Plan 9. It is specialized for developers building cross-platform Go applications that need standard-compliant directory management, particularly beneficial for CLI tools and system utilities that must respect platform conventions.
Inferred from signals mentioned in the README (tests, CI, type safety) — not a review of the actual code.
AI's overall editorial judgment — not an average of the bars above, can weigh other factors too.
Lightweight Go library for XDG Base Directory paths across Unix, Windows, and macOS
adrg/xdg is a Go package that implements the XDG Base Directory Specification, providing standardized paths for application configuration, data, cache, and runtime files. It abstracts OS-specific conventions (Linux/Unix standards, Windows Known Folders, macOS defaults) into a single API. The library serves Go developers building cross-platform CLI tools and desktop applications that need portable file storage semantics. Adoption appears limited to specialized niches (Awesome Go listing, moderate GitHub presence) rather than mainstream Go ecosystem dominance.
Created August 2014, the project emerged to solve a real friction point: Go applications running on Unix systems needed to respect XDG standards, but Windows and macOS had different conventions. The library gradually matured over 12 years, adding platform-specific support and refinements based on real-world usage patterns.
The project has grown modestly and steadily, with 1,002 GitHub stars and 35 forks accumulated over 12 years. It gained 1 star in the last 7 days (relative to June 27, 2026), suggesting stable but slow growth. The Awesome Go inclusion likely drove awareness within the Go community, but growth remains incremental rather than explosive. This pattern is consistent with a mature utility library that solves a real but narrow problem.
Adoption not verified from public evidence. Listed in Awesome Go (configuration category), which signals recognition within Go community but does not indicate scale of real-world usage. No case studies, company endorsements, or download metrics provided. The modest fork count (35) and slow recent star accumulation suggest adoption remains narrow or quiet.
Based on README, the package provides direct access to environment-variable-backed path constants (XDG_DATA_HOME, XDG_CONFIG_HOME, etc.) with platform-specific defaults. Appears to use conditional compilation for OS-specific behavior (Unix/Linux/macOS/Plan 9/Windows). README shows support for Known Folders API on Windows. Likely uses simple fallback logic rather than complex state management.
README includes a codecov badge linking to code coverage tracking, suggesting active testing infrastructure. Tests workflow badge indicates CI/CD is configured. Exact coverage percentage not disclosed in README excerpt.
Last push June 19, 2026 (8 days before analysis date) indicates active maintenance. README includes GitHub Actions test status badge, codecov integration, and Go Report Card badge, all signs of modern, continuous quality gates. Issue and contributor badges present. Appears to be maintained responsively, though frequency of major changes not evident from metadata alone.
ADOPT IF: you are building a Go CLI or desktop application that must respect XDG conventions on Unix, support Windows Known Folders, and macOS standard locations with a single abstraction. The library appears well-maintained and solves this problem cleanly. AVOID IF: you only target Windows or macOS and do not need XDG compliance; native stdlib or platform-specific APIs are simpler. MONITOR IF: you are evaluating it for a large cross-platform ecosystem project; adoption evidence is not well-documented, so real-world reliability at scale requires verification.
Independent dimensions
Mainstream potential
3/10
Technical importance
6/10
Adoption evidence
2/10
- Limited adoption evidence: no public case studies or enterprise endorsements found. Uptake may be silent, but scale is unverified.
- Niche scope: solves primarily for Go + XDG-aware platforms. Mainstream Go ecosystem may use simpler per-platform solutions.
- Maintenance dependency on single maintainer (inferred from low fork/contributor count). Project continuity depends on adrg's sustained interest.
- XDG specification maturity: the XDG spec itself is stable, reducing need for rapid evolution, but also means the library may see fewer active updates by design.
- Lack of Go 1.23+ adoption visibility: no evidence of testing against latest Go versions in README, though CI badge suggests ongoing testing.
Will likely remain a stable, modestly-adopted utility for Go developers who explicitly need XDG compliance. Unlikely to achieve mainstream Go ecosystem presence, but equally unlikely to become unmaintained. May see incremental adoption as more developers build CLI tools aware of platform conventions.
Explore similar
Newsletter
Get analyses like this every Monday
Free weekly digest of the most interesting open-source discoveries.
Languages
Information
- Language
- Go
- License
- MIT
- Last updated
- 1w ago
- Created
- 145mo ago
- Analyzed with
- anthropic/claude-haiku-4-5
Stars over time
Contributors over time
Top 100 contributors only — repos with more will plateau at 100.
Open issues
Incorrect Mapping of `XDG_RUNTIME_DIR` on macOS and Windows
Consider using code from github.com/umlx5h/gtrash for supporting trash.
Would you be interested in expanding this library to support other FreeDesktop specifications too?
Custom file system support?
Top contributors
Recent releases
Similar repos
golang-standards/project-layout
golang-standards/project-layout is a community-maintained reference guide...
| Repository | Stars | Week Δ | Language | Score | Updated |
|---|---|---|---|---|---|
|
|
1k | +3 | Go | 8/10 | 1w ago |
|
|
2.4k | — | Go | 8/10 | 4d ago |
|
|
2.8k | — | Go | 7/10 | 17h ago |
|
|
56.3k | — | Makefile | 7/10 | 2mo ago |
|
|
9.4k | — | Go | 7/10 | 19h ago |
Go standard library provides basic user directory APIs but lacks comprehensive XDG support, Windows Known Folders integration, and XDG_DATA_DIRS multi-path semantics. adrg/xdg fills gaps for apps requiring full XDG compliance.
Focuses on environment variable management for development workflows; solves a different problem (runtime shell context) rather than standardized app paths.
golang-standards/project-layout (56k stars) addresses Go project structure conventions, not XDG paths. AllenDang/giu (GUI framework) and goplus/xgo (language extension) are unrelated in scope.