🌐
Go Packages
pkg.go.dev › github.com › maxott › go-repl
repl package - github.com/maxott/go-repl - Go Packages
March 22, 2023 - github.com/maxott/go-repl · Open Source Insights · Lightweight Golang REPL library, inspired by GNU Readline. You provide the Eval function, and go-repl does the rest. Your REPLs that use this library will enjoy the following features: Session history with reverse-search ·
🌐
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
🌐
GitHub
github.com › OpenEngineer › go-repl
GitHub - OpenEngineer/go-repl · GitHub
package main import ( "fmt" "log" "strconv" "strings" repl "github.com/openengineer/go-repl" ) var helpMessage = `help display this message add <int> <int> add two numbers quit quit this program` // implements repl.Handler interface type MyHandler struct { r *repl.Repl } func main() { fmt.Println("Welcome, type \"help\" for more info") h := &MyHandler{} h.r = repl.NewRepl(h) // start the terminal loop if err := h.r.Loop(); err != nil { log.Fatal(err) } } func (h *MyHandler) Prompt() string { return "> " } func (h *MyHandler) Tab(buffer string) string { return "" // do nothing } func (h *MyHand
Starred by 7 users
Forked by 5 users
Languages   Go 98.9% | Makefile 1.1%
🌐
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
Yet another Go REPL that works nicely. Featured with line editing, code completion, and more. - GitHub - x-motemen/gore: Yet another Go REPL that works nicely. Featured with line editing, code completion, and more.
Starred by 5.5K users
Forked by 151 users
Languages   Go 97.9% | Makefile 1.8% | Dockerfile 0.3%
🌐
GitHub
github.com › golobby › repl
GitHub - golobby/repl: Golang REPL, Prototype as fast as possible · GitHub
Golang REPL, Prototype as fast as possible. Contribute to golobby/repl development by creating an account on GitHub.
Starred by 84 users
Forked by 2 users
Languages   Go
🌐
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%
🌐
GitHub
github.com › maxott › go-repl
GitHub - maxott/go-repl
package main import ( "fmt" "log" "strconv" "strings" repl "github.com/openengineer/go-repl" ) var helpMessage = `help display this message add <int> <int> add two numbers quit quit this program` // implements repl.Handler interface type MyHandler struct { r *repl.Repl } func main() { fmt.Println("Welcome, type \"help\" for more info") h := &MyHandler{} h.r = repl.NewRepl(h) // start the terminal loop if err := h.r.Loop(); err != nil { log.Fatal(err) } } func (h *MyHandler) Prompt() string { return "> " } func (h *MyHandler) Tab(buffer string) string { return "" // do nothing } func (h *MyHand
Author   maxott
Find elsewhere
🌐
Go Packages
pkg.go.dev › github.com › paulvollmer › gorepl
repl package - github.com/paulvollmer/gorepl - Go Packages
type REPL struct { Name string Prompt string Version string Author string AuthorEmail string WelcomeMessage string Commands []Command History []string // contains filtered or unexported fields }
🌐
Ag91
ag91.github.io › blog › 2023 › 06 › 06 › ob-gore-literate-go-run-via-the-gore-repl
ob-gore: literate Go run via the Gore REPL - Where parallels cross
June 6, 2023 - I wrote and published my first Org Babel extension yuhu! It is super basic and just a hack really, but it works: https://github.com/ag91/ob-gore. This enables you to write Go snippets in an Emacs Org Mode buffer so that you can evaluate them in a literate programming fashion through the Gore REPL.
🌐
GitHub
github.com › replit › database-go
GitHub - replit/database-go: Go client for Repl.it Database
Go client for Repl.it Database. Contribute to replit/database-go development by creating an account on GitHub.
Starred by 23 users
Forked by 10 users
Languages   Go 99.4% | Makefile 0.6% | Go 99.4% | Makefile 0.6%
🌐
GitHub
github.com › glycerine › gore-1
GitHub - glycerine/gore-1: Yet another Go REPL that works nicely. Featured with line editing, code completion, and more. · GitHub
Yet another Go REPL that works nicely. Featured with line editing, code completion, and more. - glycerine/gore-1
Author   glycerine
🌐
GitHub
github.com › replit › go-replidentity
GitHub - replit/go-replidentity: Go implementation of Repl Identity · GitHub
Go implementation of Repl Identity. Contribute to replit/go-replidentity development by creating an account on GitHub.
Starred by 9 users
Forked by 2 users
Languages   Go 87.9% | Starlark 9.9% | Shell 1.6% | Makefile 0.6%
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

🌐
GitHub
github.com › boynton › repl
GitHub - boynton/repl: A Go implementation of a Read-Eval-Print-Loop with command line editing · GitHub
A Go implementation of a Read-Eval-Print-Loop (REPL) with command line editing.
Starred by 9 users
Forked by 2 users
Languages   Go
🌐
Go Packages
pkg.go.dev › github.com › robertkrimen › otto › repl
repl package - github.com/robertkrimen/otto/repl - Go Packages
github.com/robertkrimen/otto · Open Source Insights · Code Wiki · Package repl implements a REPL (read-eval-print loop) for otto. func DebuggerHandler(vm *otto.Otto) func Run(vm *otto.Otto) error · func RunWithOptions(vm *otto.Otto, options Options) error ·
🌐
Go Packages
pkg.go.dev › github.com › goplus › gop › repl
repl package - github.com/goplus/gop/repl - Go Packages
March 15, 2021 - github.com/goplus/gop · Open Source Insights · Constants · type REPL · func New() *REPL · func (r *REPL) Run(line string) func (r *REPL) SetUI(term UI) type UI · View Source · const ( // ContinuePrompt - the current code statement is not completed. ContinuePrompt string = "...
🌐
Go Packages
pkg.go.dev › github.com › openengineer › go-repl
repl package - github.com/openengineer/go-repl - Go Packages
github.com/openengineer/go-repl · Open Source Insights · Lightweight Golang REPL library, inspired by GNU Readline. You provide the Eval function, and go-repl does the rest. Your REPLs that use this library will enjoy the following features: Session history with reverse-search ·
🌐
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?

🌐
Go Packages
pkg.go.dev › github.com › open-policy-agent › opa › repl
repl package - github.com/open-policy-agent/opa/repl - Go Packages
October 31, 2024 - For newer features and behaviours, ...w.openpolicyagent.org/docs/latest/v0-compatibility/ for more information. Package repl implements a Read-Eval-Print-Loop (REPL) for interacting with the policy engine....