-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
{doc} Refine authoring commands doc #17236
Conversation
doc |
Co-authored-by: Feiyue Yu <iamyfy@163.com>
Co-authored-by: Feiyue Yu <iamyfy@163.com>
Co-authored-by: Feiyue Yu <iamyfy@163.com>
If your commands aren't showing with `az`, use `az --debug` to help debug. There could have been an exception | ||
thrown whilst attempting to load your module. | ||
|
||
|
||
<a name="heading_author_command_mod"></a>Authoring command modules | ||
------ | ||
Currently, all command modules should start with `azure-cli-`. | ||
When the CLI loads, it search for packages installed that start with that prefix. | ||
|
||
The `example_module_template` directory gives an example command module with other useful examples. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The example_module_template
directory no longer exists, right? This line can also be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
``` | ||
|
||
Also, you can run `az` and if your command module contributes any commands, they should appear. | ||
If your command module contributes any commands, they should appear with `az`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If your command module contributes any commands, they should appear with `az`. | |
If your command module contributes any commands, they should appear when running `az`. |
Make it more clear with a verb.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@@ -79,6 +63,10 @@ Command modules should have the following structure: | |||
`-- HISTORY.rst | |||
``` | |||
|
|||
You could create these files manually, or [create a module with `azdev cli create`](https://azurecliprod.blob.core.windows.net/videos/04%20-%20AzdevCliCreate.mp4). | |||
|
|||
You could also consider using [Code-gen tool](https://azurecliprod.blob.core.windows.net/videos/04%20-%20AzdevCliCreate.mp4) to generate code automatically. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The link is not right for Code-gen
.
Shall we move Code-gen
above azdev cli create
as it is more recommended now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good check!
``` | ||
|
||
Also, you can run `az` and if your command module contributes any commands, they should appear. | ||
If your command module contributes any commands, they should appear when running `az`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is "they"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
commands
cd azure-cli | ||
virtualenv env | ||
git clone https://github.com/Azure/azure-cli-extensions.git | ||
python -m venv env | ||
source env/bin/activate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You assume it is Linux environment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. It is a simple example and for more information about setting up environment, link to https://github.com/Azure/azure-cli-dev-tools#setting-up-your-development-environment for details.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a hint "This is script for Linux"?
Description
Current doc page is out of date. Here is to adjust the doc with latest azure cli developer tooling.
Testing Guide
History Notes
[Component Name 1] BREAKING CHANGE: az command a: Make some customer-facing breaking change.
[Component Name 2] az command b: Add some customer-facing feature.
This checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.