Skip to main content

The Authzed CLI

zed is the command-line tool for managing Authzed permission systems.

zed is written in Go and currently supports macOS and Linux.


Homebrew (recommended)#

zed is currently packaged by as a head-only Homebrew Formula for both macOS and Linux.

First, ensure that homebrew is installed to your system path:

brew -v

If you don't see "Homebrew" and a version number, then download and install Homebrew.

brew install --HEAD authzed/tap/zed


In order to compile, the latest stable version of Go is required. When installed via this method, the --version flag will not reflect the most accurate information.

go install

Using the CLI#


zed context listlist all contexts
zed context removeremove a context
zed context setcreate or overwrite a context
zed context useset a context as the current context
zed loginan alias for zed context set
zed useas alias for zed context use
zed schema readread the Schema of current permission system
zed schema writewrite the Schema of current permission system
zed relationship createcreate a Relationship between Objects
zed relationship touchupdate the timestamp on an existing Relationship
zed relationship deletedelete an existing Relationship
zed permission checkcheck if a Permission exists
zed permission expanddisplay the expanded structure of a permission
zed experiments opaexecute OPA with additional Authzed builtin functions

Environment Variables#

ZED_TOKENOverrides the currently selected API Token
ZED_SYSTEMOverrides the currently selected permission system
ZED_ENDPOINTOverrides the API endpoint (default:

Open Policy Agent (OPA)#

As an experiment, zed also ships with a full copy of the OPA binary that has additional builtin functions for accessing the Authzed API. The supported functions are documented below:

  • authzed.check("subject:id", "permission", "object:id", "revision")