turbo-editors/turbo-pythonpublic Fork 0
v1.0.2
Commits
Clone
git clone https://git.rickub.com/turbo-editors/turbo-python.git
git clone ssh://git@rickub.com/turbo-editors/turbo-python.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

install.md · 89 lines · 3.8 KBmarkdown Blame HistoryRaw
📦 Turbo Python 6fc62ea k33g 11h ago1# How to install and build Turbo Python
2
3This guide shows how to get a working `turbo-python` binary. It assumes you have Go 1.26 or later and can use a terminal.
4
5## The short way, from a checkout
6
7```bash
8git clone ssh://git@rickub.com/turbo-editors/turbo-python.git
9cd turbo-python
10make install
11```
12
13That builds the editor, puts it where your shell looks for commands, and tells you what it found: the Go version it built with, where the binary went, whether that directory is on your `PATH`, and whether `pylsp` is installed. The build goes to a temporary file first, so a failed build never replaces a working installation.
14
15Then, from any Python project:
16
17```bash
18turbo-python main.py
19```
20
21### Options
22
23```bash
24scripts/install.sh --prefix ~/bin # install somewhere of your choosing
25scripts/install.sh --with-pylsp # install the language server too
26scripts/install.sh --uninstall # remove it again (make uninstall)
27scripts/install.sh --help
28```
29
30Without `--prefix`, the editor goes where `go install` would put it: `$GOBIN`, or `$GOPATH/bin` when `GOBIN` is unset — usually `~/go/bin`.
31
32## Just build it, without installing
33
34```bash
35make build
36./bin/turbo-python main.py
37```
38
39## From the module proxy, without a checkout
40
41```bash
42go install rickub.com/turbo-editors/turbo-python@latest
43```
44
45If the command is then "not found", the install directory is not on your `PATH`:
46
47```bash
48export PATH="$PATH:$(go env GOPATH)/bin"
49```
50
51## Check it works
52
53```bash
54turbo-python -version
55turbo-python -list-themes
56```
57
58The first names the commit the binary was built from, which is what to quote in a bug report; [the version number](../reference/versioning.md) explains what each form means. The second prints the themes compiled into the binary and tells you where your own would go.
59
60## Variants
61
62- **You only want to run it once**: `go run rickub.com/turbo-editors/turbo-python@latest src/main.py`
63- **You want the binary somewhere specific**: `go build -o /usr/local/bin/turbo-python .`
64- **Your terminal has no true colour**: use `turbo-python -theme turbo-classic`, which is built from the sixteen ANSI colours only. `turbo-dark` and `borland-light` use 24-bit colours.
65
66## When something goes wrong
67
68**`the installed binary does not run`.** The installer prints whatever the system said just above that line — read it first, because it names the actual problem.
69
70The installer replaces the binary rather than writing over the one that is there, so a reinstall gives the file a fresh identity. That matters on macOS, which caches a binary's code signature against its inode: writing new bytes into the old inode leaves the cached signature describing something else, and the kernel then refuses to run a binary that built and installed perfectly. If you have an older copy installed by something that used `cp`, removing it first clears any such state:
71
72```bash
73scripts/install.sh --uninstall
74scripts/install.sh
75```
76
77**`Go x.y or later is needed`.** The editor is written in Go, so building it needs a Go toolchain even though it is an editor for Python. The version comes from `go.mod`, so it cannot drift from what the code actually needs.
78
79**`build failed; nothing was installed`.** Your existing installation is untouched — the build goes to a temporary file first. The compiler's own output is printed above the message.
80
81## Terminal requirements
82
83Turbo Python needs a terminal that reports its size and supports mouse reporting — every mainstream one does. It reads `TERM` through tcell; if the display is wrong, check that `TERM` matches your terminal (`xterm-256color` is a safe default).
84
85## See also
86
87- Every flag: [command line reference](../reference/cli.md)
88- Getting completion working: [How to enable Python completion](enable-completion.md)
89- A guided first session: [Your first file in Turbo Python](../tutorials/getting-started.md)