| Crates.io | casbin-rust-cli |
| lib.rs | casbin-rust-cli |
| version | 1.4.0 |
| created_at | 2025-01-27 16:42:59.868422+00 |
| updated_at | 2025-02-04 16:43:06.011329+00 |
| description | casbin-rust-cli is a command-line tool based on Casbin (Rust language), enabling you to use all of Casbin APIs in the shell. |
| homepage | https://github.com/casbin-rs/casbin-rust-cli |
| repository | https://github.com/casbin-rs/casbin-rust-cli |
| max_upload_size | |
| id | 1532589 |
| size | 75,809 |
casbin-rust-cli is a command-line tool based on Casbin (Rust language), enabling you to use all of Casbin APIs in the shell.
cargo install --locked casbin-rust-cli
git clone https://github.com/casbin-rs/casbin-rust-cli.git
cd casbin-rust-cli
cargo install --path .
| options | description | must |
|---|---|---|
-m, --model |
The path of the model file or model text | y |
-p, --policy |
The path of the policy file or policy text | y |
enforce |
Check permissions | n |
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":[]}