Skip to content

Commit

Permalink
feat: add evaluate cli doc (#175)
Browse files Browse the repository at this point in the history
  • Loading branch information
markphelps authored Jan 23, 2024
1 parent e649aa0 commit f82dc2c
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
30 changes: 30 additions & 0 deletions cli/commands/evaluate.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
title: "evaluate"
description: "Evaluate a flag with Flipt."
---

```
flipt evaluate [flagKey] [flags]
```

### Options

```
-a, --address string address of Flipt instance. (default "http://localhost:8080")
-c, --context stringArray evaluation request context as key=value.
-e, --entity-id string evaluation request entity id. (default "${uuid}")
-h, --help help for evaluate
-i, --interval duration interval between requests in watch mode. (default 1s)
-n, --namespace string flag namespace. (default "default")
-r, --request-id string evaluation request id.
-t, --token string client token used to authenticate access to Flipt instance.
-w, --watch enable watch mode.
```

### Examples

```
$ flipt evaluate chat-enabled --context test=foo
{"flag_key":"chat-enabled","enabled":true,"reason":"DEFAULT_EVALUATION_REASON","request_id":"73d12ea1-65d7-401d-b0c7-f7a6b3d41dd6","request_duration_millis":0.894792,"timestamp":"2024-01-23T17:37:13.484716964Z"}
```
1 change: 1 addition & 0 deletions mint.json
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@
"cli/commands/bundle/push"
]
},
"cli/commands/evaluate",
"cli/commands/export",
"cli/commands/import",
"cli/commands/migrate",
Expand Down

0 comments on commit f82dc2c

Please sign in to comment.