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.

Version 2.0.1Released What's new

TB for Windows

The Windows installer: no admin needed, adds TB to the Start menu. Version 2.0.1.

Download tb-windows-x64-setup.exe

All downloads

FileForWhat it is
tb-windows-x64-setup.exeWindows 10 and 11, 64-bit (recommended)Installer: Start menu, double-click .tb files, tb on your PATH
tb-windows-x64.zipWindows 10 and 11, 64-bitPortable folder, nothing installed
tb-macos-arm64.zipmacOS on Apple silicon (M1 and newer)A tb folder
tb-linux-x64.tar.gzLinux, 64-bit Intel or AMDA tb folder
tb-python.zipAny computer with Python 3.10 or newertb.py, the standard library, examples and apps
SHA256SUMS.txtChecking your downloadSHA-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

  1. 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.

  2. 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.

  3. 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 tb to 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.

  4. 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 --version

    It answers TB 2.0.1. Try tb on its own to type TB one line at a time (exit to leave), or tb doc to list the libraries.

  5. 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.

What's in the Start menu

  • TB Prompt: a command window with tb ready.
  • 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

  1. Open Notepad and type say("Hello from me!")

  2. 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.

  3. 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

  1. Download and unzip

    Download tb-macos-arm64.zip. Safari unzips it for you; otherwise double-click it in Downloads. You get a folder called tb with the tb program, an _internal folder it needs, apps, examples and welcome.tb.

    This version is for Macs with Apple silicon (M1 and newer). On an older Intel Mac, use the Python version.

  2. Give it a home

    Drag the tb folder from Downloads into your home folder (in Finder, Go, Home), so it lives at ~/tb. Keep everything inside together: tb only works next to _internal.

  3. 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 ~/tb

    It prints nothing; that means it worked. (If you left the folder in Downloads, use ~/Downloads/tb instead.)

  4. Run your first program

    cd ~/tb
    ./tb welcome.tb

    The 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.

  5. Optional: type tb from anywhere

    Add the folder to your PATH, then open a new Terminal window:

    echo 'export PATH="$HOME/tb:$PATH"' >> ~/.zshrc

    Now tb hello.tb works 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

  1. Download and unpack

    Download tb-linux-x64.tar.gz, open a terminal where it landed, and unpack it. You get a tb folder (keep tb next to _internal).

    tar xzf tb-linux-x64.tar.gz
  2. Run your first program

    ./tb/tb --version
    ./tb/tb tb/welcome.tb
  3. Optional: put it on your PATH

    echo 'export PATH="$PWD/tb:$PATH"' >> ~/.bashrc

    Desktop apps need Tk, which most desktops have (on Debian or Ubuntu: sudo apt install tk if 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 TBDesktop appSecurity tool on a sample log
Windows installerStart menu, TB, To-do (or any app)tb "%LOCALAPPDATA%\Programs\TB\apps\log-triage\main.tb" "%LOCALAPPDATA%\Programs\TB\apps\data\auth.log"
Windows ziptb\tbw.exe tb\apps\todo\main.tbtb\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:

ComputerCommand
Windowscertutil -hashfile tb-windows-x64-setup.exe SHA256
Macshasum -a 256 tb-macos-arm64.zip
Linuxsha256sum -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.