Repository navigation
rust(feat): interactive profile setup for sift-cli config - #853
Merged
Merged
Conversation
`config create` now prompts for profile values and creates new profiles with `--profile <name>`. `config update` without flags opens an editor that shows current values, hides the API key, and confirms a masked change list. Outside a terminal it exits 2 instead of a silent no-op. `--profile default` now selects the top-level profile in every command.
…ditor Each field now shows its current value on its own line above a `new:` prompt, and the header says to type a new value or leave it blank to keep the current one. Suggested app URLs say they are used when left blank.
alexluck-sift
marked this pull request as ready for review
October 26, 2026 17:35
solidiquis
previously approved these changes
Oct 27, 2026
solidiquis
approved these changes
Oct 27, 2026
taylor-sift
approved these changes
Oct 28, 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
sift-cli config updatewith no flags printedNothing to update.and exited 0, and setting up a profile took two commands that you had to know to run in order. This PR makesconfig createandconfig updateinteractive.createmakes new things (the config file or a profile) andupdateedits existing ones, with the same prompts.Config commands
config createprompts for the profile values.--profile <new>adds a profile, and with no--profileit asks for a name once the default profile is set up.config updatewith no flags opens an editor: a profile picker, current values in brackets (Enter keeps them), a hidden API key, and a change list with the key masked beforeApply? [Y/n]. It writes nothing when no field changed.config updatewith no flags exits 2. A missing file or unknown profile points toconfig create. The flag path is unchanged for scripts and now prints what changed.--profile default[default]table, so--profile default pingfailed on a normal config. A file with a real[default]table still uses it.Verification
config createconfig updatewith the profile pickercreate --profile staging, picker plus key rotation, no-change, decline, unknown profile, and input sent before the prompts appeared.create,updatewith and without flags) and confirmed the exit codes and written TOML.config createwhen the default profile is set upconfig updatewith no flags outside a terminalconfig updatefor a profile that does not existconfig create