Command-line Tools
Casbin CLIs expose the Casbin API from the command line so you can load models and policies, run enforce checks, and manage policy from your shell. Implementations are available for Go, Java, Node.js, Python, .NET, and Rust.
Installation
Go (casbin-go-cli)
-
Clone the repository:
git clone https://github.com/casbin/casbin-go-cli.git -
Build the CLI:
cd casbin-go-cli
go build -o casbin
Rust (casbin-rust-cli)
Install from crates.io
cargo install casbin-rust-cli
Build from source
-
Clone the repository:
git clone https://github.com/casbin-rs/casbin-rust-cli.git -
Build with release optimizations:
cd casbin-rust-cli
cargo build --release
Java (casbin-java-cli)
-
Clone the repository:
git clone https://github.com/jcasbin/casbin-java-cli.git -
Build using Maven (the JAR file will be created in the
targetdirectory):cd casbin-java-cli
mvn clean install