All apps/OpenFGA CLI

OpenFGA CLI

openfga

Cross-platform CLI for interacting with an OpenFGA server.

Runs as fga|macOS, Linux|github.com

Command form

ai-draft · 2 tasks · 7 fields

Check relationships and validate authorization models. Server credentials come from ~/.fga.yaml or FGA_* environment variables and are not part of these forms.

Opens the form; the finished command lands at your prompt, unrun
otty gui openfga

fga query check

Check a relationship

Ask whether a user has a relation to an object. Contextual tuples and condition context are left out.

Check a relationshipExample values, fixed in this page — nothing here reaches a terminal
Basic
Store ID*
string
User*
string
Relation*
string
Object*
string
Authorization model ID
string
TasksEach one presets the form for one job
Check
store_idmodel_iduserrelationobject
ParametersOnly these flags are editable in the form
Store ID
string
--store-id
Authorization model ID
string
--model-id
User
For example user:anne.
string · positional 0
Relation
string · positional 1
Object
For example document:roadmap.
string · positional 2

fga model validate

Validate a model

Validate an authorization model file without a server.

Validate a modelExample values, fixed in this page — nothing here reaches a terminal
Basic
Model file*
file
Input format
3 choicesenum
TasksEach one presets the form for one job
Validate
fileformat
ParametersOnly these flags are editable in the form
Model file
path
--file
Input format
enum
--formatfgajsonmodular
SourcesEvery flag above is checked against these
readme
fga query **check** <user> <relation> <object> [--condition] [--contextual-tuple "\<user\> \<relation\> \<object\>"]* --store-id=<store-id> [--model-id=<model-id>] * `--store-id`: Specifies the store id * `--model-id`: Specifies the model id to target (optional)
manual

github.com

readme
* `--file`: File containing the authorization model. * `--format`: Authorization model input format. Can be "fga", "json", or "modular". Defaults to the file extension if provided (optional)
manual

github.com

Before it fills your prompt, Otty checks the installed fga against its version. A form that does not match your version is not offered.