Where Does dprint Store Config and Cache?
dprint reads dprint.json in the project and stashes plugins plus incremental state in the OS cache dir.
Last updated
dprint centers on dprint.json (or .jsonc, hidden variants work too) at the project root: plugin list, per-language settings, includes and excludes. Descendant configs carve out subtrees in monorepos instead of merging with the root.
The heavy state lives elsewhere. Plugins and incremental formatting data go to the OS user cache (~/.cache/dprint on Linux), so wiping the project never forces a plugin re-download and clearing the cache never loses settings.
Where dprint stores this, by platform
[RepoDir]\dprint.json
Project config: plugins, rules, excludes. Descendant dprint.json files take over their subtree. Global cache sits in %LOCALAPPDATA%\dprint (plugins, incremental state).
[RepoDir]/dprint.json
Same project file. Global cache in ~/Library/Caches/dprint. Edit via dprint config edit, which respects DPRINT_EDITOR, VISUAL, then EDITOR.
[RepoDir]/dprint.json
Same project file. Global cache in ~/.cache/dprint. Update pinned plugins with dprint config update (--recursive for monorepo subtrees).
Frequently asked questions
How do I create my first dprint.json?
Run dprint init. It scaffolds dprint.json and picks plugins matching the files present; -y accepts the guesses non-interactively for scripts.
Can I keep dprint.json outside the repo root?
Pass --config <path> (or -c). Non-standard locations are never auto-discovered, and editor plugins need the same explicit path to follow along.
Notice an outdated path? Let us know.