Skip to content

Please don't put data/config directly in ~/ #1051

Closed

Description

@Ramblurr

TL;DR: Please respect XDG Base Directory spec for data/config location (instead of fixed ~/.plannotator)

Plannotator currently uses a fixed ~/.plannotator path. This may be common on MacOS, but on Linux it is considered very bad manners for programs to drop stuff in our home directory. Despite being a linux standard, it is also commonly used on Windows and macOS.

Using XDG paths keeps Plannotator working cleanly in containers, and CI and makes setup, backup, and cleanup much easier.

Could we please make storage location follow the XDG Base Directory spec (while remaining backward compatible?)

It's quite simple, you can do it this way in a backward compatible way:

  1. Resolve target directory from XDG defaults:
    • config: $XDG_CONFIG_HOME/plannotator (fallback: ~/.config/plannotator)
    • data: $XDG_DATA_HOME/plannotator (fallback: ~/.local/share/plannotator)
  2. If ~/.plannotator exists
    • either: just use the existing ~/.plannotator or
    • move or copy contents from ~/.plannotator to XDG target if you want to migrate (not necessary I think)
  3. If ~/.plannotator doesn't exist
  • use the XDG location

The library env-paths makes this super easy to implement cross platform: https://github.com/sindresorhus/env-paths

This would align with Linux conventions and make Plannotator friendlier in managed/devcontainer environments without breaking existing users.

I'm <3 loving plannotator btw, it's so fast.

Activity

  1. backnotprop commented on Jul 20, 2026

    @backnotprop
    Owner

    Thanks for the writeup. You can do this today: Plannotator honors a PLANNOTATOR_DATA_DIR environment variable that relocates the entire data directory (plans, history, drafts, config, sessions, everything). It supports ~ expansion:

    export PLANNOTATOR_DATA_DIR=~/.local/share/plannotator

    It's honored across the Claude Code, OpenCode, Amp, Pi, and VS Code integrations, and the install scripts resolve config.json through it too. It's under-documented right now, that's on us.

    We're also making this simpler. A PR is in progress that respects $XDG_DATA_HOME automatically when ~/.plannotator doesn't exist, so setups that already export XDG paths won't need to set anything. PLANNOTATOR_DATA_DIR stays the top-priority override and existing installs are unchanged.

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