No, Go does not provide a REPL(read–eval–print loop).

However, as already mentioned, Go Playground is very handy. The Go Authors are also thinking about adding a feature-rich editor to it.

If you want something local, consider installing hsandbox. Running it simply with hsandbox go will split your terminal screen (with screen) where you can write code at the top and see its execution output at the bottom on every save.

There was a gotry among standard Go commands, which used to evaluate expressions (with an optional package name), and could be run like gotry 1+2 and gotry fmt 'Println("hello")' from shell. It is no longer available because not many people actually used it.

I have also seen third party projects for building a REPL for Go, but now I can only find links to two of them: igo and go-repl. How well do they work I don't know.

My two cents: Speed of compilation makes writing a REPL possible for Go, as it has also helped building the tools mentioned here, but the same speed makes REPL less necessary. Every time I want to test something in Go that I can't run in Playground I open a simple .go file and start coding and simply run the code. This will be even easier when the go command in Go 1 makes one-command build process possible and way easier.

UPDATE: Latest weekly release of Go added go command which can be used to very easily build a file: write your prog.go file and run go build prog.go && ./prog

UPDATE 2: With Go 1 you can directly run go programs with go run filename.go

UPDATE 3: gore is a new project which seems interesting.

Answer from Mostafa on Stack Overflow
🌐
GitHub
github.com › thedevsaddam › go-repl
GitHub - thedevsaddam/go-repl: GO REPL is a simple application promising to write/compile/run code in terminal, inspired by python shell · GitHub
GO REPL is a simple application promising to write/compile/run code in terminal, inspired by python shell - thedevsaddam/go-repl
Author   thedevsaddam
Top answer
1 of 14
217

No, Go does not provide a REPL(read–eval–print loop).

However, as already mentioned, Go Playground is very handy. The Go Authors are also thinking about adding a feature-rich editor to it.

If you want something local, consider installing hsandbox. Running it simply with hsandbox go will split your terminal screen (with screen) where you can write code at the top and see its execution output at the bottom on every save.

There was a gotry among standard Go commands, which used to evaluate expressions (with an optional package name), and could be run like gotry 1+2 and gotry fmt 'Println("hello")' from shell. It is no longer available because not many people actually used it.

I have also seen third party projects for building a REPL for Go, but now I can only find links to two of them: igo and go-repl. How well do they work I don't know.

My two cents: Speed of compilation makes writing a REPL possible for Go, as it has also helped building the tools mentioned here, but the same speed makes REPL less necessary. Every time I want to test something in Go that I can't run in Playground I open a simple .go file and start coding and simply run the code. This will be even easier when the go command in Go 1 makes one-command build process possible and way easier.

UPDATE: Latest weekly release of Go added go command which can be used to very easily build a file: write your prog.go file and run go build prog.go && ./prog

UPDATE 2: With Go 1 you can directly run go programs with go run filename.go

UPDATE 3: gore is a new project which seems interesting.

2 of 14
67

Try motemen/gore

Yet another Go REPL that works nicely. Featured with line editing, code completion, and more.

https://github.com/motemen/gore

Discussions

Interactive Go REPL
Or is it again a "recompile and rerun everything after each new line is added and pretend to be a REPL"? Or is it maybe something inbetween · It's something inbetween. Pretty much the way it works is it dynamically inserts references to all objects/packages/functions in scope at compile time. More on news.ycombinator.com
🌐 news.ycombinator.com
36
211
July 15, 2017
Go REPL?
Learn to use the debugger. Not only can you step through the code, but there's a debug console where you can execute expressions while the program's in a certain state. That comes standard with the VSCode Go plugin and in Goland. More on reddit.com
🌐 r/golang
8
12
June 9, 2025
[deleted by user]
The standard Go compiler and the go tool. REPLs do not work well and your learning will be very limited because Go's expressions are basically trivial and mostly equivalent to C's, etc. while Go's strength and "complicated" stuff like concurrency with channels and select simply cannot be done on a REPL at all. More on reddit.com
🌐 r/golang
5
2
November 18, 2022
yet anoter Go REPL
I tried it, but it didn't work for me. All I'm getting is "Removing last input, type '.s(ource)' to see the program.", whatever I try to write. go env: GO111MODULE='' GOARCH='arm64' GOBIN='' GOCACHE='/Users/user/Library/Caches/go-build' GOENV='/Users/user/Library/Application Support/go/env' GOEXE='' GOEXPERIMENT='' GOFLAGS='' GOHOSTARCH='arm64' GOHOSTOS='darwin' GOINSECURE='' GOMODCACHE='/Users/user/go/pkg/mod' GONOPROXY='' GONOSUMDB='' GOOS='darwin' GOPATH='/Users/user/go' GOPRIVATE='' GOPROXY=' More on reddit.com
🌐 r/golang
8
31
February 23, 2024
🌐
GitHub
github.com › x-motemen › gore
GitHub - x-motemen/gore: Yet another Go REPL that works nicely. Featured with line editing, code completion, and more. · GitHub
You don't need to go get to check the usage of a remote repository, :import github.com/... will automatically download that module. Also, you don't need to go get the pretty print module anymore. If you want to load a local code from $GOPATH, you need to create the modules file (go mod init ...) and then start gore at the project directory.
Starred by 5.5K users
Forked by 151 users
Languages   Go 97.9% | Makefile 1.8% | Dockerfile 0.3%
🌐
Blogger
diego-pacheco.blogspot.com › 2018 › 07 › writing-simple-repl-in-go.html
Writing a simple REPL in Go
July 13, 2018 - The code makes OS interaction easy we only need to do exec.Command("my Linux command") and that's it we are executing OS level commands and scripts. This happens inside the cls function. In case that we cant find the function on the Map we go to a callback function. So the fallback function will ignore the ENTER key by replacing "\n" on the string.
🌐
GitHub
github.com › vito › go-repl
GitHub - vito/go-repl: A Go REPL. Builds up a source .go file over time, compiles it for output. · GitHub
A Go REPL. Builds up a source .go file over time, compiles it for output. - vito/go-repl
Starred by 208 users
Forked by 25 users
Languages   Go
🌐
Medium
medium.com › @den.isidoro › quick-prototyping-with-a-golang-repl-547703885bd8
Quick prototyping with a Golang REPL | by Denis Isidoro | Medium
June 2, 2020 - Quick prototyping with a Golang REPL After developing in Clojure for some time, I miss a REPL when coding in Golang. It turns out we can have a Go REPL connected to our IDE of choice. Why use a …
Find elsewhere
🌐
Desmondcheong
desmondcheong.com › blog › 2021 › 05 › 05 › writing-a-simple-repl-in-go
Writing a simple REPL in Go | Desmond Cheong
May 5, 2021 - Normally a REPL might have to do some parsing, so we set up some helper functions to handle well-formed commands, and invalid commands.
🌐
GitHub
github.com › d4l3k › go-pry
GitHub - d4l3k/go-pry: An interactive REPL for Go that allows you to drop into your code at any point. · GitHub
An interactive REPL for Go that allows you to drop into your code at any point. - d4l3k/go-pry
Starred by 3K users
Forked by 63 users
Languages   Go 94.9% | HTML 3.6%
🌐
Replit
replit.com › languages › go
Go Online Compiler & Interpreter - Replit
Write and run Go code using our Go online compiler & interpreter. You can build, share, and host applications right from your browser!
🌐
Hacker News
news.ycombinator.com › item
Interactive Go REPL | Hacker News
July 15, 2017 - Or is it again a "recompile and rerun everything after each new line is added and pretend to be a REPL"? Or is it maybe something inbetween · It's something inbetween. Pretty much the way it works is it dynamically inserts references to all objects/packages/functions in scope at compile time.
🌐
Reddit
reddit.com › r/golang › go repl?
r/golang on Reddit: Go REPL?
June 9, 2025 -

