Skip to content

fix: Adds default data directory for CLI search commands#2

Merged
aaronstevenwhite merged 1 commit intomainfrom
fix/cli-default-data-dir
Sep 27, 2025
Merged

fix: Adds default data directory for CLI search commands#2
aaronstevenwhite merged 1 commit intomainfrom
fix/cli-default-data-dir

Conversation

@aaronstevenwhite
Copy link
Collaborator

@aaronstevenwhite aaronstevenwhite commented Sep 27, 2025

Summary

Fixes CLI search commands to work without requiring --data-dir argument by using the same default path as glazing init.

Key Changes

  • Added default path: Search commands now default to ~/.local/share/glazing/converted/
  • Updated 4 CLI commands: search query, search entity, search role, search cross-ref
  • Version bump: 0.1.0 → 0.1.1 (patch release for bug fix)

Problem

CLI commands failed with "Missing option '--data-dir'" despite README examples suggesting the argument was optional.

Solution

Import get_default_data_path() from glazing.initialize and use it as the default value for all search command --data-dir options.

Impact

  • Users can now run glazing search query "abandon" without specifying data directory
  • Commands work as documented in README
  • No breaking changes: existing commands with explicit --data-dir still work
  • All tests pass (pytest, mypy --strict, ruff check, ruff format)

Files Changed

  • src/glazing/cli/search.py - Added default data directory support
  • pyproject.toml, src/glazing/__version__.py version bump
  • Documentation files: Updated version references
  • CHANGELOG.md: Added 0.1.1 entry

@aaronstevenwhite aaronstevenwhite merged commit bad03af into main Sep 27, 2025
9 checks passed
@aaronstevenwhite aaronstevenwhite deleted the fix/cli-default-data-dir branch September 27, 2025 23:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant