| 📦 Turbo Golo d710c1b k33g 12h ago | 1 | # How to install GoloScript |
| 2 | |
| 3 | This guide shows how to get `golo` — and, if you want them, `gogolo` and `wagolo` — onto a machine, and how to check that Turbo Golo can find it. It assumes you already have Turbo Golo, or are about to — see [how to install the editor](install.md) for that. |
| 4 | |
| 5 | **The editor works without any of this.** Editing, colouring, themes, snippets and terminal windows all run with no interpreter at all. What needs it is completion, the error marks in the gutter, and every command in the Golo menu. |
| 6 | |
| 7 | ## Which binary you need |
| 8 | |
| 9 | GoloScript ships three, under one version: |
| 10 | |
| 11 | | Binary | What it is for | Also needs | |
| 12 | | --- | --- | --- | |
| 13 | | `golo` | The interpreter: runs scripts, and is also the REPL, the debugger, the test runner and **the language server** | nothing | |
| 14 | | `gogolo` | Compiles a script to a native executable, through Go | the Go toolchain | |
| 15 | | `wagolo` | Compiles a script to WebAssembly, through Go and TinyGo | TinyGo, and `wasm-tools` for the `wasip2` target | |
| 16 | |
| 17 | The editor needs `golo` and nothing else. `gogolo` and `wagolo` are what the **Build native** and **Build wasm** items in the Golo menu run; without them those two items report `command not found` and the rest of the menu is unaffected. |
| 18 | |
| 19 | ## Install a release |
| 20 | |
| 21 | Precompiled binaries for macOS (Intel and Apple Silicon), Linux (amd64, arm64, 386) and Windows (amd64, arm64, 386) are on the [releases page](https://codeberg.org/TypeUnsafe/golo-script/releases). Each is one file: |
| 22 | |
| 23 | ```bash |
| 24 | chmod +x golo-<version>-<platform> |
| 25 | sudo mv golo-<version>-<platform> /usr/local/bin/golo |
| 26 | golo --version |
| 27 | ``` |
| 28 | |
| 29 | On macOS an unsigned download is quarantined until you say otherwise, in **System Settings ▸ Privacy & Security** or with `xattr -d com.apple.quarantine golo-<version>-<platform>`. |
| 30 | |
| 31 | Repeat for `gogolo` and `wagolo` if you want the compilers. |
| 32 | |
| 33 | ## Or build from source |
| 34 | |
| 35 | This gives you all three at once, into `/usr/local/bin`. It needs Go; `wagolo` builds without TinyGo but cannot compile anything until TinyGo is installed. |
| 36 | |
| 37 | ```bash |
| 38 | git clone https://codeberg.org/TypeUnsafe/golo-script.git && cd golo-script |
| 39 | ./install.sh |
| 40 | ``` |
| 41 | |
| 42 | Turbo Golo's own installer will do exactly that when asked: |
| 43 | |
| 44 | ```bash |
| 45 | scripts/install.sh --with-server |
| 46 | ``` |
| 47 | |
| 48 | It clones GoloScript into a temporary directory and runs its `install.sh`, which asks for `sudo` when it copies into `/usr/local/bin`. |
| 49 | |
| 50 | ## Check it |
| 51 | |
| 52 | ```bash |
| 53 | golo --version |
| 54 | ``` |
| 55 | |
| 56 | ``` |
| 57 | v0.1.1 | dev.20260802.🤓 |
| 58 | ``` |
| 59 | |
| 60 | And the language server specifically — it is the interpreter, so this is a subcommand rather than a second binary: |
| 61 | |
| 62 | ```bash |
| 63 | golo lsp </dev/null |
| 64 | ``` |
| 65 | |
| 66 | It reads nothing, sees the end of its input, and exits cleanly. A `golo` that prints its usage or starts a REPL here is a different program with the same name. |
| 67 | |
| 68 | ## Check that the editor finds it |
| 69 | |
| 70 | Open any `.golo` file and read the right-hand end of the status bar: |
| 71 | |
| 72 | ``` |
| 73 | F1 Describe F2 Save F3 Open F6 Window F10 Menu 1:1 LSP: ready |
| 74 | ``` |
| 75 | |
| 76 | `LSP: ready` means the server started. `LSP: no golo — see https://codeberg.org/TypeUnsafe/golo-script/releases` means it was not found, and the message says where to get it. |
| 77 | |
| 78 | **Turbo Golo looks in two places, in order**: your `PATH`, then `/usr/local/bin`. The second is where GoloScript's installer writes, and it is searched even when it is not on `PATH` — a shell started by a desktop launcher, say — so that the case that otherwise looks like the server being broken works. |
| 79 | |
| 80 | ## Variants |
| 81 | |
| 82 | - **You install binaries somewhere else.** Put that directory on `PATH`; the editor has no environment variable naming another place to look. A symbolic link in `/usr/local/bin` also works. |
| 83 | - **You already have `golo` but no completion.** Run `golo lsp </dev/null` and make sure it exits quietly. Then read the status bar — `Run ▸ Language server status` shows the path the editor found and whether the server answered its handshake. |
| 84 | - **You want to upgrade.** Replace the binary — a release download or `./install.sh` again from a fresh `git pull`. Restart the editor: it starts one server per session and does not notice a new binary until then. |
| 85 | - **You are installing for CI, or into an image.** GoloScript publishes a `scratch`-based image holding the interpreter alone: `docker run --rm -v "$PWD:/app" -w /app k33g/gololang:<tag> /golo ./main.golo`. The editor cannot use a server inside a container, so this is for running scripts, not for completion. |
| 86 | - **You want to be sure the editor is not simply finding it on `PATH`.** Start it with a stripped environment — `env PATH=/usr/bin:/bin turbo-golo main.golo` — and the status bar should still say `LSP: ready`, from `/usr/local/bin`. |
| 87 | |
| 88 | ## What each binary is for, from the editor's side |
| 89 | |
| 90 | | Binary | What the editor uses it for | |
| 91 | | --- | --- | |
| 92 | | `golo` | `golo lsp` — completion, hover, definitions, the file's symbols and the error marks; and the **Run**, **Test**, **Test one**, **Debug**, **REPL** and **New script** items of the Golo menu | |
| 93 | | `gogolo` | The **Build native** item | |
| 94 | | `wagolo` | The **Build wasm** item | |
| 95 | |
| 96 | ## See also |
| 97 | |
| 98 | - [How to enable completion](enable-completion.md) — what to do when the server is installed and still says nothing |
| 99 | - [How to run Golo commands from the editor](run-golo-commands.md) — the Golo menu |
| 100 | - [Colouring and completion](../explanation/colouring-and-completion.md) — why the interpreter is the server |