#11032 Config should be stored in ~/.config/wrangler/, not ~/.config/.wrangler/
Valid bug: xdgAppPaths(".wrangler") creates hidden dir inside ~/.config/, violating XDG convention. Maintainer engaged; requires migration strategy for existing users.
Keep open for fix. Consider inviting PR from reporter.
Analysis Report
Issue Review: cloudflare/workers-sdk#11032
Summary
Wrangler stores config in ~/.config/.wrangler/ (hidden directory) instead of ~/.config/wrangler/, violating XDG naming conventions.
Findings
- Created: 2025-10-20
- Updated: 2025-10-23
- Version: wrangler 4.42.0 → 4.60.0 (current)
- Component: wrangler (config paths)
- Labels: bug
- Comments: 2 (maintainer asked for impact, reporter explained discoverability issue)
Key Evidence
- Root cause confirmed: The code in
packages/workers-utils/src/global-wrangler-config-path.tsexplicitly usesxdgAppPaths(".wrangler")with a leading dot, creating~/.config/.wrangler/instead of~/.config/wrangler/ - Historical context: PR #1375 (merged 2022-07-11) added XDG compliance but retained the
.wranglername from the legacy~/.wranglerpath - No fix merged: No PRs or changelog entries reference fixing this issue
- Valid UX concern: Reporter explained that the hidden directory is hard to discover, took 15 minutes to find using
strace, and doesn't match conventions of other tools - Maintainer engagement: @petebacondarwin asked for clarification (2025-10-21), reporter provided detailed justification
Code Analysis
The fix would be straightforward - change line in packages/workers-utils/src/global-wrangler-config-path.ts:
// Current (problematic)
const configDir = xdgAppPaths(".wrangler").config();
// Should be
const configDir = xdgAppPaths("wrangler").config();
However, this would require a migration strategy for existing users who have config in ~/.config/.wrangler/.
Recommendation
Status: KEEP OPEN
Reasoning: This is a valid bug report with clear evidence. The reporter correctly identified that wrangler violates XDG naming conventions by using a hidden directory inside ~/.config/. The issue has been acknowledged by a maintainer and the reporter provided a compelling UX justification. The fix is straightforward but requires consideration of migration for existing users.
Action: Keep open for implementation. Consider adding this to the backlog as a low-priority enhancement that improves developer experience on Linux.
Suggested Comment
Thanks for the detailed report and explanation. This is a valid point - the
.wranglerdirectory name was carried over from the legacy~/.wranglerpath when XDG support was added in #1375.A fix would involve:
- Changing
xdgAppPaths(".wrangler")toxdgAppPaths("wrangler")inpackages/workers-utils/src/global-wrangler-config-path.ts- Adding migration logic to move existing
~/.config/.wrangler/to~/.config/wrangler/Would you be interested in submitting a PR for this?
Notes & Feedback (0)
No notes yet.