Skip to content

No per-workspace config file (workspace-rooted YAML) for project-relative defaults #1709

Description

@Widthdom

Summary

Beyond CLI flags and a small set of env vars (CDIDX_*), there is no per-workspace config file (.cdidx.yml / cdidx.config.json) where a team can pin defaults like default_excludes, max_file_size_kb, default_kind_filter, mcp_tool_allowlist, output_format. As a result, every team member has to remember the same set of CLI flags or wrap cdidx in a shell script. Project-relative defaults are a basic ergonomic feature most modern code tools support.

Where

  • src/CodeIndex/Cli/ProgramRunner.cs (no config-file load step)
  • src/CodeIndex/Cli/QueryCommandRunner.cs / IndexCommandRunner.cs (no merge of file defaults under CLI flags)

Suggested approach

(1) Define a .cdidx.yml schema (or cdidx.config.json for non-YAML repos) with the most-frequently-overridden CLI flags as keys. (2) Resolve precedence: CLI flag > env var > config file > built-in default. (3) Walk parent directories from CWD to locate the file (similar to .gitignore), and stop at workspace manifest if present (#C304). (4) Add cdidx config show to print the merged effective config. (5) Document precedence and supported keys in DEVELOPER_GUIDE. (6) Add a regression test that asserts CLI flags override file values.

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