Extension Participation in azd init Flow
- Dominant language
- Go
- Stars
- 569
- Forks
- 364
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 136
Description
## Description
Add capability for extensions to register hooks/handlers that integrate with the `azd init` command. When extensions implement this capability, they should automatically appear as options during the `azd init` interactive flow. When a user selects an extension option, the associated UX flow is automatically dispatched to gather necessary configuration from the user.
## Acceptance Criteria
- Extensions can register init handlers via extension manifest or API
- Registered extensions appear as selectable options in `azd init` flow
- Selecting an extension option triggers the extension's custom UX/prompts
- Configuration from extension is captured and stored in azure.yaml
- Extension init handlers execute in proper sequence
- Works with both built-in and custom registries
## Examples
- When a user runs `azd init`, they see option: "Set up AI Agent Extension"
- Selecting that option runs the azure.ai.agents init flow
- When a user runs `azd init`, they see option: "Set up Coding Agent"
- Selecting that option runs the azure.coding-agent init flow
## Real-World Use Case - AI Agents Extension
**Currently**, users must run TWO separate commands:
1. `azd init` - Standard azd initialization
2. `azd ai agent init` - Separate command users must discover
This creates friction as users don't naturally discover `azd ai agent init` and must lookup documentation.
**With this feature**:
1. User runs `azd init`
2. Sees prompt: "Do you want to set up an AI Agent? (Yes/No)"
3. Selecting "Yes" automatically triggers the `azd ai agent init` workflow
4. All configuration happens in one cohesive flow
5. No need for users to discover or manually run separate commands
## Benefits
- Unified user experience
- Reduces command discovery friction
- Better onboarding for extension capabilities
- Extensions become first-class citizens in project initialization
## Related Issues
- #5728 (AI Extension Epic) - Would benefit from this capability
- #5767 (Extension Enhancements Epic) - Framework improvement
## Notes
- Consider extension ordering/prioritization in init menu
- Consider conflict resolution if multiple extensions modify same config
- Align with extension discovery/registry mechanisms
Contributor guide
Assessment
This issue has not been assessed yet.