I’m new to go, but one of my go to things with python, ruby is to drop into a repl and be able to step by step walk through and inspect code flow and especially object types (again a put with dynamic languages, 1/2 the bugs is you have no clue what someone passed in)

I’m fine with doing prints to console for debugging, but miss the power of being able to come into complicated code base as and just walk through the code and get a mental mapping of how things work and where to go next.

With java there was InteliJ for step by step debugging, but that’s not as powerful because I’m not able to modify the object mid flight and try to call a method or a function again to see how it changes things.

Just wondering, how do you as more seasoned go Devs approach debugging in Go?

🌐
Reddit
reddit.com › r/golang › [deleted by user]
Best local Golang REPL for learning?
November 18, 2022 - I've used https://github.com/traefik/yaegi REPL combined with rlwrap for nicer readline experience. But sadly no completion. $ rlwrap yaegi > s := "ab" : ab > len(s) : 2 > strings.Repeat(s, 3) : ababab > ^D $ ... I'd say just get GoLand the IDE.
🌐
Medium
erik-engheim.medium.com › repl-development-in-go-with-gore-730ece0f3c3b
REPL Development in Go with Gore. A Julia developer setting up a Julia… | by Erik Engheim | Medium
February 19, 2020 - Notice you don’t write the package name quoted as you would with normal Go code. Of course what we are really interested in when doing REPL style development is to be able to import our own packages and testing them.
🌐
Go
go.dev › play
Go Playground - The Go Programming Language
Common problems companies solve with Go · Stories about how and why companies use Go
🌐
GitHub
github.com › golobby › repl
GitHub - golobby/repl: Golang REPL, Prototype as fast as possible · GitHub
repl build from ground up to be compatible with go modules, so when you fire up a repl in go project which is a go module project repl instantly identifies your module and imports it as a module with local path, so you can access all your public types and functions.(watch Demo)
Starred by 84 users
Forked by 2 users
Languages   Go
🌐
DEV Community
dev.to › toxicwaste › repl-in-go-real-on-go-4kda
REPL in Go? Real on Go! - DEV Community
May 30, 2025 - To solve this, I wrote a package (well, a module, but I call them packages) called Replyme — a tool for building REPLs in Golang.
🌐
Reddit
reddit.com › r/golang › yet anoter go repl
r/golang on Reddit: yet anoter Go REPL
February 23, 2024 -

I create a new REPL shell for golang, It has the following features:

  • auto import the needed libraries using `goimports`. just write `fmt.Print()` and `fmt` will be imported.

  • autocompletion for languages keywords and libraries's functions and types without the need for language server.

  • print the variables by writing them, no need to use `fmt.Print()`

  • supports all shell line editing commands supported by liner

  • don't have dependancy on goimports

take a look and tell me your opinion:

https://github.com/ahmedakef/goshell

TBH: after finishing the project, I found lots of pretty good REPLs for go , so I am adding it as another try

🌐
DevGenius
blog.devgenius.io › building-a-go-lang-console-repl-9df49dd33f12
Building a Go(lang) Console/REPL. A Read-Eval-Print Loop (REPL) is a… | by Cheikh seck | Dev Genius
August 2, 2022 - In a REPL environment, code is entered and evaluated by an interpreter. Once evaluated, the output is shown to the user. Since Go programs are compiled, the language does not offer a REPL environment.