Summary
Add snipemgr edit <integration> to open the installed integration's settings.yaml (or Secret Manager secret) in $EDITOR. A shortcut for users who prefer direct config editing over the interactive wizard.
Motivation
The install wizard is good for first-time setup but cumbersome for small config tweaks. Power users who already know the config structure want to open the file directly and edit it — same as kubectl edit or git config --global -e.
Usage
snipemgr edit github2snipe
# Opens the integration's config in $EDITOR
# On save + quit, updated values are written back to Secret Manager
Behavior
- Fetch the current config for
github2snipe from Secret Manager
- Write it to a temporary file (e.g.
/tmp/snipemgr-github2snipe-<pid>.yaml)
- Open
$EDITOR (fallback: $VISUAL, then vi) with the temp file
- On editor exit: diff the temp file against the original
- If changed: prompt for confirmation, then write updated values back to Secret Manager
- If unchanged: print "no changes" and exit
- Always delete the temp file on exit (including on error/interrupt)
Acceptance criteria
Security notes
- The temp file contains plaintext credentials — write it to a directory with
0700 permissions and use 0600 file mode
- Delete the temp file with
os.Remove in a defer block — ensure cleanup even on panic
- Do not log the temp file path at INFO level
Implementation notes
- No external dependency needed —
exec.Command($EDITOR, tmpfile) with Stdin/Stdout/Stderr wired to os.Stdin/Stdout/Stderr is sufficient
- The temp file format should be YAML, matching
settings.example.yaml structure
Summary
Add
snipemgr edit <integration>to open the installed integration'ssettings.yaml(or Secret Manager secret) in$EDITOR. A shortcut for users who prefer direct config editing over the interactive wizard.Motivation
The install wizard is good for first-time setup but cumbersome for small config tweaks. Power users who already know the config structure want to open the file directly and edit it — same as
kubectl editorgit config --global -e.Usage
Behavior
github2snipefrom Secret Manager/tmp/snipemgr-github2snipe-<pid>.yaml)$EDITOR(fallback:$VISUAL, thenvi) with the temp fileAcceptance criteria
snipemgr edit <integration>opens the config in$EDITOR/$VISUAL/viSecurity notes
0700permissions and use0600file modeos.Removein adeferblock — ensure cleanup even on panicImplementation notes
exec.Command($EDITOR, tmpfile)withStdin/Stdout/Stderrwired toos.Stdin/Stdout/Stderris sufficientsettings.example.yamlstructure