Add interactive engine selection and secret configuration to init command#11064
Merged
Add interactive engine selection and secret configuration to init command#11064
Conversation
… configuration Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update init command to support interactive mode and engine selection
Add interactive engine selection and secret configuration to init command
Jan 21, 2026
Contributor
|
@copilot ask confirmation before configuring secrets, gracefully handle the case where gh does not have enough permissions to set the secret. |
…sion error handling - Add interactive confirmation prompt before setting repository secrets - Gracefully handle permission errors (403, Forbidden) with clear messaging - Display specific error messages for permission issues vs other failures - Skip setting secrets if user declines confirmation Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Contributor
Author
Added in commit f254409:
The secret configuration continues with remaining secrets even if one fails due to permissions. |
pelikhan
reviewed
Jan 21, 2026
pkg/cli/init.go
Outdated
| label string | ||
| description string | ||
| }{ | ||
| {"copilot", "GitHub Copilot", "GitHub Copilot CLI with agent support"}, |
Contributor
There was a problem hiding this comment.
@copilot use types and constants defined in constants.go
Contributor
Author
There was a problem hiding this comment.
Updated in commit fd1ffd0 to use constants.CopilotEngine, constants.ClaudeEngine, and constants.CodexEngine instead of string literals.
pkg/cli/init.go
Outdated
- Use constants.CopilotEngine, constants.ClaudeEngine, constants.CodexEngine instead of string literals - Rename variable mcp to copilotMcp for clarity Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
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.
Plan: Update init command with interactive mode
Add interactive mode when init is invoked without arguments
Implementation approach:
init_command.goto detect when no engine/flags providedInitRepositoryInteractivefunction using huh library for promptstokens_bootstrap.gologic for secret recommendationsgh secret setcommandTesting:
Documentation:
Code Quality:
Summary
Successfully implemented interactive mode for the
initcommand with all requested improvements:Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.