From 95b2898657f217c97efd5602bea09fd2b069e0c3 Mon Sep 17 00:00:00 2001 From: Mark Phelps <209477+markphelps@users.noreply.github.com> Date: Tue, 23 Jan 2024 12:40:28 -0500 Subject: [PATCH] feat: add evaluate cli doc --- cli/commands/evaluate.mdx | 30 ++++++++++++++++++++++++++++++ mint.json | 1 + 2 files changed, 31 insertions(+) create mode 100644 cli/commands/evaluate.mdx diff --git a/cli/commands/evaluate.mdx b/cli/commands/evaluate.mdx new file mode 100644 index 0000000..1845887 --- /dev/null +++ b/cli/commands/evaluate.mdx @@ -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"} +``` diff --git a/mint.json b/mint.json index 14c9842..dedf204 100644 --- a/mint.json +++ b/mint.json @@ -163,6 +163,7 @@ "cli/commands/bundle/push" ] }, + "cli/commands/evaluate", "cli/commands/export", "cli/commands/import", "cli/commands/migrate",