Logos / Docs

Introduction to Logos

Logos (from Greek, meaning word, reason, or logic) is a scripting language designed to be read and understood, not deciphered.

It's what you reach for when Bash becomes unreadable after line three. A CLI-first language built for the kind of work Bash handles poorly: readable logic, proper error handling, and code you can come back to a week later and still understand.

What makes Logos different?

  • Readable syntax — C-like syntax that reads like prose, not line noise
  • Sane error handling — Result tables instead of exceptions. Check .ok, handle .error
  • Batteries included — File I/O, HTTP, JSON, shell execution built in with no imports
  • Concurrency — Simple spawn blocks for parallel execution
  • Compile to binarylgs build script.lgs produces a standalone executable
  • Embeddable — Integrate into Go applications like Lua

Who is it for?

Logos is built for:

  • Developers writing automation scripts that outgrow Bash
  • CLI tools that need readable, maintainable code
  • Projects requiring an embeddable scripting language
  • Anyone tired of deciphering their own scripts

Quick Example

Here's a taste of Logos:

example.lgs
// Read a config file
let res = fileRead("config.json")
if !res.ok {
    print(colorRed("Error: " + res.error))
    exit(1)
}

let config = parseJson(res.value)
print("App: " + config["name"])

// Run tasks concurrently
spawn for task in tasks {
    print("Processing: " + task)
}

CLI Usage

lgs script.lgs        # Run a script
lgs fmt script.lgs    # Format code
lgs build script.lgs  # Compile to binary
lgs                   # Start the REPL

Getting Started

Ready to dive in? Head to the Installation guide to set up Logos, then explore the Syntax & Types reference to learn the language.