Run is a Bash script that acts as a basic abstraction layer for compiling, executing, and interpreting source files across multiple programming languages. It simplifies terminal workflows by unifying commands and automatically detecting common project structures, while acknowledging the trade-offs and limitations of abstraction.
git clone https://github.com/EduHoff/run.git
cd run
mkdir -p ~/.local/bin
mkdir -p ~/.local/share/man/man1
mv run ~/.local/bin/
mv run.1 ~/.local/share/man/man1/
cd ..
rm -rf run/
run [OPTIONS] <file_or_java_directory>
| Option | Description |
|---|---|
run <file> |
Compile and execute (default behavior) |
run -c <file> |
Compile only |
run -e <file> |
Execute only (already compiled) |
run -i <file> |
Interpret only (for script languages) |
--version |
Show script version |
--help |
Show a help message |
| Option | Description |
|---|---|
run --java <dir> |
Compile and run Java project |
run -c --java <dir> |
Compile Java project only |
run -e --java <dir> |
Run compiled Java project |
run -i --java <dir> |
Run classes directly (no JAR) |
| Language | Compiler/Interpreter | Project Detection |
|---|---|---|
| C | gcc | Single file |
| C++ | g++ | Single file |
| C# | dotnet | .csproj |
| F# | dotnet | .fsproj, .fsx |
| Java | javac/java | Manual, Maven, Gradle |
| Kotlin | kotlinc/java | Single file, .kt / .kts |
| Groovy | groovyc/groovy | Single file |
| Swift | swift/swiftc | Single file |
| Go | go | Single file |
| Rust | rustc/cargo | Single file, Cargo.toml |
| Haskell | ghc/runhaskell | Single file |
| TypeScript | tsc/node | Single file |
| JavaScript | node | Single file |
| Python | python3 | Single file |
| Ruby | ruby | Single file |
| Lua | lua | Single file |
| PHP | php | Single file |
| Perl | perl | Single file |
| R | Rscript | Single file |
| Julia | julia | Single file |
| Zig | zig | Single file |
| Dart | dart | Single file |
| Fortran | gfortran | Single file |
| Cobol | cobc | Single file |
| Assembly (x86/Linux) | nasm/gcc/ld | Single file |
| Shell | bash | Single file |
| Code | Meaning |
|---|---|
0 |
Success |
1 |
General error (compilation failed, file not found, etc.) |
2 |
Usage error (invalid options or arguments) |