Install TB 2.0
TB comes as one download with everything inside: the language, all twenty libraries, the example programs and the desktop apps. Every click is explained below.
TB for Windows
tb-windows-x64-setup.exe
All downloads
| File | For | What it is |
|---|---|---|
tb-windows-x64-setup.exe | Windows 10 and 11, 64-bit (recommended) | Installer: Start menu, double-click .tb files, tb on your PATH |
tb-windows-x64.zip | Windows 10 and 11, 64-bit | Portable folder, nothing installed |
tb-macos-arm64.zip | macOS on Apple silicon (M1 and newer) | A tb folder |
tb-linux-x64.tar.gz | Linux, 64-bit Intel or AMD | A tb folder |
tb-python.zip | Any computer with Python 3.10 or newer | tb.py, the standard library, examples and apps |
SHA256SUMS.txt | Checking your download | SHA-256 fingerprints of every file |
Every download has the same folders inside: apps (the desktop apps and security tools), examples and welcome.tb. Rather not install anything? The playground runs TB in your browser.
What's new in 2.0.1
Neutral sample programs and docs; no language changes. The first program is now welcome.tb, a short tour of TB, and the fizz_stars.tb example replaces an older pattern program. Programs written for 2.0.0 run exactly the same.
Why your computer might warn you
When you open TB for the first time, Windows or macOS may say it doesn't recognise the app. That's expected, and here is the honest reason.
Big companies pay every year for a code-signing certificate, a kind of ID card that tells your computer who made a program. TB is a small, independent project, not a company product, so it doesn't have one. Your computer simply hasn't met TB before, so it plays safe and asks you first.
TB itself never phones home and collects nothing. Like any programming language, a TB program can read and write files, use the network (the http, net and intel libraries) and run other programs (os.run), but only when its code says so. So run programs you trust, the same as you would with Python or anything else. TB's own code ships in readable form (tb.py and the tblib folder in tb-python.zip), and the checksums below prove your download is exactly the published file.
Install, step by step
Windows
-
Download the installer and keep it
Download
tb-windows-x64-setup.exe. Because TB is new, your browser might say the file "isn't commonly downloaded".In Microsoft Edge: point at the download, click the …, choose Keep, then Show more and Keep anyway. In Chrome: open the downloads list and click Keep.
Downloads -
Open it: "Windows protected your PC"
Double-click the installer in your Downloads. A blue box appears: Windows SmartScreen being careful with a program it hasn't seen before.
Click More info, then Run anyway.
Windows protected your PC
Microsoft Defender SmartScreen prevented an unrecognised app from starting. Running this app might put your PC at risk.
More info
App: tb-windows-x64-setup.exe
Publisher: Unknown publisher -
Click through the installer
It installs just for you, so it never asks for an administrator password. TB goes into
%LOCALAPPDATA%\Programs\TB, and the installer:- adds
tbto your PATH, so any command window understands it, - lets you double-click a .tb file to run it (right-click, Edit opens it in Notepad),
- adds a TB folder to the Start menu.
On the last page, leave Open the Care check-in app ticked and click Finish to see a TB desktop app straight away.
Setup - TBCompleting the TB Setup Wizard
Setup has finished installing TB on your computer. The programs can be launched from the Start menu.
Open the Care check-in app
- adds
-
Say hello from the TB Prompt
Open the Start menu, go to the TB folder and click TB Prompt. A command window opens with TB ready. Type this and press Enter:
tb --versionIt answers
TB 2.0.1. Trytbon its own to type TB one line at a time (exitto leave), ortb docto list the libraries.TB PromptTB 2.0.1 Type tb FILE.tb to run a program, tb to try TB line by line, tb doc to see the libraries. C:\Users\Alex\Documents>tb --version TB 2.0.1 -
Take the tour
In the Start menu, click TB Examples. It opens TB's folder. Double-click
welcome.tb.A window runs the program and waits with Press Enter to close, so take your time.
welcome.tbHello, Alex! Welcome to TB. This program is a quick tour of the language. … Have fun writing your own programs. Press Enter to close
What's in the Start menu
- TB Prompt: a command window with
tbready. - Care check-in, To-do, Notes, Calculator, Hash checker, Log triage and IOC workbench: the desktop apps, written in TB.
- TB Examples opens the folder with the examples and apps; TB website opens this site.
- Uninstall TB removes everything (so does Settings, Apps).
Writing your own program
Open Notepad and type
say("Hello from me!")Choose File, Save as. Set Save as type to All files and name it
hello.tb.If you leave the type as "Text documents", Notepad quietly names it
hello.tb.txt, and TB won't recognise it.Double-click
hello.tb. To change it later, right-click it and choose Edit.
No installer: the portable zip
Download tb-windows-x64.zip, right-click it, choose Extract All, and you get a tb folder with tb.exe, tbw.exe, an _internal folder (keep it next to the programs), apps, examples and welcome.tb. Nothing is installed. Open a command window in the folder that holds tb and run:
tb\tb.exe tb\welcome.tb
tb\tbw.exe tb\apps\todo\main.tb
tbw.exe is the same TB without a black console window, which is nicer for desktop apps. The first time, SmartScreen asks about tb.exe: More info, Run anyway.
Mac
-
Download and unzip
Download
tb-macos-arm64.zip. Safari unzips it for you; otherwise double-click it in Downloads. You get a folder calledtbwith thetbprogram, an_internalfolder it needs,apps,examplesandwelcome.tb.This version is for Macs with Apple silicon (M1 and newer). On an older Intel Mac, use the Python version.
-
Give it a home
Drag the
tbfolder from Downloads into your home folder (in Finder, Go, Home), so it lives at~/tb. Keep everything inside together:tbonly works next to_internal. -
Tell macOS you trust it (once)
macOS marks every file that came from the internet as "quarantined" and refuses to run unsigned ones. One command lifts that mark from the whole folder. Open Terminal (press ⌘ Space, type "Terminal", press Return), paste this and press Return:
xattr -dr com.apple.quarantine ~/tbIt prints nothing; that means it worked. (If you left the folder in Downloads, use
~/Downloads/tbinstead.)Terminal~ % xattr -dr com.apple.quarantine ~/tb ~ % cd ~/tb tb % ./tb --version TB 2.0.1 -
Run your first program
cd ~/tb./tb welcome.tbThe very first run takes a few seconds while macOS checks the new program. After that, TB starts instantly. A desktop app:
./tb apps/todo/main.tb. -
Optional: type tb from anywhere
Add the folder to your PATH, then open a new Terminal window:
echo 'export PATH="$HOME/tb:$PATH"' >> ~/.zshrcNow
tb hello.tbworks in any folder.
Rather not use Terminal for the trust step?
Double-click tb in Finder, click Done on the warning, then open System Settings, Privacy & Security, scroll down and click Open Anyway. Because TB is a folder of many files, macOS may ask again for some of them, which is why the one-line xattr command is the easier way.
Linux
-
Download and unpack
Download
tb-linux-x64.tar.gz, open a terminal where it landed, and unpack it. You get atbfolder (keeptbnext to_internal).tar xzf tb-linux-x64.tar.gz -
Run your first program
./tb/tb --version./tb/tb tb/welcome.tb -
Optional: put it on your PATH
echo 'export PATH="$PWD/tb:$PATH"' >> ~/.bashrcDesktop apps need Tk, which most desktops have (on Debian or Ubuntu:
sudo apt install tkif a window doesn't open).
Run the apps
The apps come inside every download, in the apps folder. Each one is a single main.tb you can read and change. See them all.
| Your TB | Desktop app | Security tool on a sample log |
|---|---|---|
| Windows installer | Start menu, TB, To-do (or any app) | tb "%LOCALAPPDATA%\Programs\TB\apps\log-triage\main.tb" "%LOCALAPPDATA%\Programs\TB\apps\data\auth.log" |
| Windows zip | tb\tbw.exe tb\apps\todo\main.tb | tb\tb.exe tb\apps\log-triage\main.tb tb\apps\data\auth.log |
| Mac | ~/tb/tb ~/tb/apps/todo/main.tb | ~/tb/tb ~/tb/apps/log-triage/main.tb ~/tb/apps/data/auth.log |
| Linux | ./tb/tb tb/apps/todo/main.tb | ./tb/tb tb/apps/log-triage/main.tb tb/apps/data/auth.log |
The first time, a desktop app can take a few seconds to appear. On Windows you can also double-click any app's main.tb.
The Python version
If the app won't run on your computer, tb-python.zip is a fallback. It holds TB as a single Python file, tb.py, with the standard library (tblib/), the examples and the apps. It needs Python 3.10 or newer (with Tk for the desktop apps).
Unzip it, open a terminal in that folder, and run:
python tb.py welcome.tb
On Windows, if python isn't found, try py tb.py welcome.tb. On a Mac, use python3.
Check your download (optional)
SHA256SUMS.txt lists a fingerprint (a long code of letters and numbers) for every file. If your file's fingerprint matches its line, it's exactly the file that was published.
Open a terminal in your Downloads folder and run the command for your file:
| Computer | Command |
|---|---|
| Windows | certutil -hashfile tb-windows-x64-setup.exe SHA256 |
| Mac | shasum -a 256 tb-macos-arm64.zip |
| Linux | sha256sum -c SHA256SUMS.txt --ignore-missing |
Compare the code it prints with the matching line in SHA256SUMS.txt. Capital or small letters don't matter. On Linux the command checks for you and prints OK.
On a Mac, Safari unzips the download and moves the zip to the Bin, so check the zip from the Bin (put it back first), or turn off Open "safe" files after downloading in Safari's settings and download again. Checking is optional.