Skip to content

0.0.1-alpha

Pre-release
Pre-release

Choose a tag to compare

@riochr17 riochr17 released this 30 Jun 13:51

Pre-release v0.0.1-alpha

We are excited to announce the initial pre-release (v0.0.1-alpha) of the Swan L4 CLI (@ssww.one/l4cli).

Swan L4 CLI is a command-line interpreter and runner for the Swan L4 DSL, a domain-specific language designed specifically for orchestrating LLM-driven agents, interactive terminal prompts, conditional routing, and automated file-system operations.

πŸš€ Key Features

  • LLM Core Primitives: Native execution of LLM-driven prompts via THINK and SAY THINK statements, supporting OpenAI-compatible endpoints.
  • Control Flow & Loops: Complete control flow execution including conditionals (IF/ELSE), execution loops (LOOP, CONTINUE LOOP, EXIT LOOP), and termination (EXIT).
  • Sub-Agent Orchestration: Easily spawn nested sub-agents (ASK agentName argument) to delegate complex tasks. The CLI visually renders sub-agent levels in nested tree boxes in your terminal.
  • Context & Variable Pipeline: Dynamic variable storage and string/context template interpolation (e.g., {Context} or {myVariable}).
  • I/O & Integration:
    • Native file-system reads and writes (READ, WRITE).
    • Custom HTTP/REST macro API calls (CALL_ macros declared in #DEFINE).
    • User interaction prompts (LISTEN).
  • Multi-Language Error Diagnostics: Built-in support for English and Indonesian error warnings for syntax or tokenizer validation.

πŸ“¦ Standalone Executables

This release includes pre-compiled, self-contained standalone binaries powered by Bun:

  • 🐧 Linux: l4cli-linux-x64, l4cli-linux-arm64
  • 🍏 macOS: l4cli-macos-x64, l4cli-macos-arm64
  • πŸͺŸ Windows: l4cli-windows-x64.exe

You can run these directly on your system without requiring Node.js or Bun installed.

βš™οΈ Configuration

Configure the execution environment by exporting the following variables or placing them in a local .env file:

OPENAI_BASEURL=https://api.openai.com/v1
OPENAI_APIKEY=your-api-key
OPENAI_MODEL=gpt-4o-mini

# Optional: Locale for error reporting ('id' or 'en'). Defaults to 'id'.
LOCALE=en

πŸ“– Quick Example (greeting.l4)

TITLE Greeting Agent

SAY Welcome to the Swan L4 CLI!
LISTEN
THINK Extract the user's name from this input.
SAY Hello {Context}, how can I help you today?

Run it using the CLI binary:

l4cli greeting.l4

For detailed language specification, grammar, tokenizer, and core parsing details, check out the core Swan L4 repository.