Skip to content

๐Ÿ–ฅ๏ธ 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.