# Opinion about XDG support by the Clojure tools (deps, cli)

**URL:** https://clojureverse.org/t/opinion-about-xdg-support-by-the-clojure-tools-deps-cli/9814
**Category:** Watercooler
**Tags:** clojure
**Created:** [February 25, 2023, 5:48pm UTC](https://clojureverse.org/t/opinion-about-xdg-support-by-the-clojure-tools-deps-cli/9814 "2023-02-25T17:48:14Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![jgomo3](https://clojureverse.org/user_avatar/clojureverse.org/jgomo3/32/1523_2.png) [@jgomo3](https://clojureverse.org/u/jgomo3)
#### Post date: [February 27, 2023, 1:51am UTC](https://clojureverse.org/t/opinion-about-xdg-support-by-the-clojure-tools-deps-cli/9814/3 "2023-02-27T01:51:13Z")

</div>

> [@alexmiller](#):
>
> For future reference, requests or problems with the Clojure CLI should be filed at [https://ask.clojure.org](https://ask.clojure.org) where they can be triaged into tickets. I might see things here, but also, I might not.

Noted, thanks.

> [@alexmiller](#):
>
> Can you point to some doc references for XDG that would definitely say how to determine if it is an XDG system?

Sure. The [XDG Base Directory Specification](https://specifications.freedesktop.org/basedir-spec/0.8/) should be that document (version 0.8 today).

I think there is no an API or standard way to ask a System if it is an XDG system because it’s a chicken-egg problem. What I’ve seen it is mostly done is checking for the $XDG\_CONFIG\_HOME value and if not, checking for the $HOME/.config folder; failing that “means” not XDG.

The tool published in the Freedesktop site for scripting is a Python tool called _pyxdg_, and it has [a module dedicated to the Base Directory specification](https://pyxdg.readthedocs.io/en/latest/basedirectory.html). You can see specifically how they define the [xdg\_config\_home](https://pyxdg.readthedocs.io/en/latest/basedirectory.html#xdg.BaseDirectory.xdg_config_home) as:

```python
xdg_config_home = os.environ.get('XDG_CONFIG_HOME') or \
            os.path.join(_home, '.config')

```

TLDR: The [XDG Base Directory Specification](https://specifications.freedesktop.org/basedir-spec/0.8/) should be that document.

---

_[View the full topic](https://clojureverse.org/t/opinion-about-xdg-support-by-the-clojure-tools-deps-cli/9814)._
