Add mapbox config list/unset alongside get/set - #42
Merged
Merged
Conversation
get/set answer one key at a time; list answers all of them in one call, each falling back to its default the same way get does — worth having before a second setting makes the gap between "check everything" and "check one key" visible. unset clears a key back to "never set" rather than writing its current default value explicitly. The two read identically through resolve() today, but they are not the same fact on disk: a later default change reaches a cleared key, and does not reach one a caller pinned to the old default on purpose. clear() is unset's counterpart to set()'s Some(enabled), and get/list now share one resolve() so the two cannot answer a key differently. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
zmofei
approved these changes
Sep 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Re-opened as a new PR: #39 was auto-closed when its stacked base branch (
feat/106-persisted-config, from #35) was deleted on merge — GitHub closes rather than retargets a PR in that situation. Same content, now based directly onmainsince #35 is merged.mapbox config list: every setting and its current value in one call, rather than one key at a time.mapbox config unset <key>: clears a key back to "never set" rather than writing its current default value explicitly. The two read identically throughresolve()today, but they're not the same fact on disk — a later default change reaches a cleared key and not one a caller pinned to the old default on purpose.get/listnow share oneresolve()so the two can't answer a key differently;unsetgets aclear()counterpart toset'sSome(enabled).Test plan
cargo build,cargo fmt,cargo clippy --all-targets -- -D warnings,cargo test— all cleansrc/config.rsforresolve/cleartests/config.rs:listreports the one known key at its default and after aset, in both text and JSON;unsetis proven to remove the key from the file rather than just re-writing its default value (checked against the raw file contents, not just the CLI's own read-back)docs/commands.mdand CHANGELOG updated