Open source · MIT licensed

An embeddable Ruby-like language for Go. Safe by default, easy for AI to write.

Vibescript is a small, readable scripting language that embeds in your Go app. Users and AI agents write the scripts; the host decides exactly what they can touch.

204 examples run live in your browser

late_fee.vibe v1.0.0-rc2
def late_fee(overdue: duration) -> money
  if overdue <= 3.days
    money("0.00 USD")
  elsif overdue <= 14.days
    money("5.00 USD")
  else
    money("15.00 USD")
  end
end

Language

Small surface. Sharp primitives.

Everything in Vibescript is designed to be read at a glance — by your team, and by the models writing it.

Gradual typing
Optional annotations, nullable ?, keyword and positional args, checked return types.
typing.vibe
def shipping_quote(speed, subtotal: money) -> hash
  fee = shipping_fee(speed, subtotal)
  transit = transit_time(speed)

  {
    speed: speed.name,
    fee: fee,
    total: subtotal + fee,
    transit: transit.iso8601
  }
end
Enums
First-class enums with member access, symbol comparison, and cross-enum equality.
enums.vibe
enum AccountStanding
  Current
  Grace
  Delinquent
end

def standing_for(overdue: duration) -> AccountStanding
  if overdue <= 3.days
    AccountStanding::Current
  elsif overdue <= 15.days
    AccountStanding::Grace
  else
    AccountStanding::Delinquent
  end
end
Duration & money primitives
Built-in literals, arithmetic, comparisons, and formatting for time and currency.
primitives.vibe
def transit_time(speed: ShippingSpeed) -> duration
  if speed == ShippingSpeed::Economy
    5.days
  elsif speed == ShippingSpeed::Priority
    2.days
  else
    6.hours
  end
end

def net_after_fee(cents)
  gross = money_cents(cents, "USD")
  fee = money("1.75 USD")
  gross - fee
end
Ruby-like syntax
Blocks, ranges, zero-paren defs, yield, and symbol hashes — familiar and readable.
blocks.vibe
def benchmark
  start = Time.now
  result = yield
  elapsed = Time.now - start
  { result: result, elapsed: elapsed }
end

def transform_keys(hash)
  result = {}
  hash.keys.each do |key|
    new_key = yield(key)
    result[new_key] = hash[key]
  end
  result
end

Designed for AI

Easy to read. Easy for AI to vibe code.

As vibe coding spreads, most products need limits on what users can build. Instead of a blank canvas, Vibescript hands them an opinionated set of primitives that combine into predictable, safe applications.

Think of it less like traditional software development and more like HyperCard: flexible, but within bounds. The Ruby-like syntax mirrors patterns familiar to language models, making it a natural target for AI-generated code.

Vibescript embeds directly into any Go application. Scripts expose functions callable from host code, and the host controls exactly what capabilities each script can access.