Releases: vsekhar/decide
Release list
decide 0.4.1
--api-key - reads the API key from standard input, so the key stays out of your shell history and out of ps. At a terminal, decide prompts with API key: and turns echo off while you type. From a pipe it reads one line with no prompt. A bare --api-key with no value does the same. Both the run line and --set-config take it, so setup is now:
brew install vsekhar/tap/decide
decide --set-config --model typesafe:jev-latest --api-key -A script pipes it: printf '%s' "$KEY" | decide --set-config --api-key -.
- An empty key, end of file, or standard input that does not read exits 10 and writes no config.
-still reads standard input once per run:--api-key -beside--context -or--questions -is refused.- Ctrl-C at the prompt puts the terminal back before the process ends.
--help, the README's setup and command line configuration sections, and TESTING.md describe the flag.
decide 0.4.0
Two new flags, and the README's Streaming example now runs as written.
--context-json: a context whose value is parsed as JSON, so the model sees its structure: objects, arrays, numbers, and booleans, not one string. It takes every form--contexttakes:<json>,@<path>, and-, each with<name>=in front. A value that is not valid JSON exits 10 before any model call. Compact JSON with an=inside a string, such as a URL with a query or a base64 field, parses.--each: decide once per line of standard input. Each line is one event, and the-context holds it; the questions run once per event, in order. With--json, every event prints exactly one line: its answers, its fallbacks, or an error record. An unsure event, a remote error, a line that is not valid JSON or UTF-8, and a context too large for the model are per event, and the final code is the highest code any event produced. Lines are read as they arrive, so a live producer such astail -fworks.
decide 0.3.0
Question files, named questions, and richer plain output.
Question files
--questions @filereads questions from a file, in the flag's place. It repeats and mixes with questions on the line.- A text file mimics the command line: shell-like quoting and
#comments. It holds questions and their flags only. - A JSON file (one that starts with
{) names questions, describes options and levels withsummary,not_for,examples, andsignals, and gives structured instructions withrules. A fault names the file and the JSON path.
Questions and output
--namenames a question. A named question prints asname=answer, and the name is its key in--json.--jsonprints one JSON object keyed by question, with each answer's kind, confidence, and probabilities.--statsadds a question's confidence, probability, and a rating's score to its line.--distributionadds every option, level, or side with its probability. Fields are tab-separated, values in a field space-separated.- Several
--context name=...flags compose one JSON object the questions can refer to by name. --modeland--api-keyon the command line win over every setting for one run.
decide 0.2.0
What's new
--contextis optional. A question that carries its own facts runs with no context:decide "Is Atlanta the capital of Georgia?"printsyes.- Config files.
decidereads.decide/configfrom the working directory and each parent up to your home directory, then~/.config/decide/configand~/.decide/config. Files holdKEY = "value"lines forDECIDE_MODELandDECIDE_MODEL_API_KEY, a subset of TOML. The nearest file wins per key, and the environment wins over every file.DECIDE_MODEL_API_KEYmay appear only in the home files, so a key never lands in a repository. Any problem in a file exits 10 with a message naming the file and line. --set-config.decide --set-config --model typesafe:jev-latest --api-key <key>writes those settings to~/.config/decide/config, changing only those lines and keeping the rest of the file, comments included.--projectwrites./.decide/configinstead.- Built on DecisionModels 0.3.0.
Install
brew install vsekhar/tap/decidedecide 0.1.2
Adds --version, which prints the version and exits, and shows the version at the top of --help. Install with brew install vsekhar/tap/decide.
decide 0.1.1
Bugfix release. DecisionModels 0.2.2 drops the SwiftUI macro that needed Xcode, so the Command Line Tools now build decide. Install with brew install vsekhar/tap/decide.
decide 0.1.0
First release. Install with brew install vsekhar/tap/decide.