๐ฅ๏ธ CLI Usage: func-doctor
The Azure Functions Doctor CLI helps validate your local Python-based Azure Functions project for common issues using an extensible rules system.
๐ Basic Usage
func-doctor diagnose
Run diagnostics in the current or specified folder.
โ๏ธ Options
Option | Description |
---|---|
--path |
Target directory (default: current folder) |
--format json |
Output in machine-readable JSON |
--verbose |
Show detailed diagnostics and hints |
--help |
Show usage for the CLI or subcommand |
Example:
func-doctor diagnose --path ./my-func-app --format json --verbose
โ What It Checks
Category | Description |
---|---|
Python Environment | Python version โฅ 3.9, virtualenv activated, executable exists |
Dependencies | requirements.txt present, azure-functions installed |
Project Files | host.json , local.settings.json , and main.py exist |
๐งช Example Output
๐ฉบ Azure Functions Doctor for Python v0.1.0
๐ Path: /root/Github/azure-functions-doctor/examples/basic-hello
โ Python Env
โข Python version: Python version is 3.12.3, expected >=3.9
โข Virtual environment: VIRTUAL_ENV is set
โข Python executable: .../bin/python exists
โข requirements.txt: exists
โข azure-functions package: Package 'azure_functions' is not installed
โ Project Structure
โข host.json: exists
โข local.settings.json: is missing
โข main.py: is missing
Summary
โ 0 Passed โ 2 Failed
๐ Help
func-doctor --help
func-doctor diagnose --help
For more examples, see the example project.