- Node.js
- Go
- .NET
- Python
- Java
- CLI
You can find the Node.js package on npm at: @openfga/sdk.Using npm:Using yarn:
npm install @openfga/sdk
yarn add @openfga/sdk
You can find the Go package on GitHub at: @openfga/go-sdk.To install:In your code, import the module and use it:You can then runto update
go get -u github.com/openfga/go-sdk
import (
. "github.com/openfga/go-sdk/client"
)
func main() {
fgaClient, err := NewSdkClient(&ClientConfiguration{
// ... setup the sdk
})
if err != nil {
// .. Handle error
}
}
go mod tidy
go.mod and go.sum if you are using them.The OpenFGA .NET SDK is available on NuGet.You can install it using:
- The dotnet CLI:
dotnet add package OpenFGA.Sdk
- The Package Manager Console inside Visual Studio:
Install-Package OpenFGA.Sdk
- Visual Studio, Visual Studio for Mac and IntelliJ Rider: Search for and install
OpenFGA.Sdkin each of their respective package manager UIs.
The OpenFGA Python SDK is available on PyPI.To install:In your code, import the module and use it:
pip3 install openfga_sdk
import openfga_sdk
You can find the Java package on Maven Central. The API reference examples were reviewed with version Using Gradle:
0.10.0.Using Maven:<dependency>
<groupId>dev.openfga</groupId>
<artifactId>openfga-sdk</artifactId>
<version>0.10.0</version>
</dependency>
implementation 'dev.openfga:openfga-sdk:0.10.0'
The OpenFGA CLI is available on GitHub.To install:Fedora:Alpine Linux:
Brew
brew install openfga/tap/fga
Linux (deb, rpm and apk) packages
Download the .deb, .rpm or .apk packages from the releases page.Debian:sudo apt install ./fga_<version>_linux_<arch>.deb
sudo dnf install ./fga_<version>_linux_<arch>.rpm
sudo apk add --allow-untrusted ./fga_<version>_linux_<arch>.apk
Docker
docker pull openfga/cli; docker run -it openfga/cli
Go
go install github.com/openfga/cli/cmd/fga@latest