Conversation
Owner
jaxxstorm
commented
Apr 15, 2026
- feat(config): add oauth-backed profiles and age secret encryption
- feat(config): add age key path and interactive profile setup
- feat(config): add interactive setup and age key reuse
- fix(config): block deleting the active tailnet profile
- fix(config): preserve encrypted profile auth and auth precedence
- test(config): cover interactive profile prompts
- feat(config): prompt for output and debug defaults in setup
Contributor
There was a problem hiding this comment.
Pull request overview
Extends tscli config setup to collect and persist global CLI preferences (output, debug) during first-run setup, and updates config persistence logic so debug is no longer stripped during config rewrites—while ensuring runtime precedence (flags/env over persisted defaults) remains intact.
Changes:
- Add initial-setup-only prompts for default
output(json|pretty|human) and defaultdebuglogging, persisting both into~/.tscli.yaml. - Update config canonicalization to preserve persisted
debugwhile still excluding transient keys (help,base-url). - Add/adjust unit + integration tests to validate persistence and precedence behavior, and update specs to document the new requirements.
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| test/cli/persistent_prerun_runtime_config_test.go | Adds runtime precedence tests ensuring persisted output/debug are overridden by env/flags. |
| test/cli/example_output_test.go | Updates config setup golden interaction input to include new prompts. |
| test/cli/config_profiles_integration_test.go | Verifies new setup prompts/persistence and ensures rerun flows don’t re-prompt for preferences. |
| pkg/config/profiles_test.go | Ensures profile canonicalization preserves unrelated persisted keys including debug. |
| pkg/config/config.go | Adds multi-key persistence helpers and stops stripping debug during canonicalization. |
| openspec/specs/multi-tailnet-config-profiles/spec.md | Documents that initial setup persists output/debug after profile creation. |
| openspec/specs/interactive-config-setup/spec.md | Documents new initial-setup prompt sequence for output then debug. |
| openspec/specs/cli-default-output-and-debug/spec.md | New spec defining persisted defaults + precedence order. |
| openspec/changes/archive/2026-04-15-prompt-setup-output-and-debug/tasks.md | Archived task breakdown for the change set. |
| openspec/changes/archive/2026-04-15-prompt-setup-output-and-debug/specs/multi-tailnet-config-profiles/spec.md | Archived spec delta for multi-tailnet profiles. |
| openspec/changes/archive/2026-04-15-prompt-setup-output-and-debug/specs/interactive-config-setup/spec.md | Archived spec delta for interactive setup. |
| openspec/changes/archive/2026-04-15-prompt-setup-output-and-debug/specs/cli-default-output-and-debug/spec.md | Archived added spec for defaults/precedence. |
| openspec/changes/archive/2026-04-15-prompt-setup-output-and-debug/proposal.md | Archived proposal describing motivation and impact. |
| openspec/changes/archive/2026-04-15-prompt-setup-output-and-debug/design.md | Archived design notes and tradeoffs. |
| openspec/changes/archive/2026-04-15-prompt-setup-output-and-debug/.openspec.yaml | Adds openspec metadata for the archived change set. |
| cmd/tscli/config/setup/cli_test.go | Adds unit tests for new setup step transitions and preference persistence. |
| cmd/tscli/config/setup/cli.go | Implements initial-setup-only output/debug steps and persists selected preferences. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Lee Briggs <lee@leebriggs.co.uk>
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.