Skip to content

RCL Packages

The RCL ecosystem consists of several modular packages that work together to provide a complete language toolchain. Each package has a specific responsibility and can be used independently or as part of the full suite.

For Users: Install the CLI globally to start compiling RCL files:

Terminal window
bun add -g @rcs-lang/cli
rcl compile my-agent.rcl

For Developers: Install packages for building RCL tools:

Terminal window
bun add @rcs-lang/parser @rcs-lang/compiler @rcs-lang/core

For IDE Integration: Use the language service for editor features:

Terminal window
bun add @rcs-lang/language-service

Core infrastructure that everything else builds on

PackagePurposeWhen to Use
@rcs-lang/coreShared types, interfaces, and abstractionsBuilding any RCL tool - required foundation
@rcs-lang/astType-safe AST definitions and utilitiesWorking with parsed RCL syntax trees
@rcs-lang/typesRCS Business Messaging type definitionsWorking with RBM APIs and message formats
@rcs-lang/file-systemCross-platform file operationsBuilding tools that read/write files

Parsing and compilation pipeline

PackagePurposeWhen to Use
@rcs-lang/parserANTLR4-based RCL parserConverting RCL source code to AST
@rcs-lang/compilerModern compilation pipelineTransforming AST to executable formats
@rcs-lang/validationComprehensive validation systemChecking RCL code for errors/warnings

CLI and IDE integration

PackagePurposeWhen to Use
@rcs-lang/cliCommand-line compilerBuilding RCS agents from terminal
@rcs-lang/language-serviceIDE features (completion, hover, etc.)Building editor extensions

Conversation execution engine

PackagePurposeWhen to Use
@rcs-lang/csmLightweight conversation state machineRunning RCS agents in production

📝 Parse RCL code

import { AntlrRclParser } from '@rcs-lang/parser';
// ✅ Use @rcs-lang/parser

🔨 Compile RCL to JSON/JavaScript

import { RCLCompiler } from '@rcs-lang/compiler';
// ✅ Use @rcs-lang/compiler

💻 Add RCL support to my editor

import { LanguageService } from '@rcs-lang/language-service';
// ✅ Use @rcs-lang/language-service

🚀 Run RCS agents in production

import { ConversationalAgent } from '@rcs-lang/csm';
// ✅ Use @rcs-lang/csm

🧪 Build custom tooling

import { Result, IFileSystem } from '@rcs-lang/core';
// ✅ Start with @rcs-lang/core

The RCL ecosystem follows a layered architecture:

graph TB
subgraph "🛠️ Developer Tools"
CLI[CLI Tool]
LS[Language Service]
end
subgraph "⚙️ Language Processing"
Parser[Parser]
Compiler[Compiler]
Validation[Validation]
end
subgraph "🏗️ Foundation"
AST[AST Types]
Core[Core Interfaces]
Types[RBM Types]
FileSystem[File System]
end
subgraph "🤖 Runtime"
CSM[Conversation State Machine]
end
CLI --> Compiler
CLI --> Parser
CLI --> FileSystem
LS --> Parser
LS --> Compiler
LS --> Validation
Compiler --> AST
Compiler --> Core
Compiler --> Parser
Compiler --> Validation
Parser --> AST
Parser --> Core
Validation --> Core
Validation --> Parser
CSM --> Core
FileSystem --> Core
  1. Source CodeParserAST
  2. ASTValidationDiagnostics
  3. ASTCompilerJSON/JavaScript
  4. JSONCSMRunning Agent

  1. Start with @rcs-lang/cli - compile your first agent
  2. Learn @rcs-lang/csm - run your agent
  1. Understand @rcs-lang/core - core concepts
  2. Use @rcs-lang/parser - parse RCL code
  3. Explore @rcs-lang/ast - work with syntax trees
  1. Master @rcs-lang/compiler - compilation pipeline
  2. Study @rcs-lang/validation - validation system
  3. Dive into @rcs-lang/language-service - IDE features

Terminal window
# Install CLI globally for terminal usage
bun add -g @rcs-lang/cli
# Verify installation
rcl --version
Terminal window
# Core packages for building tools
bun add @rcs-lang/core @rcs-lang/ast @rcs-lang/parser
# Full compilation stack
bun add @rcs-lang/compiler @rcs-lang/validation @rcs-lang/file-system
# Runtime for production agents
bun add @rcs-lang/csm
# IDE integration
bun add @rcs-lang/language-service

All RCL packages follow synchronized versioning - when any package is updated, all packages are bumped to the same version number. This ensures compatibility across the ecosystem.

Current version: 0.2.1


All packages are part of a monorepo managed with Moon and use Bun for package management:

Terminal window
# Clone the repository
git clone https://github.com/rcs-lang/rcl.git
cd rcl
# Install dependencies
bun install
# Build all packages
moon run :build
# Run tests
moon run :test
# Watch mode for development
moon run :dev
  • Build System: Moon (task orchestration)
  • Package Manager: Bun (fast, modern)
  • Runtime: Node.js AND Web browser support
  • Grammar: ANTLR4 (replaced Tree-sitter)

We welcome contributions! Each package accepts:

  • Bug reports - Help us improve stability
  • Feature requests - Guide our roadmap
  • Documentation - Make RCL more accessible
  • Code contributions - Implement features and fixes

See the main repository for detailed contribution guidelines.