How to write a programming language and shell in Go with 92% test coverage and instant CI/CD

Have you wondered how terminal shells work? Do you want to create your own programming language? This talk is for you! We will look at Elvish, a shell and built in Go with a full-fledged programming language. We will dive into how its implementation as well as testing and CI/CD strategy.

LEVEL: Intermediate

GoLab Deep
40 min
November 12th, 2024



In this talk I will share my experience of developing a programming language and shell (Elvish, in Go.

The talk will cover the following topics:
- A quick intro to Elvish itself, showing its full-fledged programming language and interesting interactive features
- A dive into Elvish's interpreter, as a case study of how to implement a dynamic language interpreters in Go. This will include topics like:
- How I implemented a tree-walking interpreter and static analyzer in Go
- How I avoided reinventing the wheel by leveraging Go's types and standard libraries
- How I used Go's concurrency primitives to implement shell semantics like pipelines
- Techniques for testing Elvish, including:
- Testing Elvish as a programming language: how I invented a simple DSL and a VS Code plugin to make writing interpreter tests smooth and painless
- Testing Elvish as an interactive shell: A framework for writing terminal "UI tests" in Go
- Building a CI/CD pipeline from scratch with Go and Elvish: Elvish's main website ( and prebuilt binaries ( are updated at every Git commit, by a mix of Go programs and Elvish scripts. I will share my techniques and experience building the pipeline.

GoLab is a conference made by Develer.
Develer is a company based in Campi Bisenzio, near Florence. Our motto is : "Technology to give life to your products". We produce hardware and software to create exceptional products and to improve industrial processes and people's well being.
In Develer we have passion for the new technologies and we offer our clients effective solutions that are also efficient, simple and safe for the end users. We also believe in a friendly and welcoming environment where anybody can give their contribution. This passion and this vision are what we've been driven to organize our conference "made by developers for developers".

Subscribe to our newsletter

We hate spam just as much as you do, which is why we promise to only send you relevant communications. We respect your privacy and will never share your information with third parties.
©2024 GoLab | The international conference on Go in Florence-Design & devCantiere Creativo-Made withDatoCMS