镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

XDG Base Directory Specification #12

Open

Description

@stefanpenner

WIP, will flesh this out later:

What?

We should consider abiding by the XDG Base Directory Specification

This makes where notion lives on disk configurable, specifically it would abide by the following ENV variables:

Why?

  • cluttering up $HOME becomes unwieldy
  • simplifies testing (we can sub-shell and simply set up the appropriate $XDG vars (no chroot, containers etc)
  • easier to reset config / clear caches
  • power users can configure to there hearts content, but no cost those who wish to rely on the fallbacks

How

Technically, likely via the XDG crate

Others Using XDG

Mostly just a list of whats in my $XDG_CONFIG_HOME, I suspect there are more.

Unresolved

Where do we put stuff in windows?

Maybe something like:

C:\Users\<username>\AppData\Local\notion-cli\notion\{dirs...}

Other Discussion

Activity

  1. soc commented on Feb 2, 2018

    @soc

    @stefanpenner Regarding Windows (and macOS) you could have a look at https://crates.io/crates/directories. It's similar to the xdg crate but supports the right directories on Linux, Windows and macOS. (Disclaimer: I wrote it.)

  2. SirzBenjie commented on Oct 5, 2025

    @SirzBenjie

    Any update on this?
    In particular would really like to see cache respected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions