Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 18 additions & 3 deletions cli/azd/.vscode/cspell.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ overrides:
- filename: pkg/apphost/generate.go
words:
- alue
- filename: docs/extension-framework.md
- filename: docs/extensions/extension-framework.md
words:
- getenv
- errorf
Expand Down Expand Up @@ -223,7 +223,7 @@ overrides:
words:
- WORKDIR
- workdir
- filename: docs/new-azd-command.md
- filename: docs/style-guidelines/new-azd-command.md
words:
- pflag
- struct
Expand Down Expand Up @@ -270,9 +270,24 @@ overrides:
- Logf
- Getenv
- httptest
- filename: docs/extension-framework.md
- filename: docs/extensions/extension-framework.md
words:
- invopop
- filename: docs/style-guidelines/azd-style-guide.md
words:
- camelCase
- checkmark
- Colorization
- gofmt
- myService
- NewMyService
- PascalCase
- SomeDependency
- testify
- userConfig
- Println
- adrz
- rvwxu
- filename: pkg/extensions/metadata.go
words:
- invopop
Expand Down
9 changes: 8 additions & 1 deletion cli/azd/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# Contributing to `azd`

Hi there 👋! Thank you for showing interest in contributing to `azd`.
Hello there 👋! Thank you for showing interest in contributing to `azd`.

## Guidelines

- [Code Style Guide](./docs/style-guidelines/azd-style-guide.md)
- [Extensions Style Guide](./docs/extensions/extensions-style-guide.md)
- [Adding New Commands](./docs/style-guidelines/new-azd-command.md)
- [Guiding Principles](./docs/style-guidelines/guiding-principles.md)

In general, to make contributions a smooth and easy experience, we encourage the following:

Expand Down
59 changes: 59 additions & 0 deletions cli/azd/docs/extensions/extensions-style-guide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Extension Development Guidelines for `azd`

## Overview

This guide provides design guidelines and best practices for developing extensions to the Azure Developer CLI (`azd`). Following these guidelines ensures that extensions maintain consistency with core `azd` functionality and provide a seamless user experience.

## Design Guidelines for Extensions

### 1. **Command Integration Strategy**

- New functionality should extend existing command categories
- Use a verb-first structure, where the primary action (e.g., add, create, delete, list) is the top-level command, and the target entity or context follows as an argument or subcommand.
- Example: `azd add <new-resource-type>` instead of `azd <new-resource-type> add`

### 2. **Parameter and Flag Consistency**

- Reuse established parameter patterns across new commands
- Maintain consistent naming conventions (e.g., `--subscription`, `--name`, `--type`)
- Provide sensible defaults to reduce cognitive load

### 3. **Help and Discoverability**

- Integrate new functionality into existing `azd help` structure
- Provide contextual guidance within established command flows
- Maintain documentation consistency across core and extended features

### 4. **Template and Resource Integration**

- Leverage existing template system for new resource types
- Follow established template discovery and management patterns
- Integrate new resources into azd's resource lifecycle management

### 5. **CI/CD and IaC Guidance**

- Provide support for GitHub Actions and Azure DevOps
- Consider support for a range of IaC providers (Bicep, Terraform, etc.)
Comment thread
kristenwomack marked this conversation as resolved.

## Implementation Benefits

- **User Familiarity**: Builds on known command patterns and reduces learning curve
- **Discoverability**: New capabilities are found through existing workflows
- **Consistency**: Predictable behavior across all azd commands and extensions
- **Maintainability**: Systematic approach reduces complexity and technical debt
- **Extensibility**: Clear framework for adding capabilities without breaking existing patterns
- **Ecosystem Growth**: Provides foundation for third-party extensions and integrations

## Future Considerations

This framework enables:

- Advanced workflow automation
- Enhanced developer productivity features
- Consistent user experience across all `azd` functionality
- Integration of new Azure services and capabilities
- Third-party extension development

---

*For core design principles that apply to all `azd` functionality, see [guiding-principles.md](../style-guidelines/guiding-principles.md).*
Loading
Loading