/run

Universal multi-language runner and smart REPL written in Rust.

Primary LanguageRustApache License 2.0Apache-2.0

run

Polyglot command runner & smart REPL that lets you script, compile, and iterate in 25+ languages without touching another CLI.

Release pipeline Latest release Downloads crates.io License

Built in Rust for developers who live in multiple runtimes. run gives you a consistent CLI, persistent REPLs, and batteries-included examples for your favorite languages.


Table of contents

Quickstart

# Show build metadata for the current binary
run --version

# Execute a snippet explicitly
run --lang python --code "print('hello, polyglot world!')"

# Let run detect language from the file extension
run examples/go/hello/main.go

# Drop into the interactive REPL (type :help inside)
run

# Pipe stdin (here: JSON) into Node.js
echo '{"name":"Ada"}' | run js --code "const data = JSON.parse(require('fs').readFileSync(0, 'utf8')); console.log(`hi ${data.name}`)"

Installation

All release assets are published on the GitHub Releases page, including macOS builds for both Apple Silicon (arm64) and Intel (x86_64). Pick the method that fits your platform:

Cargo (Rust)
cargo install run-kit

Installs the run binary from the run-kit crate. Updating? Run cargo install run-kit --force.

Homebrew (macOS)
brew install --formula https://github.com/Esubaalew/run/releases/latest/download/homebrew-run.rb

This formula is published as a standalone file on each release; it isn’t part of the default Homebrew taps. Installing by name (brew install homebrew-run) will fail—always point Homebrew to the release URL above (or download the file and run brew install ./homebrew-run.rb).

Once the latest release artifacts are published, Homebrew automatically selects the correct macOS binary for your CPU (Intel or Apple Silicon) based on this formula.

Debian / Ubuntu
curl -LO https://github.com/Esubaalew/run/releases/latest/download/run-deb.sha256
DEB_FILE=$(awk '{print $2}' run-deb.sha256)
curl -LO "https://github.com/Esubaalew/run/releases/latest/download/${DEB_FILE}"
sha256sum --check run-deb.sha256
sudo apt install "./${DEB_FILE}"
Windows (Scoop)
scoop install https://github.com/Esubaalew/run/releases/latest/download/run-scoop.json
Install script (macOS / Linux)
curl -fsSLO https://raw.githubusercontent.com/Esubaalew/run/master/scripts/install.sh
chmod +x install.sh
./install.sh --add-path           # optional: append ~/.local/bin to PATH

Pass --version v0.2.0, --prefix /usr/local/bin, or --repo yourname/run to customize the install.

Download the archive directly
  1. Grab the tar.gz (macOS/Linux) or zip (Windows) from the latest release.
  2. Extract it and copy run / run.exe onto your PATH.
  3. Optionally execute the bundled install.sh to handle the copy for you.
Build from source
cargo install run-kit

The project targets Rust 1.70+. Installing from crates.io gives you the same run binary that CI publishes; use --force when upgrading to a newer release.

How it works

run shells out to real toolchains under the hood. Each LanguageEngine implements a small trait that knows how to:

  1. Detect whether the toolchain is available (e.g. python3, go, rustc).
  2. Prepare a temporary workspace (compilation for compiled languages, transient scripts for interpreters).
  3. Execute snippets, files, or stdin streams and surface stdout/stderr consistently.
  4. Manage session state for the interactive REPL (persistent modules, stateful scripts, or regenerated translation units).

This architecture keeps the core lightweight while making it easy to add new runtimes or swap implementations.

Supported languages

run supports 25+ languages:

Category Languages & aliases Toolchain expectations
Scripting & shells Bash (bash), Python (py, python), Ruby (rb, ruby), PHP (php), Perl (perl), Lua (lua), R (r), Elixir (ex, elixir) Matching interpreter on PATH
Web & typed scripting JavaScript (js, node), TypeScript (ts, deno), Dart (dart), Swift (swift), Kotlin (kt, kotlin) node, deno, dart, swift, kotlinc + JRE
Systems & compiled C (c), C++ (cpp, cxx), Rust (rs, rust), Go (go), Zig (zig), Nim (nim), Haskell (hs, haskell), Crystal (cr, crystal), C# (cs, csharp), Java (java), Julia (jl, julia) Respective compiler / toolchain

Examples

Real programs live under the examples/ tree—each language has a hello and a progress scenario. The headers document expected output so you can diff your toolchain.

run examples/rust/hello.rs
run examples/typescript/progress.ts
run examples/python/counter.py

REPL

Being inside REPL we can use the ff commands

Command Purpose
:help List available meta commands
:languages Show detected engines and status
:lang <id> or :<alias> Switch the active language (:py, :go, …)
:detect on/off/toggle Control snippet language auto-detection
:load path/to/file Execute a file inside the current session
:reset Clear the accumulated session state
:exit / :quit Leave the REPL

License

Apache 2.0. See LICENSE for details.


Built with ❤️ in Rust. If run unblocks your workflow, star the repo and share it with other polyglot hackers.