Twine is an open source tool for creating interactive text based games. Twine is an open source project, released on GitHub, under the GPL license. It is a combination of story authoring tools and logic/scripting for adding interactivity to your creations. Twine is available for Windows, Mac and Linux.
Twine is described as:
Twine is an open-source tool for telling interactive, nonlinear stories.
Twine publishes directly to HTML, so you can post your work nearly anywhere. Anything you create with it is completely free to use any way you like, including for commercial purposes.
Twine has to major scripting options available, Harlowe, the out of the box experience, as well as SugarCube. Check out this article on reddit that breaks down the differences between Harlowe and SugarCube out of the box.
There are also tools for importing Twine projects into various game engines. Cradle is one such option for Unity developers while Twison is an option for the Godot game engine. Twine published documents are simply html files. If you want to get started with example projects there are a large number of Twine stories hosted on the Interactive Fiction archive. You can learn more about Twine and see it in action in the video below.