{"id":19591814,"url":"https://github.com/rhamzeh/openfga-cli","last_synced_at":"2026-05-27T16:31:58.935Z","repository":{"id":152450470,"uuid":"623220560","full_name":"rhamzeh/openfga-cli","owner":"rhamzeh","description":"An unofficial OpenFGA CLI tool written in node ","archived":false,"fork":false,"pushed_at":"2023-07-20T09:35:06.000Z","size":518,"stargazers_count":0,"open_issues_count":6,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-10-23T01:29:49.955Z","etag":null,"topics":["authorization","cli","openfga"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@rhamzeh/openfga-cli","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rhamzeh.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-04T00:02:42.000Z","updated_at":"2024-08-16T15:40:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"63bc5349-53ce-492b-b671-b784839c2184","html_url":"https://github.com/rhamzeh/openfga-cli","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/rhamzeh/openfga-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhamzeh%2Fopenfga-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhamzeh%2Fopenfga-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhamzeh%2Fopenfga-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhamzeh%2Fopenfga-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rhamzeh","download_url":"https://codeload.github.com/rhamzeh/openfga-cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhamzeh%2Fopenfga-cli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33575511,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-27T02:00:06.184Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["authorization","cli","openfga"],"created_at":"2024-11-11T08:31:03.160Z","updated_at":"2026-05-27T16:31:58.899Z","avatar_url":"https://github.com/rhamzeh.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![npm](https://img.shields.io/npm/v/@rhamzeh/openfga-cli.svg?style=flat)](https://www.npmjs.com/package/@rhamzeh/openfga-cli)\n[![Release](https://img.shields.io/github/v/release/rhamzeh/openfga-cli?sort=semver\u0026color=green)](https://github.com/rhamzeh/openfga-cli/releases)\n[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](./LICENSE)\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Frhamzeh%2Fopenfga-cli.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Frhamzeh%2Fopenfga-cli?ref=badge_shield)\n[![Tests](https://github.com/rhamzeh/openfga-cli/actions/workflows/main.yaml/badge.svg)](https://github.com/rhamzeh/openfga-cli/actions/workflows/main.yaml)\n\n# OpenFGA CLI (Unofficial)\n\n\u003e Note: this is an unofficial CLI for interacting with the OpenFGA API. It is not maintained by the core OpenFGA team, nor does it come with any guarantees from them\n\nThis was a hackathon project by @rhamzeh and @adriantam to make interacting with a custom OpenFGA hosted environment, or managed Auth0 FGA environment easier through the CLI.\n\n## Dependencies\n\nRequires [node.js](https://nodejs.org/) and [Typescript](https://www.typescriptlang.org/) to be installed.\n\n## Installation\n\n### From npm\n```shell\nnpm i -g @rhamzeh/openfga-cli\n```\n\n### Manual\n\n1. Clone the repo locally\n2. Navigate to the directory\n3. Run `npm install`\n4. Run `npm run build`\n5. Run `npm link`\n\nThe `openfga-cli-node` command will now be available for you to use.\n\n## Shell completions\n\nThe completions are exposed via `openfga-cli-node completion`\n\nTo add them to your shell:\n* bash\n```shell\nopenfga-cli-node completion \u003e\u003e ~/.bashrc # or openfga-cli-node completion \u003e\u003e ~/.bash_profile\n```\n* zsh\n```shell\nopenfga-cli-node completion \u003e\u003e ~/.zshrc # or openfga-cli-node completion \u003e\u003e ~/.zsh_profile\n```\n\n## Usage\n\n```shell\nopenfga-cli-node \u003coptions\u003e \u003ccommand\u003e\n\nOptions:\n--version               Show version number                                      [boolean]\n--help                  Show help                                                [boolean]\n\nCommands:\n  openfga-cli-node check [storeId]           Check whether a user is related to an object as a certain relation\n      Options:\n      --help                  Show help                                                [boolean]\n      --storeId               OpenFGA Store ID. env var=OPENFGA_STORE_ID           [string] [required]\n      --environment           Known Environment. env var=OPENFGA_ENVIRONMENT     [string] [choices: \"us\", \"staging\", \"playground\", \"custom\"] [default: \"custom\"]\n      --apiScheme             API Scheme. env var=OPENFGA_API_SCHEME [string]\n      --apiHost               API Host. env var=OPENFGA_API_HOST [string]\n      --clientId              OpenFGA Client Id. env var=OPENFGA_CLIENT_ID         [string]\n      --clientSecret          OpenFGA Client Secret. env var=OPENFGA_CLIENT_SECRET [string]\n      --apiTokenIssuer          OpenFGA API Token Issuer. env var=OPENFGA_API_TOKEN_ISSUER [string]\n      --apiAudience          OpenFGA API Audience. env var=OPENFGA_API_AUDIENCE [string]\n      --apiToken          OpenFGA API Token. env var=OPENFGA_API_TOKEN [string]\n      --authorizationModelId  Authorization Model ID. env var=OPENFGA_AUTHORIZATION_MODEL_ID\n                              [string] [default: \"latest\"]\n                              \n      --user                  User. env var=OPENFGA_USER                             [string] [required]\n      --relation              Relation. env var=OPENFGA_RELATION                     [string] [required]\n      --object                Object. env var=OPENFGA_OBJECT                         [string] [required]\n                                          \n  openfga-cli-node deploy [configDir]        Deploy Authorization Model\n      Options:\n      --help                  Show help                                                [boolean]\n      --storeId               OpenFGA Store ID. env var=OPENFGA_STORE_ID           [string] [required]\n      --environment           Known Environment. env var=OPENFGA_ENVIRONMENT     [string] [choices: \"us\", \"staging\", \"playground\", \"custom\"] [default: \"custom\"]\n      --apiScheme             API Scheme. env var=OPENFGA_API_SCHEME [string]\n      --apiHost               API Host. env var=OPENFGA_API_HOST [string]\n      --clientId              OpenFGA Client Id. env var=OPENFGA_CLIENT_ID         [string]\n      --clientSecret          OpenFGA Client Secret. env var=OPENFGA_CLIENT_SECRET [string]\n      --apiTokenIssuer          OpenFGA API Token Issuer. env var=OPENFGA_API_TOKEN_ISSUER [string]\n      --apiAudience          OpenFGA API Audience. env var=OPENFGA_API_AUDIENCE [string]\n      --apiToken          OpenFGA API Token. env var=OPENFGA_API_TOKEN [string]\n      --configDir              Directory containing the configuration files. It must contain: authorization-model.json, tuples.json and assertions.json. env var=OPENFGA_CONFIG_DIR\n                              [string] [required]\n    \n      --overwriteTuples       WARNING: If set, will overwrite all existing tuples in the store. env var=OPENFGA_OVERWRITE_TUPLES\n                              [boolean] [default: false]\n                             \n      --overwriteAssertions   WARNING: If set, will overwrite all existing assertions in the store. env var=OPENFGA_OVERWRITE_ASSERTIONS\n                              [boolean] [default: false]\n                                                      \n  openfga-cli-node tuple [storeId]  Interact with relationship tuples in the system\n      Options:\n      --help                  Show help                                                [boolean]\n      --storeId               OpenFGA Store ID. env var=OPENFGA_STORE_ID           [string] [required]\n      --environment           Known Environment. env var=OPENFGA_ENVIRONMENT     [string] [choices: \"us\", \"staging\", \"playground\", \"custom\"] [default: \"custom\"]\n      --apiScheme             API Scheme. env var=OPENFGA_API_SCHEME [string]\n      --apiHost               API Host. env var=OPENFGA_API_HOST [string]\n      --clientId              OpenFGA Client Id. env var=OPENFGA_CLIENT_ID         [string]\n      --clientSecret          OpenFGA Client Secret. env var=OPENFGA_CLIENT_SECRET [string]\n      --apiTokenIssuer          OpenFGA API Token Issuer. env var=OPENFGA_API_TOKEN_ISSUER [string]\n      --apiAudience          OpenFGA API Audience. env var=OPENFGA_API_AUDIENCE [string]\n      --apiToken          OpenFGA API Token. env var=OPENFGA_API_TOKEN [string]\n      \n      write Create a new relationship tuple in the system\n      Options:\n      --user                  User. env var=OPENFGA_USER                             [string] [required]\n      --relation              Relation. env var=OPENFGA_RELATION                     [string] [required]\n      --object                Object. env var=OPENFGA_OBJECT                         [string] [required]\n      \n      delete Delete an existing relationship tuple in the system\n      Options:\n      --user                  User. env var=OPENFGA_USER                             [string] [required]\n      --relation              Relation. env var=OPENFGA_RELATION                     [string] [required]\n      --object                Object. env var=OPENFGA_OBJECT                         [string] [required]\n      \n  openfga-cli-node run-tests [configDir]     Runs tests against the provided directory\n      Options:\n      --help                  Show help                                                [boolean]\n      --storeId               OpenFGA Store ID. env var=OPENFGA_STORE_ID           [string] [required]\n      --environment           Known Environment. env var=OPENFGA_ENVIRONMENT     [string] [choices: \"us\", \"staging\", \"playground\", \"custom\"] [default: \"custom\"]\n      --apiScheme             API Scheme. env var=OPENFGA_API_SCHEME [string]\n      --apiHost               API Host. env var=OPENFGA_API_HOST [string]\n      --clientId              OpenFGA Client Id. env var=OPENFGA_CLIENT_ID         [string]\n      --clientSecret          OpenFGA Client Secret. env var=OPENFGA_CLIENT_SECRET [string]\n      --apiTokenIssuer          OpenFGA API Token Issuer. env var=OPENFGA_API_TOKEN_ISSUER [string]\n      --apiAudience          OpenFGA API Audience. env var=OPENFGA_API_AUDIENCE [string]\n      --apiToken          OpenFGA API Token. env var=OPENFGA_API_TOKEN [string]\n      --configDir              Directory containing the configuration files. It must contain: authorization-model.json, tuples.json and assertions.json. env var=OPENFGA_CONFIG_DIR\n                              [string] [required]\n      --keepState             Whether to keep the tuples after test run.  Otherwise, tuples will be cleared if all tests pass.\n                              [boolean] [default: false]\n                              \n  openfga-cli-node store-config [storeId]    Interact with store configuration\n      Options:\n      --help                  Show help                                                [boolean]\n      --storeId               OpenFGA Store ID. env var=OPENFGA_STORE_ID           [string] [required]\n      --environment           Known Environment. env var=OPENFGA_ENVIRONMENT     [string] [choices: \"us\", \"staging\", \"playground\", \"custom\"] [default: \"custom\"]\n      --apiScheme             API Scheme. env var=OPENFGA_API_SCHEME [string]\n      --apiHost               API Host. env var=OPENFGA_API_HOST [string]\n      --clientId              OpenFGA Client Id. env var=OPENFGA_CLIENT_ID         [string]\n      --clientSecret          OpenFGA Client Secret. env var=OPENFGA_CLIENT_SECRET [string]\n      --apiTokenIssuer          OpenFGA API Token Issuer. env var=OPENFGA_API_TOKEN_ISSUER [string]\n      --apiAudience          OpenFGA API Audience. env var=OPENFGA_API_AUDIENCE [string]\n      --apiToken          OpenFGA API Token. env var=OPENFGA_API_TOKEN [string]\n      \n      export Export an authorization model\n          Options:\n          --configDir          Directory containing the configuration files. It must contain: authorization-model.json, tuples.json and assertions.json. env var=OPENFGA_CONFIG_DIR              [string] [required]\n          --outputFormat      Choice of format to export the configuration as. env var=OPENFGA_OUTPUT_FORMAT\n                                 [string] [choices: \"json\", \"yaml\", \"yml\", \"scl\", \"dsl\", \"ofga\", \"openfga\"] [default: \"json\"]\n          --includeTuples     Whether to also export tuples. env var=OPENFGA_INCLUDE_TUPLES\n                                 [boolean] [default: true]\n          --includeAssertions Whether to also export assertions. env var=OPENFGA_INCLUDE_ASSERTIONS\n                             [boolean] [default: true]\n\n      version List, show and diff authorization model versions\n\n        diff [configVersionIdA] [configVersionIdB] Diff between two configuration versions\n\n        list Prints the list of authorization model ids in chronological order (latest last)\n\n        show [authorizationModelId] Prints the authorization at a particular id\n\n      migrate Migrate a store to another\n         Options:\n         --includeTuples      Whether to also migrate tuples. env var=OPENFGA_INCLUDE_TUPLES          [boolean] [default: true]\n          --includeAssertions  Whether to also migrate assertions. env var=OPENFGA_INCLUDE_ASSERTIONS [boolean] [default: true]\n          --toStoreId          OpenFGA Store ID. env var=OPENFGA_TO_STORE_ID [string]\n          --toEnvironment      Known Environment. Defaults to \"custom\". env var=OPENFGA_TO_ENVIRONMENT\n               [string] [choices: \"us\", \"staging\", \"playground\", \"custom\"] [default: \"custom\"]\n          --toClientId         OpenFGA Client ID. env var=OPENFGA_TO_CLIENT_ID                      [string]\n          --toClientSecret     OpenFGA Client Secret. env var=OPENFGA_TO_CLIENT_SECRET              [string]\n\n\n  openfga-cli-node transform \u003cinputFile\u003e     Transform between OpenFGA JSON API and DSL\n      Options:\n      --help                  Show help                                               [boolean]\n      --inputFile             Configuration file. It must be in dsl, yaml or json syntax. env var=OPENFGA_INPUT_FILE\n                              [string]\n\n  openfga-cli-node completion                generate completion script\n\nOptions:\n  --version  Show version number                                       [boolean]\n  --help     Show help                                                 [boolean]\n\n```\n\n## Authors\n\n[@rhamzeh](https://github.com/rhamzeh)\n[@adriantam](https://github.com/adriantam)\n\n## License\n\nThis project is licensed under the Apache-2.0 license. See the [LICENSE](https://github.com/rhamzeh/openfga-cli/blob/main/LICENSE) file for more info.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frhamzeh%2Fopenfga-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frhamzeh%2Fopenfga-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frhamzeh%2Fopenfga-cli/lists"}