Skip to content

Getting started

Install

uv add hellig
pip install hellig
pipx install hellig

Verify the install:

hg version
# hellig 0.0.1

Your first interactive session

Run hg with no arguments to open the REPL:

$ hg
hellig 0.0.1 — natural language programming.
Type your request, or use directives:
  : text          say literal text
  ? question      ask the user (use '? q -> var' to name the variable)
  @agent prompt   call a named agent
  !tool k=v       invoke a tool
Commands: /help  /history  /scope  /reset  /exit

hg » ? What's your name? -> name
What's your name? › Hang
hg » : Hi {name}, welcome to Hellig!
Hi Hang, welcome to Hellig!
hg » /scope
name = 'Hang'
hg » /exit

Each line you type becomes one turn. Inside a turn the compiler emits a small program; the runtime executes it, possibly asking you follow-up questions. Scope persists across turns, so later turns can reference earlier answers.

One-shot runs

Pipe a multi-line program directly:

hg run --show-program '? What city are you in? -> city
: The forecast for {city}: sunny.'

--show-program prints the compiled instructions before running them — handy when you want to see what the compiler did.

Compile without executing

hg compile '? topic -> t
@writer draft an intro about {t} -> draft
: Draft ready ({{ len(draft) }} chars).'

This is the fastest way to understand the stub compiler syntax.

Next steps