0.0.1-alpha
Pre-releasePre-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
THINKandSAY THINKstatements, 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).
- Native file-system reads and writes (
- 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.l4For detailed language specification, grammar, tokenizer, and core parsing details, check out the core Swan L4 repository.