Need help with jcubic/gaiman?

There is 1 helper available for jcubic/gaiman on our platform. If you're new to LTH, please see our FAQ for more information on what it is we do.

Qualified Helpers
owner From $50 / 30 mins
Get help from jcubic


Gaiman Engine and Programming Language

Gaiman: Text based adventure games engine and programming language

npm Build and test Coverage Status LICENSE GPLv3

Gaiman: Storytelling Text Based Game Engine and Programming Language

Main part of Gaiman is a minimalist, Ruby inspired, programming language. The main purpose of it is to help creating Text Adventure Games. But it can also be used to create any interactive CLI applications (Web Based Terminal applications). It supports browser based CLI applications and in the future also native command line.


First, you need to install NodeJS. After you're done, you should open terminal and use npm command (that is included with Node).

npm install -g gaiman@beta


First, create file with your Gaiman program (you can use one of the examples), and then run:

gaiman -o directory

This will compile your source file and generate directory/index.html and directory/index.js files. You can open the generated HTML file in the browser and run the game.

When output files are generated you can use this command to run live Web server. This is required to run the example. It's like running a website on the internet.

cd directory
npx live-server

This should open index.html inside your browser. When your app is ready you can publish it with:


See Reference Manual on Wiki.


This is Hello world Gaiman DSL example:

echo get ""
echo* "Hi, What is your name?", 50 # Typing animation with 50ms delay
let name = ask "name? "
echo "Hello $name, nice to meet you."

More advanced example:

if cookie.visited then
    if cookie.user then
        let user = cookie.user
        echo "Hello $user, welcome back"
        ask_details("Welcome back stranger")
    cookie.visited = true
    ask_details("Welcome stranger")

def ask_details(msg)
    echo msg
    echo "Do you want me to contact you with updates?"
    let confirm = ask "yes/no: ", lambda(answer)
        return answer =~ /^(y|yes|n|no)$/i
    if confirm =~ /y|yes/i then
        echo "what is your name?"
        let name = ask "name: ", lambda(name)
            let valid = name != ""
            if not valid then
                echo "You need to type something"
            return valid
        cookie.user = name
        let email = ask "email: ", lambda(email)
            let valid = email =~ /^.+@.+\..+$/
            if not valid then
                echo "wrong email"
            return valid
        end = email
        let response = post "/register", { "name" => name, "email" => email }
        if response then
            echo "Welcome $user. You're successfully registered"
        echo "Ok, as you wish. Bye"

More examples in examples directory

See Reference Manual for details about the features

Live Demo

See Gaiman language Playground

Live Edit of Gaiman Code: Gaiman programming language Playground Demo Session

Live edit of style Gaiman programming language Playground Demo Session


See Wiki TODO & Roadmap.

Name and Origin

Name came from Neil Gaiman, Author of novels, comic books, graphic novels and films. Great storyteller.

You can read about the origin of the language in the beginning of the article:


Logo use:


Released under GNU GPL v3 or later Copyright (c) 2021-2022 Jakub T. Jankiewicz

Our Mission

We want to make open source more sustainable. The entire platform was born from this and everything we do is in aid of this.

Interesting Articles

Thank you for checking out LiveTechHelper |
2024 © lth-dev incorporated