Skip to content

feat: add --save option for project config persistence#61

Open
MaxwellCalkin wants to merge 2 commits intosensay-io:mainfrom
MaxwellCalkin:feat/save-option
Open

feat: add --save option for project config persistence#61
MaxwellCalkin wants to merge 2 commits intosensay-io:mainfrom
MaxwellCalkin:feat/save-option

Conversation

@MaxwellCalkin
Copy link
Copy Markdown

Summary

  • Adds --save global CLI option that persists interactively resolved values to sensay.config.json
  • Extends OptionResolver with saveResolvedValues() method that writes only newly prompted values (not already in project config)
  • Passes save option through chat and simple-organization-setup command handlers

Fixes #5. Depends on #60 (merge that first, then this PR will have a clean diff).

Test plan

  • Run sensay chat --save, enter a replica name interactively → verify it's saved to sensay.config.json
  • Run sensay chat --save -r "MyReplica" → verify CLI value is NOT saved (only interactive values are saved)
  • Run sensay chat without --save → verify nothing is saved to config
  • Run sensay simple-organization-setup --save → verify userName/userEmail are saved
  • Verify --save appears in sensay --help output

🤖 Generated with Claude Code

MaxwellCalkin and others added 2 commits March 7, 2026 15:33
Creates a reusable OptionResolver class that handles the standard
configuration priority chain (CLI → ENV → Interactive → Project → User)
as specified in CLAUDE.md. Adds global --silent/-s option that skips
interactive prompts and uses config defaults.

Refactors chat and simple-organization-setup commands to use
OptionResolver, eliminating duplicated config resolution logic.

Closes sensay-io#2

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…roject config

When --save is passed, options resolved via interactive prompts that aren't
already in the project config are saved to sensay.config.json after resolution.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing save option for project configuration

1 participant