Command Line Interface (CLI)
In addition to http APIs for managing all resources, Warrant also ships with a native CLI (source) with commands for checking access and managing common resources like roles, permissions, tenants, users and the various associations between them.
macOS (Using Homebrew)
brew install warrant-dev/warrant/warrant
The latest binaries for Mac, Linux & Windows are available here.
After download/installation, you first need to initialize the CLI:
Once initialized, the CLI is ready for use. For example, we can add the
admin role to
user:345 with the following command:
warrant assign role:admin user:345
Although not all operations are supported via CLI yet, many are, including commands to manage common resources and RBAC scenarios. Run
warrant -h to get a list of supported commands or check out the API Reference (look for a 'CLI' tab in code snippets).