Skip to content

feat(index): add --hidden flag for dot-prefixed files#97

Closed
peterkc wants to merge 1 commit into
BeaconBay:mainfrom
peterkc:feature/ck-hidden-flag
Closed

feat(index): add --hidden flag for dot-prefixed files#97
peterkc wants to merge 1 commit into
BeaconBay:mainfrom
peterkc:feature/ck-hidden-flag

Conversation

@peterkc

@peterkc peterkc commented Jan 10, 2026

Copy link
Copy Markdown

Summary

Add --hidden CLI flag to include hidden (dot-prefixed) files and directories in indexing and search operations.

Use case: Users want to index configuration directories like .claude/, .config/, or .github/ that are hidden by default.

Changes

  • Add --hidden flag to CLI (ck-cli/src/main.rs)
  • Add show_hidden field to FileCollectionOptions (ck-core)
  • Add hidden field to SearchOptions (ck-core)
  • Make WalkBuilder.hidden() conditional on config (ck-index)
  • Wire flag through MCP server, TUI, and engine
  • Add integration test for --hidden functionality
  • Update CHANGELOG.md

Behavior

Command Hidden files
ck --index . Excluded (default)
ck --hidden --index . Included
ck --hidden --sem "query" . Searched

The flag defaults to false to maintain backward compatibility.

Test plan

  • cargo test --workspace passes
  • Manual verification with .hidden-test/ directory
  • Integration test: test_hidden_flag_includes_hidden_files
  • --hidden + --no-ignore combination works correctly

Add `--hidden` CLI flag to include hidden (dot-prefixed) files and
directories in indexing and search operations.

Changes:
- Add --hidden flag to CLI (ck-cli)
- Add show_hidden field to FileCollectionOptions (ck-core)
- Add hidden field to SearchOptions (ck-core)
- Make WalkBuilder.hidden() conditional on config (ck-index)
- Wire flag through MCP server, TUI, and engine
- Add integration test for --hidden functionality
- Update CHANGELOG.md

The flag defaults to false (hidden files excluded) to maintain
backward compatibility. When enabled, hidden directories like
.claude/ can be indexed and searched.

Closes: BeaconBay/ck#XX
@runonthespot

Copy link
Copy Markdown
Contributor

Hi @peterkc 👋

This PR is well-implemented (clean show_hidden plumbing through ck-core → ck-index → ck-cli → MCP/TUI, integration test included, proper default-false for backward compat). It's been sitting in draft since January.

Heads-up: main's CI was broken from late January through today and has just been fixed (#110 + #116). Your branch is now testable.

Would you like to:

  1. Mark this ready for review (and rebase on current main) — I'll review and merge.
  2. Hand it off — say the word and one of us can pick it up and finish.
  3. Close it if you don't need it anymore.

No pressure, just nudging since it's a small, useful feature.

runonthespot added a commit that referenced this pull request Jul 9, 2026
Add a `--hidden` CLI flag that includes hidden (dot-prefixed) files and
directories in both search and indexing. Off by default to preserve the
current "skip hidden" behavior.

The flag threads through `SearchOptions.hidden` and
`FileCollectionOptions.show_hidden` to the `ignore` crate's
`WalkBuilder.hidden(!show_hidden)` in `ck-index::collect_files`, which is
the single walker shared by the search path (`ck-engine`) and the
index-building path (embedding + lexical corpus). Composes independently
with `--no-ignore` / `--no-ckignore`.

Adds two integration tests (regex search path and lexical index path),
README docs, and a CHANGELOG entry.

Re-implements #97 (original by @peterkc), cleanly on current main.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@runonthespot

Copy link
Copy Markdown
Contributor

Superseded by #176, which re-implements the --hidden flag cleanly on current main (this branch had drifted too far to rebase — it referenced since-removed files). Original idea and implementation credit to @peterkc; the new PR carries the feature forward with tests. Thank you! 🙏

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.

2 participants