Dapr command line interface (CLI) reference

Detailed information on the Dapr CLI

The Dapr CLI allows you to setup Dapr on your local dev machine or on a Kubernetes cluster, provides debugging support, and launches and manages Dapr instances.

  1. __
  2. ____/ /___ _____ _____
  3. / __ / __ '/ __ \/ ___/
  4. / /_/ / /_/ / /_/ / /
  5. \__,_/\__,_/ .___/_/
  6. /_/
  7. ===============================
  8. Distributed Application Runtime
  9. Usage:
  10. dapr [command]
  11. Available Commands:
  12. annotate Add dapr annotations to a Kubernetes configuration. Supported platforms: Kubernetes
  13. build-info Print build info of Dapr CLI and runtime
  14. completion Generates shell completion scripts
  15. components List all Dapr components. Supported platforms: Kubernetes
  16. configurations List all Dapr configurations. Supported platforms: Kubernetes
  17. dashboard Start Dapr dashboard. Supported platforms: Kubernetes and self-hosted
  18. help Help about any command
  19. init Install Dapr on supported hosting platforms. Supported platforms: Kubernetes and self-hosted
  20. invoke Invoke a method on a given Dapr application. Supported platforms: Self-hosted
  21. list List all Dapr instances. Supported platforms: Kubernetes and self-hosted
  22. logs Get Dapr sidecar logs for an application. Supported platforms: Kubernetes
  23. mtls Check if mTLS is enabled. Supported platforms: Kubernetes
  24. publish Publish a pub-sub event. Supported platforms: Self-hosted
  25. run Run Dapr and (optionally) your application side by side. Supported platforms: Self-hosted
  26. status Show the health status of Dapr services. Supported platforms: Kubernetes
  27. stop Stop Dapr instances and their associated apps. Supported platforms: Self-hosted
  28. uninstall Uninstall Dapr runtime. Supported platforms: Kubernetes and self-hosted
  29. upgrade Upgrades a Dapr control plane installation in a cluster. Supported platforms: Kubernetes
  30. version Print the Dapr runtime and CLI version
  31. Flags:
  32. -h, --help help for dapr
  33. --log-as-json Log output in JSON format
  34. -v, --version version for dapr
  35. Use "dapr [command] --help" for more information about a command.

Command Reference

You can learn more about each Dapr command from the links below.

环境变量

Some Dapr flags can be set via environment variables (e.g. DAPR_NETWORK for the --network flag of the dapr init command). Note that specifying the flag on the command line overrides any set environment variable.