Skip to content

Add default .indexbind output paths and ignore hidden files during directory scans #39

Description

@jolestar

Background

The current CLI always requires explicit input and output paths.

At the same time, directory scanning does not currently ignore hidden files or directories by default. That means a future default output directory such as .indexbind/ could be scanned back into the next build unless hidden paths are excluded.

Problem

Two CLI ergonomics problems are now connected:

  1. The CLI has no default artifact/cache/bundle output paths.
  2. The directory scanner does not ignore dot-prefixed paths.

If we want a simpler default CLI flow like:

  • indexbind build
  • indexbind build ./docs
  • indexbind update-cache

then the generated outputs need a stable default location, and that location must not be re-indexed by later directory scans.

Proposed behavior

Default path rules

Use .indexbind/ under the indexed input directory as the default output root.

Rules:

  • if no input directory is provided, input defaults to .
  • if no output path is provided:
    • build writes <input-dir>/.indexbind/index.sqlite
    • build-bundle writes <input-dir>/.indexbind/index.bundle/
    • update-cache writes <input-dir>/.indexbind/build-cache.sqlite

Explicit output arguments should continue to override these defaults.

Directory scan rules

Default directory scanning should ignore hidden files and directories.

At minimum, any path segment beginning with . should be excluded by default, including:

  • .indexbind/
  • .git/
  • .github/
  • .obsidian/
  • .vscode/
  • hidden markdown files such as .draft.md

This should happen at scan time, ideally pruning hidden directories during traversal rather than filtering only after reading files.

Notes

This issue is about default CLI behavior and scan safety.

It does not need to add an override such as --include-hidden immediately, but that can be considered later if a real use case appears.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions