README
¶
R2D2 - The programming Language
R2D2 is a programming language designed for building modular JavaScript applications using a clear, explicit, and structured syntax.
It is written in Go and compiles to JavaScript, embracing a module-based architecture where each module can contain variables and functions. These modules are compiled into native JavaScript objects, making it easy to integrate with existing frontend or backend projects.
R2D2 introduces the concept of pseudo-functions — a special type of function that can only contain calls to other functions. This enforces composability and encourages building code through reusable, isolated behaviors.
The language is built with simplicity and clarity in mind. It avoids hidden behavior and favors explicit patterns, making it approachable for those who want to write structured, maintainable code that compiles directly to JavaScript.
You can start using R2D2 by executing the following command on your system.
Installation
Quick Install (Recommended)
Linux/macOS:
curl -sSL https://raw.githubusercontent.com/ArturC03/r2d2-cli/main/install.sh | bash
Windows (PowerShell):
iwr -useb https://raw.githubusercontent.com/ArturC03/r2d2-cli/main/install.ps1 | iex
This will:
- 🚀 Download the appropriate installer for your platform
- 🎨 Launch a beautiful TUI installer with R2D2 branding
- 📦 Install R2D2 CLI to your system automatically
- 🧹 Clean up temporary files when done
Simple and fast - just one command!
Manual Installation
If you prefer to download manually:
- Go to Releases
- Download
r2d2-installer-{your-os}-{your-arch}.tar.gz - Extract:
tar -xzf r2d2-installer-*.tar.gz - Run:
./r2d2-installer
Requirements
- Linux/macOS:
curlandtar - Windows: PowerShell 3.0+ and Windows 10 1903+ (for tar)
For Windows
Just use WSL, believe me. I'm doing you a favor.
Verification
To verify the installation, try executing r2d2, if it returns something you're good to go!
Hello World
Let's try to make a hello world program!
- Create a
.r2d2file such ashelloworld.r2d2 - Put the following content in the file
module HelloWorld {
export fn main() {
console.log("Hello World!");
}
}
- Now you can choose to compile, run or even convert it into a js file by using on of the following commands
r2d2 build helloworld.r2d2
r2d2 run helloworld.r2d2
r2d2 js helloworld.r2d2
For more information go to the site. Any doughts just make an issue.
Installation Details
The installation process is designed to be simple and automatic:
- Platform Detection: Automatically detects your OS and architecture
- Download: Gets the right installer binary from GitHub releases
- TUI Installer: Launches a beautiful terminal interface
- Installation: Installs R2D2 CLI and dependencies automatically
- Cleanup: Removes temporary files
TUI Installer Features
- 🎨 R2D2 Branding: Purple R, Green D, adaptive colors
- 📱 Responsive: Adapts to any terminal size
- 🔄 Progress Tracking: Real-time installation progress
- ✨ Error Handling: Clear messages and troubleshooting
Supported Platforms
- Linux: x86_64, ARM64, i386
- macOS: Intel and Apple Silicon
- Windows: x86_64, i386
- FreeBSD: x86_64
What Gets Installed
The installer will:
- Install Git, Go, and Deno if needed
- Build and install the R2D2 CLI
- Add R2D2 to your system PATH
- Verify the installation works