You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+50-20Lines changed: 50 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,23 +10,31 @@ The official command line tool for [Boot.dev](https://www.boot.dev). It allows y
10
10
11
11
## Installation
12
12
13
-
### 1. You need Go 1.22 installed
13
+
### 1. Install Go 1.22 or later
14
14
15
-
The Boot.dev CLI only works on Linux and Mac. If you're on Windows, you'll need to use WSL. Make sure you install go in your Linux/WSL terminal, not your Windows terminal/UI. You can use the [webi instructions here](https://webinstall.dev/golang/) for a quick and easy Go installation on the command line. To do so, run this in your terminal:
15
+
The Boot.dev CLI requires a Golang installation, and only works on Linux and Mac. If you're on Windows, you'll need to use WSL. Make sure you install go in your Linux/WSL terminal, not your Windows terminal/UI. There are two options:
16
+
17
+
**Option 1**: [The webi installer](https://webinstall.dev/golang/) is the simplest way for most people. Just run this in your terminal:
16
18
17
19
```bash
18
20
curl -sS https://webi.sh/golang | sh
19
21
```
20
22
21
-
*Be sure to read the output of the command and follow any instructions. You might need to update your PATH.*
23
+
_read the output of the command and follow any instructions. You might need to update your PATH._
22
24
23
-
Alternatively, you can use the [official installation instructions](https://go.dev/doc/install).
25
+
**Option 2**: Use the [official installation instructions](https://go.dev/doc/install).
24
26
25
27
Run `go version` on your command line to make sure the installation worked.
26
28
29
+
**Troubleshooting:**
30
+
31
+
- If you already had Go installed with webi, you should be able to run the same webi command to update it.
32
+
- If you already had a version of Go installed a different way, you can use `which go` to find out where it is installed, and remove the old version manually.
33
+
- Check the "troubleshooting command not found" section below if that's the error you're getting.
34
+
27
35
### 2. Install the Boot.dev CLI
28
36
29
-
This command will download, build, and install the `bootdev` command into your Go toolchain's `bin` directory. Go ahread and run it:
37
+
This command will download, build, and install the `bootdev` command into your Go toolchain's `bin` directory. Go ahead and run it:
30
38
31
39
```bash
32
40
go install github.com/bootdotdev/bootdev@latest
@@ -38,34 +46,56 @@ Make sure that it works by running:
38
46
bootdev help
39
47
```
40
48
41
-
### 3. Add to PATH (if you're having issues)
49
+
If you're having issues, check the "troubleshooting command not found" section below.
42
50
43
-
If you're getting a "command not found" error, it's most likely because Go's bin directory (where your `bootdev` command is) isn't in your PATH. You can add the bin directory to your PATH by modifying your shell's configuration file. For example, if you're using bash on Ubuntu (e.g. WSL), you can run the following commands to add a line to your `~/.bashrc` file:
51
+
### 3. Login to the CLI
44
52
45
-
```bash
46
-
echo'export PATH=$PATH:$HOME/go/bin'>>~/.bashrc
53
+
Run `bootdev login` to authenticate with your Boot.dev account. After authenticating, you're ready to go!
54
+
55
+
### Troubleshooting "command not found"
56
+
57
+
If you're getting a "command not found" error for either the `go version` or the `bootdev help`, it's most likely because the directory containing the `go` binary isn't in your [`PATH`](https://opensource.com/article/17/6/set-path-linux). You can add the bin directory to your `PATH` by modifying your shell's configuration file. _Also, be sure to read the output of any installation commands you run, as they likely contain important info._
47
58
59
+
**PATH issues with Go itself**:
60
+
61
+
You need to know _where_ the `go` command was installed. It might be in:
62
+
63
+
-`~/.local/opt/go/bin` (webi)
64
+
-`/usr/local/go/bin` (official installation)
65
+
- somewhere else?
66
+
67
+
You should be able to ensure it exists by attempting to run `go` with the full filepath. For example, if you think it's in `~/.local/opt/go/bin`, you can run `~/.local/opt/go/bin/go version`. If that works, then you just need to add `~/.local/opt/go/bin` to your `PATH` and reload your shell:
_Use the correct shell configuration file for your shell, and the correct path to your Go installation._
62
84
63
-
The first time you use the tool, run `bootdev login` to authenticate with your Boot.dev account. Here are the other commands:
85
+
**PATH issues with the Boot.dev CLI**:
64
86
65
-
*`bootdev login` - Login to [Boot.dev](https://www.boot.dev). You'll need to login to Boot.dev in your browser and copy/paste a token.
66
-
*`bootdev logout` - Logout of Boot.dev (clears your authentication token).
67
-
*`bootdev run <id>` - Run a lesson locally to debug your solution.
68
-
*`bootdev submit <id>` - Submit a lesson to Boot.dev.
87
+
You probably need to add `$HOME/go/bin` (the default `GOBIN` directory where `go` installs programs) to your `PATH`:
69
88
70
-
After a `submit` command, results are sent to Boot.dev's servers, and then websocketed to your browser instantly, so be sure to check there after submission.
0 commit comments