ctx7@0.5.2

thmoa/tex2shapectx7@0.5.2Jun 11, 2026by github-actions[bot]

AI Summary

Improved Windows compatibility by fixing Git Bash path mangling and migrated CLI storage locations to XDG Base Directory standards.

Key Highlights

  • Fixed Git Bash path mangling for library IDs (e.g., `/owner/repo`).
  • Migrated credentials, updater state, and previews to `$XDG_*` directories (e.g., `~/.config/context7`).
  • Auto-migration of existing files from `~/.context7` on first use.

New Features

  • XDG Base Directory support for CLI files.

Full Release Notes

### Patch Changes

- cb6aee1: Bump runtime dependencies: `commander` 13 -> 15 and `ora` 9.0 -> 9.4.
- 428af3e: Recover Context7 library IDs that Git Bash mangles on Windows. Git Bash rewrites a leading-slash argument like `/facebook/react` into a Windows path under the Git install dir (`C:/Program Files/Git/facebook/react`), causing `ctx7 docs` to reject it as invalid; this mainly affected users running ctx7 through Claude Code. The CLI now detects and undoes the conversion before validation, accepts the `//owner/repo` escape, and points users at that workaround for install layouts it can't auto-detect.
- c03bc9c: Store CLI files in XDG Base Directory locations instead of `~/.context7`. Credentials move to `$XDG_CONFIG_HOME/context7` (default `~/.config/context7`), updater state to `$XDG_STATE_HOME/context7` (default `~/.local/state/context7`), and `generate` previews to `$XDG_CACHE_HOME/context7` (default `~/.cache/context7`). Existing files in `~/.context7` are migrated automatically on first use; migration is best-effort and falls back to reading the legacy file if it cannot complete. The credentials file is always re-asserted to `0o600` after migration or write so it is never group/world-readable. Relative or empty `XDG_*` values are ignored per the spec.