Skip to content

dbroeglin/generator-az-ai

Repository files navigation

Az AI Generator npm version

Az AI Scaffolding Tool

Open in GitHub Codespaces Open in Dev Containers

Quick start

Generate you own fully functional project

First, install Yeoman and generator-az-ai using npm (we assume you have pre-installed node.js).

npm install -g yo
npm install -g generator-az-ai

NOTE! If you have the generator installed already, you might also want to update the templates.

# optional
npm upgrade -g generator-az-ai

Then generate your new project:

yo az-ai awesome-ai-app

Prefer to have a look at an already generated project?

Development

For local development link your souce directory with NPM:

npm link
npm install

Full testing:

uv run pytest --runslow

Testing backend authentication:

token=$(az account get-access-token \
  --resource api://$(azd env get-value AZURE_CLIENT_APP_ID) \
  -t $(az account show --query tenantId -o tsv) \
  --query accessToken -o tsv)
curl -i  $(azd env get-value SERVICE_BACKEND_URL)/echo \
  -X GET \
  -H 'Content-Type: application/json' \
  -H "Authorization: Bearer $token" \
  -d '{"Hello":"World!"}'

Comparing generations

Comparing full L100 generation:

yo az-ai  ../az-ai-kickstarter \
  --solutionName 'Azure AI App Kickstarter' \
  --solutionLevel 100 \
  --solutionDescription 'AI Application chassis - best AI app practices optimized for Azure' \
  --solutionSlug az-ai-kickstarter \
  --solutionVersion 0.1.0 \
  --creatorName 'AI GBB EMEA' \
  --creatorEmail eminkevich@microsoft.com \
  --withGitHub true \
  --withFrontend true \
  --withBackend true \
  --gitHubOrg evmin \
  --gitHubRepo az-ai-kickstarter \
  --withGitHubPush ''

# Positive result: the last line in the command output should be "No changes to commit."

Comparing full Level 300 generation:

yo az-ai  ../az-ai-scaffolding-test-l300 \
  --solutionName 'Az AI scaffolding tool test' \
  --solutionLevel 300 \
  --solutionDescription 'Solution generated with the Az AI Scaffolding tool test (l300)' \
  --solutionSlug az-ai-scaffolding-test-l300 \
  --solutionVersion 0.1.0 \
  --creatorName 'Dominique Broeglin' \
  --creatorEmail dominique.broeglin@microsoft.com \
  --withFrontend true \
  --withBackend true \
  --withPackage true \
  --packageName 'Az AI Scaffolding Core' \
  --packageDescription 'Az AI Scaffolding Test Core Package' \
  --packageSlug 'az-ai-scaffolding-core' \
  --withGitHub true \
  --gitHubOrg dbroeglin \
  --gitHubRepo az-ai-scaffolding-test-l300 \
  --withGitHubPush false

# Positive result: the last line in the command output should be "No changes to commit."

Getting To Know Yeoman

  • Yeoman has a heart of gold.
  • Yeoman is a person with feelings and opinions, but is very easy to work with.
  • Yeoman can be too opinionated at times but is easily convinced not to be.
  • Feel free to learn more about Yeoman.

License

See the LICENSE file for license rights and limitations (MIT).

Acknowledgements

Authors