Command Line Interface (CLI)
In addition to http APIs, Warrant also ships with a native CLI (source) with commands for managing object types, objects, and warrants as well as checking and querying against your access models.
Installation
- macOS
- Linux
- Windows
Verify installation by running a command.
warrant --version
Enabling shell autocompletion
The Warrant CLI provides autocompletion support for Bash, Fish, Zsh, and Powershell.
- Bash
- Fish
- Zsh
echo 'source <(warrant completion bash)' >> ~/.bashrc
Add the following line to your ~/.config/fish/config.fish
file:
warrant completion fish | source
Add the following line to your ~/.zshrc
file:
source <(warrant completion zsh)
Usage
After installation, initialize the CLI for use:
warrant init
Once initialized, the CLI is ready for use. For example, we can make user:345
an editor
of document:xyz
with the following command:
warrant assign user:345 editor document:xyz
Supported Commands
Run warrant --help
to get a list of supported commands and check out the API Reference (look for a 'CLI' tab in code snippets).