adrg

adrg/xdg

Go MIT Dev Tools

Go implementation of the XDG Base Directory Specification and XDG user directories

1k stars
36 forks
recent
GitHub +3 / week

1k

Stars

36

Forks

9

Open issues

13

Contributors

v0.5.3 31 Oct 2024

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.

Dev Tools Library Discovery value: 4/10
Documentation 8/10
Activity 9/10
Community 7/10
Code quality 8/10

Inferred from signals mentioned in the README (tests, CI, type safety) — not a review of the actual code.

Overall score 8/10

AI's overall editorial judgment — not an average of the bars above, can weigh other factors too.

xdg-compliance cross-platform go-library filesystem-management unix-specification
Actively maintained Well documented MIT licensed Niche/specialized use case Beginner friendly Production ready
Deep Analysis · Based on README and public signals
2w ago

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.

Origin

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.

Growth

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.

In production

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.

Code analysis
Architecture

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.

Tests

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.

Maintenance

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.

Honest verdict

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

Risks
  • 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.
Prediction

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.

0 found this helpful

Newsletter

Get analyses like this every Monday

Free weekly digest of the most interesting open-source discoveries.

Languages

Go
100%

Information

Language
Go
License
MIT
Last updated
1w ago
Created
145mo ago
Analyzed with
anthropic/claude-haiku-4-5

Stars over time

Loading…

Contributors over time

Top 100 contributors only — repos with more will plateau at 100.

Loading…

Similar repos

go-ldap

go-ldap/ldap

go-ldap/ldap is a comprehensive LDAP v3 client library for Go, implementing...

2.4k Go Security
AllenDang

AllenDang/giu

giu is a cross-platform GUI framework for Go that wraps Dear ImGui, enabling...

2.8k Go Dev Tools
golang-standards

golang-standards/project-layout

golang-standards/project-layout is a community-maintained reference guide...

56.3k Makefile Dev Tools
goplus

goplus/xgo

XGo is a programming language designed to read like plain English while...

9.4k Go Education
vs. alternatives
stdlib os.UserConfigDir / os.UserCacheDir (Go 1.11+)

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.

direnv

Focuses on environment variable management for development workflows; solves a different problem (runtime shell context) rather than standardized app paths.

Relevant Go libraries in other ecosystems (implied by similar repos list)

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.