Skip to content

feat: add project-level configuration discovery - #91

Merged
steve-calvert-glean merged 1 commit into
mainfrom
project-config
Apr 12, 2026
Merged

feat: add project-level configuration discovery#91
steve-calvert-glean merged 1 commit into
mainfrom
project-config

Conversation

@steve-calvert-glean

Copy link
Copy Markdown
Collaborator

Summary

  • Adds FindProjectConfig() that walks up from CWD looking for .glean/config.json
  • Same filename as global config, differentiated by location (same pattern as Claude Code's settings.json)
  • ProjectConfig struct supports default_output, default_mode, default_fields
  • Internal findProjectConfigFrom() helper enables testability without changing CWD

Test plan

  • Unit test: found from nested subdirectory
  • Unit test: not found returns nil, nil
  • Unit test: invalid JSON returns error
  • Unit test: empty config parses successfully
  • mise run test:all passes (454 tests, lint clean, binary builds)

@steve-calvert-glean
steve-calvert-glean requested a review from a team as a code owner April 11, 2026 21:03
Adds FindProjectConfig() that walks up from CWD looking for
.glean/config.json, enabling teams to share CLI preferences
(default output format, mode, fields) via their repo.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@steve-calvert-glean steve-calvert-glean added the enhancement New feature or request label Apr 12, 2026

@rwjblue-glean rwjblue-glean left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Might be good to allow merging of .glean/config.json with a .glean/config.local.json or something in a future PR.

That way you can have shared configs checked in to the repo, and local overrides that are globally git ignored (which is how I manage CLAUDE.md + CLAUDE.local.md or mise.toml + mode.local.toml)...

@steve-calvert-glean
steve-calvert-glean merged commit 484b193 into main Apr 12, 2026
7 checks passed
@steve-calvert-glean
steve-calvert-glean deleted the project-config branch April 12, 2026 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants