The official command line tool for Boot.dev. It allows you to submit lessons and do other such nonsense.
⭐ Hit the repo with a star if you're enjoying Boot.dev ⭐
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:
Option 1: The webi installer is the simplest way for most people. Just run this in your terminal:
curl -sS https://webi.sh/golang | sh
Read the output of the command and follow any instructions.
Option 2: Use the official installation instructions.
Run go version
on your command line to make sure the installation worked. If it did, move on to step 2.
Optional troubleshooting:
-
If you already had Go installed with webi, you should be able to run the same webi command to update it.
-
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. -
If you're getting a "command not found" error after installation, it's most likely because the directory containing the
go
program isn't in yourPATH
. You need to add the directory to yourPATH
by modifying your shell's configuration file. First, you need to know where thego
command was installed. It might be in: -
~/.local/opt/go/bin
(webi) -
/usr/local/go/bin
(official installation) -
Somewhere else?
You can ensure it exists by attempting to run go
using its 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:
# For Linux/WSL
echo 'export PATH=$PATH:$HOME/.local/opt/go/bin' >> ~/.bashrc
# next, reload your shell configuration
source ~/.bashrc
# For Mac OS
echo 'export PATH=$PATH:$HOME/.local/opt/go/bin' >> ~/.zshrc
# next, reload your shell configuration
source ~/.zshrc
This command will download, build, and install the bootdev
command into your Go toolchain's bin
directory. Go ahead and run it:
go install github.com/bootdotdev/bootdev@latest
Run bootdev --version
on your command line to make sure the installation worked. If it did, move on to step 3.
If it worked, move on to step 3.
Optional troubleshooting:
If you're getting a "command not found" error for bootdev help
, it's most likely because the directory containing the bootdev
program isn't in your PATH
. You need to add the directory to your PATH
by modifying your shell's configuration file. You probably need to add $HOME/go/bin
(the default GOBIN
directory where go
installs programs) to your PATH
:
# For Linux/WSL
echo 'export PATH=$PATH:$HOME/go/bin' >> ~/.bashrc
# next, reload your shell configuration
source ~/.bashrc
# For Mac OS
echo 'export PATH=$PATH:$HOME/go/bin' >> ~/.zshrc
# next, reload your shell configuration
source ~/.zshrc
Run bootdev login
to authenticate with your Boot.dev account. After authenticating, you're ready to go!