#terrabuild
This is how I've implemented string interpolation in Terrabuild last year - it's easy once you understand lexer needs to be context sensitive (kind of aha moment) - at least with FsLexYacc. Link to implementation in #fsharp, as there are few simple materials on the topic.
github.com/MagnusOpera/...
terrabuild/src/Terrabuild.Lang at main · MagnusOpera/terrabuild
Seamless CI/CD tool for building and deploying monorepos. Support HCL-like configuration, builds in containers, outputs caching, extensions. - MagnusOpera/terrabuild
github.com
January 25, 2026 at 7:27 PM
For the curious, here are the extensions written for Terrabuild in FScript.

github.com/MagnusOpera/...
terrabuild/src/Terrabuild/Scripts at main · MagnusOpera/terrabuild
Seamless CI/CD tool for building and deploying monorepos. Support HCL-like configuration, builds in containers, outputs caching, extensions. - MagnusOpera/terrabuild
github.com
February 12, 2026 at 11:05 AM
Terrabuild v0.106.0 now supports brew on macOS and Linux !

github.com/MagnusOpera/...
Release 0.106.0 · MagnusOpera/Terrabuild
What's Changed Prepare brew environment by @pchalamet in #67 add & and | operator for booleans by @pchalamet in #68 Full Changelog: 0.104.0...0.106.0
github.com
December 15, 2024 at 10:02 PM
fscript is a demo host to play with the language but the real thing is to embed the language in your .net app !

For example, Terrabuild has been successfully adapted to use FScript for extensions: no more .net sdk dependency and no need to compile extensions with F#. Just write a script now !
February 12, 2026 at 11:05 AM
Integration in Terrabuild is mostly done for extensions! Next is to focus on extension distribution (local and http) and documentation generator. Needless to say this will be a major improvement for Terrabuild. Really happy about FScript capabilities. Hope you will like it too !
February 8, 2026 at 9:43 PM
I'm planning to use FScript to replace extensions in Terrabuild: using F# scripts requires installation of .net SDK - it's a bit heavy so I need to remove this dependency. FScript will also allow execution sandboxing. In next weeks, Terrabuild will have great security and full extensibility. Nice.
February 7, 2026 at 6:37 PM
Then the FsYacc grammar (Parser.fsy) can build an AST from the emitted token and construct what could have been built using format() or tostring().

github.com/MagnusOpera/...
Terrabuild/src/Terrabuild.Lang/Parser.fsy at 56ab3fe18a1515504f666b3aae49635f6ae16067 · MagnusOpera/Terrabuild
Seamless CI/CD tool for building and deploying monorepos. Support HCL-like configuration, builds in containers, outputs caching, extensions. - MagnusOpera/Terrabuild
github.com
May 10, 2025 at 5:18 PM
In order to implement this feature, I had to implement a lex filter with ability to switch between 2 modes: normal and interpolation. This filter is driven by the lexer which can change mode depending on the parsed tokens (Lexer.fsl).

github.com/MagnusOpera/...
Terrabuild/src/Terrabuild.Lang/FrontEnd.fs at main · MagnusOpera/Terrabuild
Seamless CI/CD tool for building and deploying monorepos. Support HCL-like configuration, builds in containers, outputs caching, extensions. - MagnusOpera/Terrabuild
github.com
May 10, 2025 at 5:18 PM
I't s been a while I wanted to implement interpolated string for Terrabuild but was always feared how to do this due to the strong relationship between parser and lexer. I've finally come to something easy to understand using rules in FsLex. Parser is available here: github.com/MagnusOpera/...
Terrabuild/src/Terrabuild.Lang at main · MagnusOpera/Terrabuild
Seamless CI/CD tool for building and deploying monorepos. Support HCL-like configuration, builds in containers, outputs caching, extensions. - MagnusOpera/Terrabuild
github.com
May 10, 2025 at 5:18 PM
I’m using the F# compiler service (usage here github.com/MagnusOpera/...) - but my understanding is that this requires .net sdk. I’m trying to get rid of sdk to simplify deployments (no runtime, no sdk - just single file app). Maybe I’m wrong and this can be used with such scenario ?
Terrabuild/src/Terrabuild.Scripting/Scripting.fs at main · MagnusOpera/Terrabuild
Seamless CI/CD tool for building and deploying monorepos. Support HCL-like configuration, builds in containers, outputs caching, extensions. - MagnusOpera/Terrabuild
github.com
January 4, 2025 at 10:55 PM