Skip to main content
Version: Next

Dgraph CLI

The Dgraph command-line interface (CLI) provides comprehensive tools for deploying and managing Dgraph in self-managed environments. Whether you're running Dgraph on on-premises infrastructure or cloud platforms (AWS, GCP, Azure), the CLI gives you complete control over your deployment.

CLI Structure​

The Dgraph CLI is built around the root dgraph command and its subcommands. Many commands support their own subcommands, creating a hierarchical structure. For example, dgraph acl requires you to specify a subcommand like add, del, info, or mod.

Available Commands​

The Dgraph CLI includes the following command groups:

Core Commands​

Data Loading Commands​

Security Commands​

Debug Commands​

Utility Commands​

Configuration​

Dgraph provides flexible configuration options:

  • Superflags - Learn about compound flags for complex commands
  • Configuration Guide - Configure using flags, environment variables, or config files

Getting Help​

You can view help for any command using the --help flag:

dgraph --help                  # Show all available commands
dgraph alpha --help # Show alpha-specific options
dgraph acl add --help # Show help for acl add subcommand