# adrg/xdg

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

Repository: https://github.com/adrg/xdg
Canonical: https://ross.abutalabs.com/products/xdg
Homepage: https://pkg.go.dev/github.com/adrg/xdg
Language: Go
License: MIT
License Family: permissive
Topics: xdg, go, golang, specification, library, golang-library, golang-package, xdg-basedir, xdg-user-dirs, cross-platform, xdg-compliance, xdg-specs, unix, windows, macos, plan9, known-folders, linux
Last push: 2026-08-20T10:22:26+00:00

## Health v2 (maintenance only)
Score: 78/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 98, release rhythm 40, longevity 100
- inputs: {"age_days": 4394, "days_push": 13, "days_rel": 671, "gap_med": 7.0, "n_releases_24m": 3}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1014, forks 36 (observed 2026-08-28T04:03:13.858315+00:00)

## What it is
A Go library implementing the XDG Base Directory Specification and XDG user directories, providing standard paths for application data, config, cache, and well-known user folders. It works cross-platform, falling back to Windows Known Folders on Windows and supporting Unix, macOS, and Plan 9.

## Use cases
- get xdg config directory in go
- store application data in platform-appropriate location
- resolve user directories like Downloads and Documents cross-platform
- avoid hardcoding config file paths in a Go app
- windows known folders equivalent of xdg paths

## When to choose
- you write Go applications that need spec-compliant config/data/cache paths
- you need cross-platform directory resolution including Windows Known Folders
- you want a small, widely imported, MIT-licensed dependency

## When to avoid
- you need XDG desktop features beyond base directories (menus, autostart)
- your project is not in Go
- you need runtime-modifiable user-dirs config parsing

## Facets
- artifact type: library
- maturity: stable
- function: configuration-management, file-system, developer-tools
- domain: developer-tools, cross-platform, operating-systems
- platform: windows, go, cross-platform, bsd
- tags: xdg, xdg-base-directory, user-directories, known-folders, golang-library, paths, linux, macos

## Member repositories
- adrg/xdg (main) score 78

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:13.858315+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T07:11:31.505231+00:00, confidence not recorded.
  - readme: https://github.com/adrg/xdg (fetched 2026-08-28T04:03:13.858315+00:00, sha 01d0d6ff73b2)
  - homepage: https://pkg.go.dev/github.com/adrg/xdg (fetched 2026-08-29T13:10:48.812705+00:00, sha 7d7f996f01d6)
  - site_page: https://pkg.go.dev/about (fetched 2026-08-29T13:10:48.822529+00:00, sha 757852027879)
  - site_page: https://go.dev/about (fetched 2026-08-29T13:10:48.824602+00:00, sha 8b6453863a90)
  - site_page: https://go.dev/project (fetched 2026-08-29T13:10:48.826531+00:00, sha d5ca00bb378b)
- Data as of 2026-08-30T08:39:29.467469+00:00.
