@ozee-io/fga-transformer-cli

0.2.1 • Public • Published

fga-transformer-cli

Node.js CI Quality Gate Status

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.

drawing

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 git@github.com: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 git@github.com: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"

Package Sidebar

Install

npm i @ozee-io/fga-transformer-cli

Weekly Downloads

3

Version

0.2.1

License

MIT

Unpacked Size

12.3 kB

Total Files

27

Last publish

Collaborators

  • rorychatterton
  • thesampaton