[CLI] Config commands should only work locally unless -g is passed for global.
- Dominant language
- C#
- Stars
- 6.3k
- Forks
- 991
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 196
Description
### Is there an existing issue for this?
- [x] I have searched the existing issues
### Describe the bug
The `aspire config *` commands support different levels of global support.
`config get | list` don't support the `-g` flag.
`config set | delete` do support the `-g` flag.
### Expected Behavior
This is confusing for a user because they have to manage their context via the current directory, to handle global config. If I'm curious if setting `xyz` is set globally, but it's already set locally, I cannot see what the global value is if I run `aspire config get xyz`. Further, I don't even know that it gave me that setting via a local override. I have to go back one directory where there isn't a local config file and run the command again to actually see the global value.
Now I understand you want a good user experience or API experience where something gets the value regardless of local or global. I suggest a new command for that `aspire config read` where this command does the smart logic of finding the config value regardless of local or global context.
The `aspire config list` command operates in the same "smart" mode but I don't know where those options are coming from in the results. Perhaps a new command `aspire config listall` or something.
### Steps To Reproduce
_No response_
### Exceptions (if any)
_No response_
### .NET Version info
_No response_
### Anything else?
_No response_
Contributor guide
Research direction
Start by tracing the `aspire config get`, `list`, `set`, and `delete` command entry points and compare how they resolve local and global configuration. Clarify whether the intended fix is consistent `-g` support or separate read/list-all commands, then verify that local and global values are distinguishable in the command results.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100