# dnoegel/php-xdg-base-dir

Repository: https://github.com/dnoegel/php-xdg-base-dir
Canonical: https://ross.abutalabs.com/products/php-xdg-base-dir
Language: PHP
License: MIT
License Family: permissive
Last push: 2020-09-01T18:53:51+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 4447, "days_push": 2192, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 6290, forks 11 (observed 2026-08-28T04:09:41.395305+00:00)

## What it is
A small PHP library implementing the XDG Base Directory specification, exposing home, config, data, cache, and runtime directories via a simple Xdg class. It is installed via Composer and used by other PHP tools to locate per-user files in a standards-compliant way.

## Use cases
- find the user's XDG config directory in PHP
- get XDG cache and data directories from a PHP CLI app
- resolve XDG runtime directory path in PHP
- store app config in the standard XDG location
- implement XDG Base Directory spec in a PHP project

## When to choose
- you need spec-compliant XDG paths in a PHP application or CLI tool
- you want a tiny, dependency-light Composer package for config/data directory resolution

## When to avoid
- you are not targeting Linux/macOS-style XDG environments
- your framework already provides its own config-path resolution
- you need actively developed features or Windows-specific path handling

## Facets
- artifact type: library
- maturity: maintenance
- function: file-system, configuration-management
- domain: developer-tools, operating-systems
- platform: php
- tags: xdg-base-directory, composer-package, config-paths, linux, macos

## Member repositories
- dnoegel/php-xdg-base-dir (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:41.395305+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-29T17:46:18.124661+00:00, confidence not recorded.
  - readme: https://github.com/dnoegel/php-xdg-base-dir (fetched 2026-08-28T04:09:41.395305+00:00, sha dcc356491135)
- Data as of 2026-08-30T08:39:29.467469+00:00.
