Run BT programs
Run BT programs
Function
The BT interpreter executes .bt files. When started without a command or source argument, it executes main.bt if that file exists in the current directory; otherwise, it opens the interactive prompt. Ordinary startup does not install BT or check installed versions.
Run and debug
// Output: hello world print 'hello world'
After installing the editor extension bt-lang, you can create main.bt in the project directory and run it directly.
Command line execution
bt demo.bt bt -c demo.bt
Both commands execute the script and exit normally, without adding a pause. Use a full interpreter path if BT is not on PATH. To run a script at the bt> interactive prompt, enter -c demo.bt.
Installation commands
Pending the next release: run bt install to install the current interpreter for your user account. The interactive prompt accepts install and update too. Use bt update to update an existing interpreter installation from the official website, or bt update sqlite to update an installed SQLite extension. bt install sqlite still installs the SQLite extension. See environment setup for initial installation commands, fixed paths, version selection, and platform requirements.
Double-click a script
Pending the next release: after installation and selection of BT as the .bt default application, double-clicking demo.bt opens a terminal using the fixed installed interpreter. The launcher waits for Enter after success, an error, or exit(), so output remains visible. It runs the original script without inserting pause() or changing its return behavior. This waiting behavior belongs to file-association launches; normal script calls from a terminal or another application do not use it.
Windows
You can keep bt.exe in the project directory. Opening the interpreter without arguments still executes the current directory's main.bt when present; otherwise it opens the interactive prompt. Double-clicking the interpreter itself does not trigger installation or the script-association pause.
Linux and macOS
cd /home/project chmod +x bt ./bt
Notes
- Script files use the
.btsuffix. - Web services, desktop applications and normal CLI scripts all reuse the same BT language syntax.