{"id":28403873,"url":"https://github.com/openfga/vscode-ext","last_synced_at":"2025-06-27T08:30:46.651Z","repository":{"id":185636309,"uuid":"652644101","full_name":"openfga/vscode-ext","owner":"openfga","description":"An OpenFGA extension for VS Code","archived":false,"fork":false,"pushed_at":"2025-05-19T19:32:47.000Z","size":3846,"stargazers_count":18,"open_issues_count":21,"forks_count":4,"subscribers_count":18,"default_branch":"main","last_synced_at":"2025-06-02T04:18:04.805Z","etag":null,"topics":["fga","hacktoberfest","openfga"],"latest_commit_sha":null,"homepage":"https://openfga.dev","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/openfga.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,"zenodo":null}},"created_at":"2023-06-12T13:52:45.000Z","updated_at":"2025-05-08T09:29:38.000Z","dependencies_parsed_at":"2023-09-22T06:06:58.228Z","dependency_job_id":"e02c4d1e-050c-4d63-aaa6-eb1e2f0d47fe","html_url":"https://github.com/openfga/vscode-ext","commit_stats":null,"previous_names":["openfga/vscode-ext"],"tags_count":26,"template":false,"template_full_name":null,"purl":"pkg:github/openfga/vscode-ext","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openfga%2Fvscode-ext","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openfga%2Fvscode-ext/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openfga%2Fvscode-ext/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openfga%2Fvscode-ext/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openfga","download_url":"https://codeload.github.com/openfga/vscode-ext/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openfga%2Fvscode-ext/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262222114,"owners_count":23277362,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["fga","hacktoberfest","openfga"],"created_at":"2025-06-01T19:11:06.204Z","updated_at":"2025-06-27T08:30:46.630Z","avatar_url":"https://github.com/openfga.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OpenFGA Extension for VS Code\n\nVS Code extension that provides syntax highlighting for the [OpenFGA](https://openfga.dev/) [language for authorization models](https://openfga.dev/docs/configuration-language).\n\n[![Visual Studio Marketplace](https://img.shields.io/visual-studio-marketplace/v/openfga.openfga-vscode)](https://marketplace.visualstudio.com/items?itemName=openfga.openfga-vscode)\n[![Open VSX Version](https://img.shields.io/open-vsx/v/OpenFGA/openfga-vscode)](https://open-vsx.org/extension/OpenFGA/openfga-vscode)\n[![Release](https://img.shields.io/github/v/release/openfga/vscode-ext?sort=semver\u0026color=green)](https://github.com/openfga/vscode-ext/releases)\n[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://github.com/openfga/vscode-ext/blob/main/LICENSE)\n[![Join our community](https://img.shields.io/badge/slack-cncf_%23openfga-40abb8.svg?logo=slack)](https://openfga.dev/community)\n[![Twitter](https://img.shields.io/twitter/follow/openfga?color=%23179CF0\u0026logo=twitter\u0026style=flat-square \"@openfga on Twitter\")](https://twitter.com/openfga)\n\n## About\n\n[OpenFGA](https://openfga.dev) is an open source Fine-Grained Authorization solution inspired by [Google's Zanzibar paper](https://research.google/pubs/pub48190/). It was created by the FGA team at [Auth0](https://auth0.com) based on [Auth0 Fine-Grained Authorization (FGA)](https://fga.dev), available under [a permissive license (Apache-2)](https://github.com/openfga/rfcs/blob/main/LICENSE) and welcomes community contributions.\n\nOpenFGA is designed to make it easy for application builders to model their permission layer, and to add and integrate fine-grained authorization into their applications. OpenFGA’s design is optimized for reliability and low latency at a high scale.\n\n## Resources\n\n- [OpenFGA Documentation](https://openfga.dev/docs)\n- [OpenFGA API Documentation](https://openfga.dev/api/service)\n- [OpenFGA on Twitter](https://twitter.com/openfga)\n- [OpenFGA Community](https://openfga.dev/community)\n- [Zanzibar Academy](https://zanzibar.academy)\n- [Google's Zanzibar Paper (2019)](https://research.google/pubs/pub48190/)\n\n## Installation\n\nYou can install the OpenFGA VS Code plugin from:\n\n- [OpenFGA on the VS Code marketplace](https://marketplace.visualstudio.com/items?itemName=openfga.openfga-vscode)\n- [OpenFGA on the OpenVSX Registry](https://open-vsx.org/extension/OpenFGA/openfga-vscode)\n- [The VSIX releases on GitHub](https://github.com/openfga/vscode-ext/releases) for manual installation\n\n  ![Installing from VSIX file](resources/vsix-install.png)\n\n## Usage\n\nThe extension currently offers 4 core features, with more to come.\n\n- Syntax Highlighting for OpenFGA files\n- A unique theme for OpenFGA for VS Code\n  - Once installed, go to your extensions\n  - Click on `OpenFGA` and click `Set Color Scheme`\n  - Click on `OpenFGA Dark` in the prompt\n\n![Prompt to set OpenFGA Dark color scheme](resources/set-color-scheme.png)\n\n- A command to transform `.fga` OpenFGA files to `JSON`\n  - Open a `.fga` OpenFGA file in the editor\n  - Open the `Command Pallette` using Ctrl+Shift+P (Windows) or Command+Shift+P (OSX)\n  - Select `OpenFGA: Transform DSL to JSON`\n  - A new tab will open with the transformed code\n\n![Prompt to execute OpenFGA: Transform DSL to JSON command](resources/transform-command-select.png)\n\n- Validation of OpenFGA's `.fga` files\n  - As you type in a `.fga` OpenFGA file in the editor, the extension will highlight errors that make your models invalid\n\n![Errors being highlighted with validation](resources/validation_example.gif)\n\n## Workflow to use it with the FGA CLI\n\nThe extension works great when combined with the [FGA CLI](https://github.com/openfga/cli) to iterate on your model and test it.\n\nIn order to do that:\n1- Create a working directory to house the files for your store\n2- Inside this directory, create a `model.fga` file with your model\n3- Alongside the `model.fga`, create a `store.yaml` file with the following syntax\n\n```yaml\n---\nname: Store Name # store name, optional\nmodel_file: ./model.fga # a global model that would apply to all tests\ntuples: # global tuples that would apply to all tests, optional\n  - user: folder:1\n    relation: parent\n    object: folder:2\n  - user: user:anne\n    relation: editor\n    object: folder:1\ntests: # required\n  - name: test-1\n    description: testing that the model works # optional\n    tuples: # tuples that only apply within the scope of this test\n      - user: user:beth\n        relation: viewer\n        object: folder:2\n    check: # a set of checks to run\n      - user: user:anne\n        object: folder:1\n        assertions:\n          # a set of expected results for each relation\n          can_view: true\n          can_write: true\n          can_share: false\n      - user: user:beth\n        object: folder:2\n        assertions:\n          # a set of expected results for each relation\n          can_view: true\n          can_write: false\n          can_share: false\n    list_objects: # a set of list objects to run\n      - user: user:anne\n        type: folder\n        assertions:\n          # a set of expected results for each relation\n          can_view:\n            - folder:1\n            - folder:2\n          can_write:\n            - folder:1\n            - folder:2\n          can_share: []\n      - user: user:beth\n        type: folder\n        assertions:\n          # a set of expected results for each relation\n          can_view:\n            - folder:2\n          can_write: []\n          can_share: []\n```\n\nWhen ready to test, from the terminal, and while inside your working directory, run:\n\n```shell\nfga model test --tests=./store.yaml\n```\n\n## Roadmap\n\nA rough [roadmap](https://github.com/orgs/openfga/projects/1) for development priorities.\n\n## Contributing\n\nSee the [DEVELOPMENT](./docs/DEVELOPMENT.md) and [CONTRIBUTING](https://github.com/openfga/.github/blob/main/CONTRIBUTING.md).\n\n## Author\n\n[OpenFGA](https://github.com/openfga)\n\n## Acknowledgments\n\n- CEL Textmate Grammar was taken from [vscode-cel](https://github.com/hmarr/vscode-cel)\n- Range conversion from `yaml` to `vscode` from [actions/languageservices](https://github.com/actions/languageservices/blob/4280a967a8aa058dd3c8825349b90bc932d82283/workflow-parser/src/workflows/yaml-object-reader.ts#L220)\n\n## License\n\nThis project is licensed under the Apache-2.0 license. See the [LICENSE](https://github.com/openfga/vscode-ext/blob/main/LICENSE) file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenfga%2Fvscode-ext","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenfga%2Fvscode-ext","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenfga%2Fvscode-ext/lists"}