Skip to main content

Microsoft Atomic Azure CLI Dev Tools

The aaz-dev tool is designed to generate atomic Azure CLI commands from OpenAPI specifications. For more information, please refer to document and video.

Installation

Currently, we can install it with a .whl file. Later on, we'll publish it to PyPI to support pip install way of installation.

Setting up your development environment

1 Code repos

Please Fork the following repos in your github account and Clone them in your local disk:

After clone you can add upstream for every repos in your local clone by using git remote add upstream.

2 Setup python

2.1 Install python

Please install python with version >= 3.10 and <= 3.14 in your local machine.

  • For windows: You can download and run full installer from Python Download.
  • For linux: You can install python from Package Manager or build a stable relase from source code

Check the version of python, make use it's not less than 3.10.

  • For windows: You can run:
    C:\Users\{xxxx}\AppData\Local\Programs\Python\Python3{xxxx}\python --version
    
    C:\Users\{xxxx}\AppData\Local\Programs\Python\Python3{xxxx} is the python installation path.
  • For linux:
    python --version
    
    You can also specify the version number when you have multiple versions installed. For example if you want to run version 3.12
    python3.12 --version
    

2.2 Setup a python virtual environment

You can use venv to create virtual environments, optionally isolated from system site directories. Each virtual environment has its own Python binary (which matches the version of the binary that was used to create this environment) and can have its own independent set of installed Python packages in its site directories.

You can run the following command to create a new virtual environment:

  • For windows:
    C:\Users\{xxxx}\AppData\Local\Programs\Python\Python3{xxxx}\python -m venv {some path}\{venv name}
    
  • For linux:
    python3.12 -m venv {some path}/{venv name}
    

3 Active existing virtual environment

You should always active the virtual environment for azure-cli development.

  • For Windows:
    • Powershell
    {some path}\{venv name}\Scripts\Activate.ps1
    
    • Command Prompt
    {some path}\{venv name}\Scripts\activate.bat
    
  • For Linux:
source {some path}/{venv name}/bin/activate

After active the virtual environment, the python command will always be the one creates this virtual environment and you can always use python

python --version

4 Install tools for azure-cli development

4.1 Install aaz-dev-tools

  • For Windows
    • Powershell
    pip install aaz-dev
    
    • Command Prompt
    pip install aaz-dev
    
  • For linux
    pip install aaz-dev
    

4.2 Set up build env

  • For linux users, set up python3 build tools would avoid other unseen installation issues
    Ubuntu: apt-get install python3-dev build-essential
    Centos: yum install python3-devel
    

5. Code repos setup

5.1 azure-cli

Before start to the development task, you should always sync the code in the dev branch of upstream(Azure/Azure-cli). If your commands will generated to azure-cli repo, you should checkout a new branch with feature- prefix.

5.2 azure-cli-extensions

If your commands will generated to azure-cli-extension repo, you should sync the code in the main branch of upstream(Azure/Azure-cli-extensions), and checkout a new branch with feature- prefix.

5.3 aaz

Before start to the development task, you should always sync the change in the main branch of upstream, and checkout a new branch with feature- prefix.

5.4 run azdev setup

You should always run the following command everytime you sync azure-cli code of upstream.

azdev setup --cli {path to azure-cli} --repo {path to azure-cli-extensions}

6 Run aaz-dev-tools

aaz-dev run -c {path to azure-cli} -e {path to azure-cli-extensions} -s {path swagger or swagger-pr} -a {path to aaz}

Before using generated commands

  1. Make sure you have logined by az login.
  2. Make sure you have switched to the subscription for test by az account set -s {subscription ID for test}
  3. If your commands are in extensions, make sure you have loaded this extension by azdev extension add {your extension name}

Other documentations

Submit code and command models

After finish the development, you should push the change in your forked repos first, and the create a Pull Request to upstream repos.

  • azure-cli: create a Pull Request to dev branch of Azure/azure-cli
  • azure-cli-extensions: create a Pull Request to main branch of Azure/azure-cli-extensions
  • aaz: create a Pull Request to main branch of Azure/azz

Reporting issues and feedback

If you encounter any bugs with the tool please file an issue in the Issues section of our GitHub repository.

License

MIT License

Copyright (c) Microsoft Corporation. All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ""Software""), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Metadata

Release files for aaz-dev 4.7.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aaz-dev 4.7.1
File Size Uploaded
aaz_dev-4.7.1.tar.gz 1.7 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for aaz-dev 4.7.1
File Interpreter ABI Platform
aaz_dev-4.7.1-py3-none-any.whl Python 3 none any Details

Total release size: 3.6 MB

Release files / aaz_dev-4.7.1.tar.gz

Download URL aaz_dev-4.7.1.tar.gz
Size 1.7 MB
Tags Source
SHA-256 checksum
How to use checksums
60e7eeb124a07509b277421a2250a7c0905bde6ff748bc7cc58721730099805c
BLAKE2b-256 checksum
How to use checksums
8eb90af60f62b15ad8f4c0831256a158ddf1e2dfbd716a105c632e8765ef38d7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via RestSharp/106.13.0.0

Release files / aaz_dev-4.7.1-py3-none-any.whl

Download URL aaz_dev-4.7.1-py3-none-any.whl
Size 1.8 MB
Tags Python 3
SHA-256 checksum
How to use checksums
f76cc8a9e3201da99897bbdf0e8dd047d524b4b73a24c121e4eb6df76040f724
BLAKE2b-256 checksum
How to use checksums
0819f7e8854863b54dba84258f639c1365f0a43ee73d90799f0ae20218a8fb2c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via RestSharp/106.13.0.0

Release history Release notifications | RSS feed

This release

4.7.1 This release

2 release files

4.7.0

2 release files

4.6.2

2 release files

4.6.1

2 release files

4.6.0

2 release files

4.5.5

2 release files

4.5.4

2 release files

4.5.3

2 release files

4.5.2

2 release files

4.5.1

2 release files

4.5.0

2 release files

4.4.0

2 release files

4.3.1

2 release files

4.3.0

2 release files

4.2.0

2 release files

4.1.0

2 release files

4.0.0

2 release files

3.2.0

2 release files

3.1.0

2 release files

3.0.0

1 release file

2.9.0

2 release files

2.8.0

2 release files

2.7.0

2 release files

2.6.2

2 release files

2.6.1

2 release files

2.6.0

2 release files

2.5.1

2 release files

2.5.0

2 release files

2.4.0

2 release files

2.3.0

2 release files

2.2.0

2 release files

2.1.0

2 release files

2.0.0

2 release files

1.8.0

2 release files

1.7.1

2 release files

1.7.0

2 release files

1.6.2

2 release files

1.6.1

2 release files

1.6.0

2 release files

1.5.2

2 release files

1.5.1

2 release files

1.5.0

2 release files

1.4.0

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page