# How to run Golo commands from the editor This guide shows how to run, test, debug and compile your scripts without leaving Turbo Golo. It assumes the editor is installed and you have a directory with a `.golo` file in it. ## Get a starter file Start the editor **from the directory your scripts live in**, then choose **Golo ▸ Create tools file** (`Alt-G`, then `C`). That writes `.turbo-golo/tools.toml` with the commands a Golo programmer runs most, and opens it. The first three: ```toml [[tool]] name = "~R~un" # The interpreter, on the file you name. A terminal, not a popup: a script that # reads the keyboard has to be able to be answered, and one that runs long has # to be able to be interrupted. command = "golo {{script, e.g. main.golo}}" output = "terminal" [[tool]] name = "~T~est" # Every *_test.golo under the current directory, with gololang.Testing. command = "golo --test" output = "popup" [[tool]] name = "Test ~o~ne" command = "golo --test {{test file or directory}}" output = "popup" ``` Each `[[tool]]` becomes one line of the **Golo** menu, in the order they appear — unless it names a `menu` of its own, which a later section covers. The file is read every time the menu opens, so an edit takes effect immediately. ## Run one `Alt-G`, then the letter between the tildes — `R` to run, `T` to test. **Run** asks first, because Golo has no manifest that says which file is the program: ``` ┌──────────────── Run ────────────────┐ │ script, e.g. main.golo │ │ [ ] │ └─────────────────────────────────────┘ ``` Type `main.golo` and press `Enter`. A terminal window opens and the script runs in it; when it ends the window stays, showing what it printed. Press `Ctrl-W` to close it. Run it again and the box remembers the name for the rest of the session. **Test** opens a **popup** at once, which fills in as the command runs. Its title carries the command and, once it has ended, how it went: ``` ┌──────────────── golo --test — ok ─────────────────┐ │ 🧪 Running Golo tests... │ │ │ │ 📝 shapes_test.golo │ │ ✓ a point describes itself │ │ ✅ 1 test(s) passed │ │ │ │ [ Close ] │ └────────────────────────────────────────────────────┘ ``` | Key | Effect | | --- | --- | | `↑` `↓` `PgUp` `PgDn` `Home` `End` | Read through the output | | `Escape` | Close it — and **stop the command** if it is still running | | `Enter` | Close it | A command that succeeded silently shows `(no output)` rather than a blank box, so you can tell it from one that has not started. ## The rest of the menu | Item | What it runs | Where | | --- | --- | --- | | **Debug** | `golo --debug