casbin-rust-cli

Crates.iocasbin-rust-cli
lib.rscasbin-rust-cli
version
sourcesrc
created_at2025-01-27 16:42:59.868422+00
updated_at2025-02-04 16:43:06.011329+00
descriptioncasbin-rust-cli is a command-line tool based on Casbin (Rust language), enabling you to use all of Casbin APIs in the shell.
homepagehttps://github.com/casbin-rs/casbin-rust-cli
repositoryhttps://github.com/casbin-rs/casbin-rust-cli
max_upload_size
id1532589
Cargo.toml error:TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include`
size0
(hsluoyz)

documentation

README

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

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

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":[]}

Commit count: 12

cargo fmt