Skip to content

HypnoScriptThe hypnotic programming language

Modern scripting with hypnotic syntax and a solid Rust foundation

HypnoScript Logo

Quick Start

Installation

bash
# Clone repository
git clone https://github.com/Kink-Development-Group/hyp-runtime.git
cd hyp-runtime

# Build HypnoScript CLI in release mode
cargo build -p hypnoscript-cli --release

# Optionally install globally (binary is called hypnoscript)
cargo install --path hypnoscript-cli

Pre-built artifacts (Windows, macOS, Linux) can also be found in the release/ folder and under GitHub Releases.

Your First HypnoScript Program

hyp
Focus {
    entrance {
        observe "Welcome to HypnoScript!";
    }

    induce name: string = "Developer";
    observe "Hello, " + name + "!";

    induce numbers: number[] = [1, 2, 3, 4, 5];
    induce sum: number = ArraySum(numbers);
    observe "Sum: " + ToString(sum);

    if (sum lookAtTheWatch 10) deepFocus {
      observe "The memory is now becoming more intense.";
    }
}

Running

bash
hypnoscript exec my_script.hyp

Debugging

bash
# Interactive debug mode with breakpoints
hypnoscript exec my_script.hyp --debug --breakpoints 10,25

Why HypnoScript?

HypnoScript combines the elegance of modern programming languages with a unique, hypnotically inspired syntax. The Rust implementation provides you with:

  • 🎯 Unique Syntax – Focus/Relax blocks, hypnotic operators like youAreFeelingVerySleepy (==) or underMyControl (&&).
  • 🦾 Rust Performance – No external runtime dependencies, fast binaries and optional WASM export.
  • 🔒 Static Safety – The type checker validates variables, functions, sessions as well as accesses to static and private members.
  • 🧰 Standard Library – Math, strings, arrays, files, statistics, validation, system and time functions are directly integrated.
  • 🧪 Development Workflow – The CLI supports lexing, parsing, type checking and program execution in the same tool.
  • 📄 Examples & Tests.hyp examples and regression tests in the repository demonstrate real language features.

Community & Support

License

HypnoScript is open source and available under the MIT License.

Released under the MIT License.