Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add evaluate cli doc #175

Merged
merged 1 commit into from
Jan 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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