Rust CLI for Casbin-RS

Clone this repo:
  1. 89953a2 chore(release): 1.4.0 [skip ci] by semantic-release-bot · 1 year, 1 month ago master v1.4.0
  2. 75a1dd1 feat: fix bug in JSON format type conversion (#10) by LiuliFox · 1 year, 1 month ago
  3. b5ca66a chore(release): 1.3.0 [skip ci] by semantic-release-bot · 1 year, 1 month ago v1.3.0
  4. 5a128b8 feat: add support for json format args and improve version format (#8) by LiuliFox · 1 year, 1 month ago
  5. 86909fb chore(release): 1.2.0 [skip ci] by semantic-release-bot · 1 year, 1 month ago v1.2.0

casbin-rust-cli

Crates.io Docs CI

casbin-rust-cli is a command-line tool based on Casbin (Rust language), enabling you to use all of Casbin APIs in the shell.

Installation

From crates.io

cargo install --locked casbin-rust-cli

Install Manually

git clone https://github.com/casbin-rs/casbin-rust-cli.git
cd casbin-rust-cli
cargo install --path .

Options

optionsdescriptionmust
-m, --modelThe path of the model file or model texty
-p, --policyThe path of the policy file or policy texty
enforceCheck permissionsn

Get started

  • Check whether Alice has read permission on data1

    ./casbin-rust-cli enforce -m "examples/basic_model.conf" -p "examples/basic_policy.csv" "alice" "data1" "read"
    

    {“allow”:true,“explain”:[]}