{"id":15033522,"url":"https://github.com/azure/azure-functions-core-tools","last_synced_at":"2025-05-13T00:19:40.063Z","repository":{"id":37548401,"uuid":"77990768","full_name":"Azure/azure-functions-core-tools","owner":"Azure","description":"Command line tools for Azure Functions","archived":false,"fork":false,"pushed_at":"2025-05-12T23:13:46.000Z","size":5308,"stargazers_count":1379,"open_issues_count":710,"forks_count":451,"subscribers_count":94,"default_branch":"main","last_synced_at":"2025-05-13T00:19:39.358Z","etag":null,"topics":["azure-functions"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Azure.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-01-04T07:09:00.000Z","updated_at":"2025-05-12T20:49:16.000Z","dependencies_parsed_at":"2024-01-08T16:09:05.883Z","dependency_job_id":"0ee7a6c2-2993-4eb2-90c5-9d759d61e834","html_url":"https://github.com/Azure/azure-functions-core-tools","commit_stats":{"total_commits":1448,"total_committers":149,"mean_commits":9.718120805369127,"dds":0.6595303867403315,"last_synced_commit":"121d4266e3b2fb019a4ba8c0d6792b28bb095a8b"},"previous_names":["azure/azure-functions-cli"],"tags_count":209,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Azure%2Fazure-functions-core-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Azure%2Fazure-functions-core-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Azure%2Fazure-functions-core-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Azure%2Fazure-functions-core-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Azure","download_url":"https://codeload.github.com/Azure/azure-functions-core-tools/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253843566,"owners_count":21972931,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["azure-functions"],"created_at":"2024-09-24T20:21:34.148Z","updated_at":"2025-05-13T00:19:40.038Z","avatar_url":"https://github.com/Azure.png","language":"C#","readme":"﻿![Azure Functions Logo](https://raw.githubusercontent.com/Azure/azure-functions-cli/master/src/Azure.Functions.Cli/npm/assets/azure-functions-logo-color-raster.png)\n\n|Branch|Status|\n|---|---|\n|main|[![Build status](https://azfunc.visualstudio.com/Azure%20Functions/_apis/build/status/azure-functions-core-tools?branchName=main)](https://azfunc.visualstudio.com/Azure%20Functions/_build/latest?definitionId=11\u0026branchName=main)|\n|in-proc|[![Build status](https://azfunc.visualstudio.com/Azure%20Functions/_apis/build/status/azure-functions-core-tools?branchName=in-proc)](https://azfunc.visualstudio.com/Azure%20Functions/_build/latest?definitionId=11\u0026branchName=in-proc)|\n|v1.x|[![Build status](https://azfunc.visualstudio.com/Azure%20Functions/_apis/build/status/azure-functions-core-tools?branchName=v1.x)](https://azfunc.visualstudio.com/Azure%20Functions/_build/latest?definitionId=11\u0026branchName=v1.x)|\n\n# Azure Functions Core Tools\n\nThe Azure Functions Core Tools provide a local development experience for creating, developing, testing, running, and debugging Azure Functions.\n\n## Versions\n\n**v1** (v1.x branch): Requires .NET 4.7.1 Windows Only\n\n**v4**: (main branch): Self-contained cross-platform package **(recommended)**\n\n## Installing\n\n### Windows\n\n#### To download and install with MSI:\n\n##### v4\n\n- [Windows 64-bit](https://go.microsoft.com/fwlink/?linkid=2174087) (VS Code debugging requires 64-bit)\n- [Windows 32-bit](https://go.microsoft.com/fwlink/?linkid=2174159)\n\n##### v3\n\n- [Windows 64-bit](https://go.microsoft.com/fwlink/?linkid=2135274) (VS Code debugging requires 64-bit)\n- [Windows 32-bit](https://go.microsoft.com/fwlink/?linkid=2135275)\n\n#### To install with npm:\n\n##### v4\n```bash\nnpm i -g azure-functions-core-tools@4 --unsafe-perm true\n```\n\n##### v3\n```bash\nnpm i -g azure-functions-core-tools@3 --unsafe-perm true\n```\n\n##### v2\n```bash\nnpm i -g azure-functions-core-tools@2 --unsafe-perm true\n```\n\n#### To install with chocolatey:\n\n##### v4\n```bash\nchoco install azure-functions-core-tools\n```\n\n##### v3\n```bash\nchoco install azure-functions-core-tools-3\n```\n\n*Notice: To debug functions under vscode, the 64-bit version is required*\n```bash\nchoco install azure-functions-core-tools-3 --params \"'/x64'\"\n```\n\n##### v2\n```bash\nchoco install azure-functions-core-tools-2\n```\n\n#### To install with winget:\n\n##### v4\n\n```bash\nwinget install Microsoft.Azure.FunctionsCoreTools\n```\n\n##### v3\n\n```bash\nwinget install Microsoft.Azure.FunctionsCoreTools -v 3.0.3904\n```\n\n### Mac\n\n#### Homebrew:\n\n##### v4\n\n```bash\nbrew tap azure/functions\nbrew install azure-functions-core-tools@4\n```\n\n##### v3\n```bash\nbrew tap azure/functions\nbrew install azure-functions-core-tools@3\n```\n\n##### v2\n```bash\nbrew tap azure/functions\nbrew install azure-functions-core-tools@2\n```\n\nHomebrew allows side by side installation of v2 and v3, you can switch between the versions using\n```bash\nbrew link --overwrite azure-functions-core-tools@3\n```\n\n\n### Linux\n\n#### 1. Set up package feed\n\n##### Ubuntu 22.04\n\n```bash\nwget -q https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb\nsudo dpkg -i packages-microsoft-prod.deb\n```\n\n##### Ubuntu 20.04\n\n```bash\nwget -q https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb\nsudo dpkg -i packages-microsoft-prod.deb\n```\n\n##### Ubuntu 19.04\n\n```bash\nwget -q https://packages.microsoft.com/config/ubuntu/19.04/packages-microsoft-prod.deb\nsudo dpkg -i packages-microsoft-prod.deb\n```\n\n##### Ubuntu 18.10\n\n```bash\nwget -q https://packages.microsoft.com/config/ubuntu/18.10/packages-microsoft-prod.deb\nsudo dpkg -i packages-microsoft-prod.deb\n```\n\n##### Ubuntu 18.04\n\n```bash\nwget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb\nsudo dpkg -i packages-microsoft-prod.deb\n```\n\n##### Ubuntu 16.04 / Linux Mint 18\n\n```bash\nwget -q https://packages.microsoft.com/config/ubuntu/16.04/packages-microsoft-prod.deb\nsudo dpkg -i packages-microsoft-prod.deb\n```\n\n##### Debian 12\n\n```bash\nexport DEBIAN_VERSION=12\n\napt-get update \u0026\u0026 apt-get install gpg wget  -y\nwget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor | tee /usr/share/keyrings/microsoft-prod.gpg\nwget -q https://packages.microsoft.com/config/debian/$DEBIAN_VERSION/prod.list\nmv prod.list /etc/apt/sources.list.d/microsoft-prod.list\nchown root:root /usr/share/keyrings/microsoft-prod.gpg\nchown root:root /etc/apt/sources.list.d/microsoft-prod.list\napt-get update \u0026\u0026 apt-get install azure-functions-core-tools-4  -y\napt-get update \u0026\u0026 apt-get install libicu-dev  -y\n```\n\n#### 2. Install\n\n##### v4\n```bash\nsudo apt-get update\nsudo apt-get install azure-functions-core-tools-4\n```\n\n##### v3\n```bash\nsudo apt-get update\nsudo apt-get install azure-functions-core-tools-3\n```\n\n##### v2\n```bash\nsudo apt-get update\nsudo apt-get install azure-functions-core-tools-2\n```\n\n#### Other Linux Distributions\n\n1. Download latest release\n\n    Download the latest release for your platform from [here](https://github.com/Azure/azure-functions-core-tools/releases).\n\n2. Unzip release zip\n\n    Using your preferred tool, unzip the downloaded release. To unzip into an `azure-functions-cli` directory using the `unzip` tool, run this command from the directory containing the downloaded release zip:\n\n    ```bash\n    unzip -d azure-functions-cli Azure.Functions.Cli.linux-x64.*.zip\n    ```\n\n3. Make the `func` command executable\n\n    Zip files do not maintain the executable bit on binaries. So, you'll need to make the `func` binary, as well as `gozip` (used by func during packaging) executables. Assuming you used the instructions above to unzip:\n\n    ```bash\n    cd azure-functions-cli\n    chmod +x func\n    chmod +x gozip\n    ./func\n    ```\n\n4. Optionally add `func` to your `$PATH`\n\n    To execute the `func` command without specifying the full path to the binary, add its directory to your `$PATH` environment variable. Assuming you're still following along from above:\n\n    ```bash\n    export PATH=`pwd`:$PATH\n    func\n    ```\n\n[Code and test Azure Functions locally](https://docs.microsoft.com/en-us/azure/azure-functions/functions-run-local)\n\n**NOTE**: npm can be used on all platforms. On unix platforms, you may need to specify `--unsafe-perm` if you are running npm with sudo. That's due to npm behavior of post install script.\n\n## Getting Started on Kubernetes\n\nUsing the Core Tools, you can easily configure a Kubernetes cluster and run Azure Functions on it.\n\n### Prerequisites\n\n* [Docker](https://docs.docker.com/install/)\n* [Kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/)\n\n### Installing Kubernetes scalers\n\nThis deploys [KEDA](https://github.com/kedacore/keda) to your cluster which allows you to deploy your functions in a scale-to-zero by default for non-http scenarios only.\n\n```bash\nfunc kubernetes install --namespace {namespace}\n```\n\n**KEDA:** Handles monitoring polling event sources currently QueueTrigger and ServiceBusTrigger.\n\n### Deploy to Kubernetes\n\n**First make sure you have Dockerfile for your project.** You can generate one using\n```bash\nfunc init --docker # or --docker-only (for existing projects)\n```\nThen to deploy to kubernetes\n\n```bash\nfunc kubernetes deploy \\\n    --name myfunction \\\n    --namespace functions-ns \\\n    --registry \u003cdocker-hub-id or registry-server\u003e\n```\n\nThis will build the current `Dockerfile` and push the image to the registry specified, then deploys a `Secret`, `Deployment`, and `ScaledObject`. If your functions have httpTrigger, you'll get an additional `Deployment` and `Service`.\n\n### Deploy using a private registry\n\n```bash\nfunc kubernetes deploy --name myfunction --registry \u003cdocker-hub-id or registry-server\u003e --pull-secret \u003cregistry auth secret\u003e\n\n```\n\n### Deploy a function to Knative\n\n#### Prerequisites\n\n* [Knative](https://github.com/knative/docs/tree/master/docs/install)\n\nDeploying Azure Functions to knative is supported with the ```--platform knative``` flag.\nThe Core Tools CLI identifies non HTTP trigger functions and annotates the knative manifest with the the ```minScale``` annotation to opt out of scale-to-zero.\n\n```bash\nfunc deploy --platform knative --name myfunction --registry \u003cdocker-hub-id or registry-server\u003e\n```\n\n### Deploying a function to AKS using ACR\nUsing the configuration options an Azure Function app can also be deployed to a [AKS](https://azure.microsoft.com/en-us/services/kubernetes-service/) (Azure Kubernetes Service) Kubernetes cluster and use [ACR](https://azure.microsoft.com/en-us/services/container-registry/) as the registry server. Do all of the following *before* you run the deployment command.\n\n#### Create a AKS cluster\nYou can create an AKS cluster using the [Azure Portal](https://docs.microsoft.com/en-us/azure/aks/kubernetes-walkthrough-portal) or using [Azure CLI](https://docs.microsoft.com/en-us/azure/aks/kubernetes-walkthrough).\n\nOnce your AKS cluster is created make sure that you can access it using kubectl. To make kubectl run in the context of your cluster, configure a connection using the command below.\n```azurecli\naz aks get-credentials \\\n    --name FunctionsCluster \\\n    --resource-group \u003cresource-group-name\u003e\n```\n\nTo verify the connection to your cluster run the following command\n```bash\n\u003e kubectl get nodes\n\nNAME                       STATUS    ROLES     AGE       VERSION\naks-agentpool-20257154-0   Ready     agent     1d        v1.11.5\naks-agentpool-20257154-1   Ready     agent     1d        v1.11.5\naks-agentpool-20257154-2   Ready     agent     1d        v1.11.5\n```\n#### Create a ACR Registry\nAn ACR instance can be created using the Azure Portal or the [Azure CLI](https://docs.microsoft.com/en-us/azure/container-registry/container-registry-get-started-azure-cli#create-a-container-registry)\n\n#### Login to the ACR Registry\nBefore pushing and pulling container images, you must log in to the ACR instance.\n\n```azurecli\naz acr login --name \u003cacrName\u003e\n```\n\n#### Give the AKS cluster access to the ACR Registry\nThe AKS cluster needs access to the ACR Registry to pull the container. Azure creates a service principal to support cluster operability with other Azure resources. This can be used for authentication with an ACR registry. See here for how to grant the right access here: [Authenticate with Azure Container Registry from Azure Kubernetes Service](https://docs.microsoft.com/en-us/azure/container-registry/container-registry-auth-aks)\n\n#### Run the deployment\nThe deployment will build the docker container and upload the container image to your referenced ACR instance (Note: Specify the ACR Login Server in the --registry parameter this is usually of the form \u003ccontainer_registry_name\u003e.azurecr.io) and then your AKS cluster will use that as a source to obtain the container and deploy it.\n\n```bash\nfunc kubernetes deploy --name myfunction --registry \u003cacr-registry-loginserver\u003e\n```\n\nIf the deployment is successful, you should see this:\n\nFunction deployed successfully!\nFunction IP: 40.121.21.192\n\n#### Verifying your deployment\nYou can verify your deployment by using the Kubernetes web dashboard. To start the Kubernetes dashboard, use the [az aks browse](https://docs.microsoft.com/en-us/cli/azure/aks?view=azure-cli-latest#az-aks-browse) command.\n\n```azurecli\naz aks browse --resource-group myResourceGroup --name myAKSCluster\n```\nIn the Kubernetes dashboard look for the namespace \"azure-functions\" and make sure that a pod has been deployed sucessfully with your container.\n\n### Deploying Azure Functions with Virtual-Kubelet\n\nAzure Functions running on Kubernetes can take advantage of true serverless containers model by getting deployed to different providers of [Virtual Kubelet](https://github.com/virtual-kubelet/virtual-kubelet), such as Azure Container Instances.\u003cbr\u003e\n\nFunctions deployed to Kubernetes already contain all the tolerations needed to be schedulable to Virtual Kubelet nodes.\nAll you need to do is to set up VKubelet on your Kubernetes cluster:\n\n* [Install VKubelet with ACI](https://github.com/virtual-kubelet/azure-aci)\n\n* [Install VKubelet with ACI on AKS](https://docs.microsoft.com/en-us/cli/azure/aks?view=azure-cli-latest#az-aks-install-connector)\n\n*Important note:*\nVirtual Kubelet does not currently allow for Kubernetes Services to route external traffic to pods.\nThis means that HTTP triggered functions will not receive traffic running on a VKubelet provider (including ACI).\n\nA good usage scenario for using functions with VKubelet would be with event triggered / time triggered functions that do not rely on external HTTP traffic.\n\n## Known Issues:\n\n`func extensions` command require the `dotnet` cli to be installed and on your path. This requirement is tracked [here](https://github.com/Azure/azure-functions-core-tools/issues/367). You can install .NET Core for your platform from https://www.microsoft.com/net/download/\n\n## Default Directories\n\n* `CurrentDirectory`: is the default directory the functions runtime looks for functions in.\n* `%TMP%\\LogFiles\\Application\\Functions`: is the default directory for logs. It mirrors the logs directory on Azure as well.\n\n## Telemetry\n\nThe Azure Functions Core tools collect usage data in order to help us improve your experience.\nThe data is anonymous and doesn't include any user specific or personal information. The data is collected by Microsoft.\n\nYou can opt-out of telemetry by setting the `FUNCTIONS_CORE_TOOLS_TELEMETRY_OPTOUT` environment variable to '1' or 'true' using your favorite shell.\n\n[Microsoft privacy statement](https://privacy.microsoft.com/en-US/privacystatement)\n\n## License\n\nThis project is under the benevolent umbrella of the [.NET Foundation](http://www.dotnetfoundation.org/) and is licensed under [the MIT License](LICENSE)\n\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.\n\n## Contact Us\n\nFor questions on Azure Functions or the tools, you can ask questions here:\n\n- [Azure Functions Q\u0026A Forum](https://docs.microsoft.com/en-us/answers/topics/azure-functions.html)\n- [Azure-Functions tag on StackOverflow](http://stackoverflow.com/questions/tagged/azure-functions)\n\nFile bugs at [Azure Functions Core Tools repo on GitHub](https://github.com/Azure/azure-functions-core-tools/issues).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazure%2Fazure-functions-core-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fazure%2Fazure-functions-core-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazure%2Fazure-functions-core-tools/lists"}