Installation
Choose the command for shell scripts, a language package for your program, or an extension for your database. The language packages and database archives include their matching engine; you do not install the command first.
Choose your installation
Section titled “Choose your installation”| Use ThinkThen from | Get it from | Installation and first call |
|---|---|---|
| The command | One-line installer, Homebrew, Cargo or a release archive | Command installation |
| Python | thinkthen on PyPI, with pandas and Polars accessors | Python guide |
| pandas | The Python package with its pandas extra | pandas guide |
| Polars | The Python package with its Polars extra | Polars guide |
| TypeScript or JavaScript | thinkthen on npm | TypeScript guide |
| Go | github.com/botassembly/thinkthen/sdk/go/thinkthen | Go guide |
| Java | io.github.botassembly:thinkthen-java on Maven Central | Java guide |
| Kotlin | io.github.botassembly:thinkthen-kotlin on Maven Central | Kotlin guide |
| C# | Botassembly.ThinkThen on NuGet | C# guide |
| R | thinkthen on R-universe | R guide |
| Ruby | thinkthen gem on RubyGems | Ruby guide |
| Rust | thinkthen on crates.io | Rust guide |
| Swift | Swift package from GitHub | Swift guide |
| C | the C archive from the release | C guide |
| C++ | the C++ and C archives from the release | C++ guide |
| Zig | the Zig archive from the release | Zig guide |
| DuckDB | The DuckDB release archive | DuckDB guide |
| SQLite | The SQLite release archive | SQLite guide |
| PostgreSQL | The PostgreSQL release archive | PostgreSQL guide |
Go and Swift resolve a versioned source dependency. Use the version in their guides rather than a moving branch. Swift Package Manager works without a Swift Package Index listing.
Native libraries and database downloads
Section titled “Native libraries and database downloads”The release files include the C, C++, Zig and database archives. Choose the archive for the machine that will run your program or database. C, C++, Zig, DuckDB and SQLite archives are supplied for Linux x86-64, Linux arm64, macOS on Apple silicon and Windows x86-64. Follow each guide's compiler and runtime requirements.
These are the Linux x86-64 downloads; choose the corresponding platform file on the release page for another machine:
| Archive | Download |
|---|---|
| C | C archive |
| C++ | C++ archive, together with the C archive above |
| Zig | Zig archive |
| DuckDB | DuckDB archive |
| SQLite | SQLite archive |
| PostgreSQL | PostgreSQL archive |
Download SHA256SUMS too. Check the archive and verify its origin before loading or linking it. Substitute your archive's file name in the checksum commands below.
- DuckDB: use DuckDB 2.0.0 and allow unsigned extensions. Load the verified extension by its absolute path. ThinkThen is not in DuckDB's community repository;
INSTALL thinkthen FROM communitydoes not install it. - SQLite: use SQLite 3.41.0 or later with extension loading enabled. Load the library once per connection with
.loadin the shell or your application's extension-loading API. - PostgreSQL: use PostgreSQL 18 on Linux x86-64 or arm64 with glibc 2.28 or later. Copy the library and extension files into PostgreSQL's directories, set the key in the server environment, then create the extension in each database. The guide gives the administrator commands. Install from the release archive; PGXN is not a distribution route for this release.
The command installation steps follow. After installation, set your key as the quickstart or your language's guide shows.
Install with one line
Section titled “Install with one line”On macOS or Linux:
curl -fsSL https://thinkthen.dev/install.sh | shIn Windows PowerShell:
irm https://thinkthen.dev/install.ps1 | iexThe installer downloads the newest release, checks its checksum, and puts thinkthen in .local/bin in your home folder. It adds that folder to your PATH for new terminals, and prints the line to run in the current one.
To install somewhere else, set THINKTHEN_INSTALL_DIR to the folder first. To leave your shell profile alone, set THINKTHEN_NO_MODIFY_PATH=1.
Check that it runs
Section titled “Check that it runs”Open a new terminal and run:
thinkthen --versionOutput
thinkthen 0.2.0
If the shell answers command not found, the folder that holds thinkthen isn't on your PATH. Run the line the installer printed, or open a new terminal.
ThinkThen runs on macOS 15 on Apple silicon, on Linux x86-64 and arm64 with glibc 2.28 or later, and on Windows x86-64; tested on Windows Server 2022.
Set Windows PowerShell to UTF-8
Section titled “Set Windows PowerShell to UTF-8”Windows PowerShell 5.1 sends piped text as ASCII, so it turns each accented or non-Latin character into ? before ThinkThen reads it. 漢字 café arrives as ?? caf?. ThinkThen can't tell, so it answers the changed text, and you pay for that question. PowerShell also garbles such text when it reads the output of ThinkThen into a variable or another command.
Run this line in each session before you pipe text, or add it to your $PROFILE:
$OutputEncoding = [Console]::OutputEncoding = [Text.UTF8Encoding]::new()Install with Homebrew
Section titled “Install with Homebrew”On macOS on Apple silicon, or on Linux:
brew install botassembly/thinkthen/thinkthenHomebrew also installs the manual page.
Install with Cargo
Section titled “Install with Cargo”With Rust 1.95.0 or later, on any platform:
cargo install thinkthen --version 0.2.0Cargo builds the command from source and puts it in ~/.cargo/bin.
Download a release file
Section titled “Download a release file”The 0.2.0 release holds one file for each platform, and a SHA256SUMS file to check them with:
thinkthen-0.2.0-linux-x86_64.tar.gzthinkthen-0.2.0-linux-arm64.tar.gzthinkthen-0.2.0-macos-arm64.tar.gzthinkthen-0.2.0-windows-x86_64.zip
Each file holds the command, its manual page thinkthen.1, and its licenses. The command isn't signed, so check the download before you run it.
These steps download the x86-64 file, check it, unpack it, and put thinkthen on your PATH for this shell. On arm64, write arm64 in place of x86_64.
v=0.2.0url=https://github.com/botassembly/thinkthenurl=$url/releases/download/v$vfile=thinkthen-$v-linux-x86_64.tar.gzcurl -fsSLO "$url/$file"curl -fsSLO "$url/SHA256SUMS"sha256sum --check --ignore-missing SHA256SUMSmkdir "thinkthen-$v"tar -xzf "$file" -C "thinkthen-$v"export PATH="$PWD/thinkthen-$v:$PATH"The check prints the file name and OK. Anything else means the download is damaged or altered, so download it again. To find thinkthen in new shells, add its folder to PATH in your shell profile.
In Terminal:
v=0.2.0url=https://github.com/botassembly/thinkthenurl=$url/releases/download/v$vfile=thinkthen-$v-macos-arm64.tar.gzcurl -fsSLO "$url/$file"curl -fsSLO "$url/SHA256SUMS"grep " $file\$" SHA256SUMS | shasum -a 256 --checkmkdir "thinkthen-$v"tar -xzf "$file" -C "thinkthen-$v"export PATH="$PWD/thinkthen-$v:$PATH"The check prints the file name and OK. If macOS then blocks thinkthen because it isn't signed, clear the download mark from the folder:
xattr -dr com.apple.quarantine "thinkthen-$v"Windows
Section titled “Windows”Download the zip and SHA256SUMS into one folder. In PowerShell, in that folder, check the zip:
$zip = 'thinkthen-0.2.0-windows-x86_64.zip'$sums = Get-Content .\SHA256SUMS$line = $sums | Where-Object { $_.EndsWith(" $zip") }$want = "$line".Split(' ')[0]$got = (Get-FileHash $zip -Algorithm SHA256).Hashif ($want -and $got -eq $want) { 'OK' } else { 'No match' }On No match, download the zip again. On OK, unpack it and put it on your PATH for this session:
Unblock-File $zipExpand-Archive $zip .\thinkthen-0.2.0$env:Path = "$PWD\thinkthen-0.2.0;$env:Path"Unblock-File clears the download mark. Windows policy can still block a command that isn't signed.
Check where a download came from
Section titled “Check where a download came from”A checksum shows a file arrived whole. To check that it also came from the ThinkThen release build, use the GitHub command line tool:
gh attestation verify FILE \ --repo botassembly/thinkthen \ --signer-workflow \botassembly/thinkthen/.github/workflows/release-prepare.ymlWrite the path to your download in place of FILE. Use the file only when the command reports success.
Upgrade
Section titled “Upgrade”Upgrade the same way you installed:
- One-line installer: run it again. It replaces the command with the newest release.
- Homebrew:
brew upgrade thinkthen. - Cargo: run
cargo install thinkthen --versionwith the new version number. - Download: download the new file, check it, and unpack it in place of the old folder.
Uninstall
Section titled “Uninstall”- One-line installer on macOS or Linux: delete
thinkthenandthinkthen.install.jsonfrom~/.local/bin, or from the folder you chose. Then delete the line that ends in# thinkthen PATHfrom your shell profile.thinkthen.install.jsonlists the profiles the installer changed. - One-line installer on Windows: delete
thinkthen.exeandthinkthen.install.jsonfrom.local\binin your home folder, then remove that folder from your userPathin the Environment Variables settings. - Homebrew:
brew uninstall thinkthen. - Cargo:
cargo uninstall thinkthen. - Download: delete the folder you unpacked.
Add shell completions
Section titled “Add shell completions”thinkthen completions SHELL prints a script that lets your shell finish ThinkThen commands when you press Tab. It works for bash, elvish, fish, powershell and zsh. These are the first lines of the bash script:
thinkthen completions bash | sed -n '1,4p'Output
_thinkthen() {
local i cur prev opts cmd
COMPREPLY=()
if [[ "${BASH_VERSINFO[0]}" -ge 4 ]]; then
Save the script where your shell loads it. For bash:
dir=~/.local/share/bash-completion/completionsmkdir -p "$dir"thinkthen completions bash > "$dir/thinkthen"For zsh, save it in a folder on your fpath:
mkdir -p ~/.zfuncthinkthen completions zsh > ~/.zfunc/_thinkthenThen add fpath=(~/.zfunc $fpath) to ~/.zshrc, above the line that runs compinit.
For fish:
dir=~/.config/fish/completionsmkdir -p "$dir"thinkthen completions fish > "$dir/thinkthen.fish"Open a new terminal to use them.
Read the manual page
Section titled “Read the manual page”Homebrew installs the manual page, so man thinkthen works. The download files hold it as thinkthen.1. After the one-line installer or Cargo, write it yourself:
thinkthen man > thinkthen.1man ./thinkthen.1To read it with man thinkthen from any folder, copy thinkthen.1 into a man1 folder on your MANPATH.
Quickstart: set your key and ask your first question.