@ozee-io/fga-transformer-cli
v0.2.1
Published
Simple CLI to convert FGA DSL to JSON
Downloads
4
Readme
fga-transformer-cli
Archived
NOTE: This repository has been archived and is no longer maintained by Ozee.io as we are no longer using OpenFGA. Please feel free to fork and use this.
fga-transformer-cli is a simple wrapper around the openfga syntax-transformer library to enable programatic transformation of OpenFGA DSLs to the JSON syntax.
This is useful in situations such as a pipeline.
Options to run
This can be run from Node, or from the helper docker container
Node
Prerequisites
- Node 18 LTS
- NPM or Yarn
Install
npm install @ozee-io/fga-transformer-cli
git clone [email protected]:Ozee-io/fga-transformer-cli.git
cd fga-transformer-cli
yarn install && yarn link
Run
fga-transformer-cli --source "my/source/file.dsl" --target "my/destination/file.json"
The generated JSON can also be output in the console by specifying the --verbose
option.
Docker
Prerequisites
- Docker
Install
docker pull ghcr.io/ozee-io/openfga-syntax-transformer
# or build locally
git clone [email protected]:Ozee-io/fga-transformer-cli.git
docker build -t fga-transformer-cli .
Consume
docker run -v ${PWD}:/app fga-transformer-cli --source "my/source/file.dsl" --target "my/destination/file.json"