ThinkThen answers typed questions about text. Ask from a shell script or from your own program, and get back true, false, a label, or a number. A failed call never looks like an answer. Use it to gate a script, label records, or grade answers in an eval.
thinkthen decide 'Does the customer ask for money back?' < message.txttrue
The exit code is 0 for yes, 1 for no, and 3 for not sure. A shell if can branch on it. How-to 01 runs this question against a recorded answer.
curl -fsSL https://thinkthen.dev/install.sh | shOn a Mac, Homebrew works too:
brew install botassembly/thinkthen/thinkthenWith Rust installed, cargo install thinkthen builds the command from crates.io.
A live run needs a backend. A hosted backend needs a key. Backends shows how to get a TypeSafe key or point ThinkThen at another server, such as Ollama on your own machine.
Download the release's sample, then replay its recorded answer with no key and no network:
curl -fsSL https://github.com/botassembly/thinkthen/releases/latest/download/thinkthen-first-run.tar.gz | tar -xz && cd thinkthen-first-run
thinkthen decide 'Does this report say what the person did before the problem appeared?' \
--replay recording < report.txttrue
How-to 27 shows how a test uses a recording.
| Function | It answers |
|---|---|
decide |
yes, no, or not sure |
choose |
the one option that fits best |
tag |
every label that applies |
score |
a number on a scale |
filter |
the records that pass a yes/no question |
rank |
the records, best first |
find |
the one unit of text that answers the question, or nothing |
annotate |
a saved set of named questions for each record |
recognize |
the names in a text and what kind each is |
relate |
the relations between named things |
The specification gives each function's contract, its exit codes, and its failures.
Every language uses the same Rust engine. Each page below gives the install line and a first call.
| Kind | Install pages |
|---|---|
| Command line | Bash |
| Libraries | Python, pandas, Polars, TypeScript, Ruby, R, Rust, C, C++, C#, Go, Java, Kotlin, Scala, Swift, Zig, PHP, Dart, Ada, Objective-C, COBOL |
| Databases | DuckDB, SQLite, PostgreSQL |
Each folder under libraries/ and databases/ has a README that builds that binding from source.
On 2026-10-01 a call to Jev took a median of 138 ms. ThinkThen's own work took about 2 ms of it. Each binding added a median of 3 ms or less, and the slowest single function added 6.7 ms. Overhead gives every measurement and its spread.
- Build a triage pipeline that drafts, blocks, or asks a person
- Gate a script step on a yes/no answer
- Branch on a label with
chooseandcase - Lint a change by meaning and fail the build
- Grade an assistant's answers with a rubric
All how-tos lists every page. Each green one is a real shell job that the gate runs.
By default ThinkThen sends your question and text to TypeSafe. Backends links TypeSafe's terms. Read them before you send sensitive text.
CONTRIBUTING.md explains how to build from a checkout, run the gate, and record work. It also defines the four names this repository uses. No gate touches the network.
MIT. LICENSE holds the text.