No more running 3 commands every time you want to test code. qrun auto-detects your file type and handles the full pipeline — compile → run, or compile → flash — in one shot. If anything fails, it stops immediately and shows you exactly what went wrong.
- Auto-detection — detects
.c,.cpp,.asm,.sautomatically - Native C/C++ — compiles with
gcc/g++and runs instantly - Native ASM — assembles NASM x86-64 and runs via
ld - AVR C/C++ — compiles with
avr-gccand flashes viaavrdude - AVR ASM — assembles with
avr-asand flashes to board - Smart error handling — stops on any failure and shows the exact error
- AVR auto-detect — finds your serial port automatically (no need to remember
/dev/ttyUSB0) - Memory report — shows AVR flash/RAM usage after compilation
- Clean output — color-coded steps: ✔ green for success, ✖ red for errors
yay -S qruncurl -fsSL https://raw.githubusercontent.com/VinayakGhai/qrun/main/install.sh | bashcurl -fsSL https://raw.githubusercontent.com/VinayakGhai/qrun/main/install.sh | bashcurl -fsSL https://raw.githubusercontent.com/VinayakGhai/qrun/main/qrun -o ~/.local/bin/qrun
chmod +x ~/.local/bin/qruncurl -fsSL https://raw.githubusercontent.com/VinayakGhai/qrun/main/install.sh | bashqrun <file> [options]
qrun hello.c # compile hello.c + run it
qrun main.cpp # C++ works too
qrun hello.c -Wall # enable all warnings
qrun hello.c --no-run # compile only, don't runqrun hello.asm # assemble + link + runqrun blink.c -avr # compile + auto-detect port + flash
qrun blink.c -avr -p /dev/ttyUSB0 # specify port
qrun blink.c -avr -mcu atmega2560 # Arduino Mega
qrun blink.c -avr -mcu attiny85 # ATtiny85
qrun blink.asm -avr # AVR Assembly
qrun blink.c -avr --no-run # compile only, save .hex file| Flag | Description | Default |
|---|---|---|
-avr |
AVR mode: compile + flash | off |
-p <port> |
AVR serial port | auto-detect |
-mcu <mcu> |
AVR MCU target | atmega328p |
-baud <baud> |
Upload baud rate | 115200 |
-prog <prog> |
avrdude programmer | arduino |
-std <std> |
C standard (c11, c99, gnu11) |
c11 |
-Wall |
Enable all warnings | off |
--no-run |
Compile only | off |
-o <name> |
Output binary name | auto |
--version |
Show version | — |
--help |
Show help | — |
// hello.c
#include <stdio.h>
int main(void) {
printf("Hello, World!\n");
return 0;
}$ qrun hello.c
────────────────────────────────────────
qrun v1.0.0 — Quick Run
────────────────────────────────────────
◆ File : hello.c
◆ Type : c
◆ Target : Native (x86_64)
▸ Compiling hello.c → native binary
✔ Compiled successfully
── Output ────────────────────────────────
Hello, World!
─────────────────────────────────────────
✔ Program exited cleanly (code 0)
✔ Done! ✨
// blink.c
#define F_CPU 16000000UL
#include <avr/io.h>
#include <util/delay.h>
int main(void) {
DDRB |= (1 << PB5); // pin 13 = output
while(1) {
PORTB ^= (1 << PB5);
_delay_ms(500);
}
}$ qrun blink.c -avr
◆ Target : AVR (atmega328p)
▸ Compiling blink.c for AVR (atmega328p)
✔ Compiled → blink.elf
▸ Converting to HEX
✔ HEX ready
Program: 180 bytes (0.5% Full)
▸ Flashing → /dev/ttyUSB0 (atmega328p, arduino, 115200 baud)
✔ Flashed successfully! Board is running your code.
$ qrun bad.c
▸ Compiling bad.c → native binary
── Compiler Output ──────────────────────
bad.c:3:32: error: expected ';' before 'return'
─────────────────────────────────────────
✖ ERROR: Compilation failed — fix the errors above and try again
| Feature | Dependency | Install (Arch) |
|---|---|---|
| Native C/C++ | gcc |
pre-installed / pacman -S gcc |
| Native ASM | nasm, binutils |
pacman -S nasm binutils |
| AVR C/C++ | avr-gcc, avr-libc |
pacman -S avr-gcc avr-libc |
| AVR Flash | avrdude |
pacman -S avrdude |
Fedora/RHEL:
dnf install gcc nasm binutils avr-gcc avr-libc avrdudemacOS:
brew install nasm avr-gcc avrdudeIf you get Permission denied on /dev/ttyUSB0, add yourself to the uucp group:
sudo usermod -aG uucp $USER
# then log out and back in (or reboot)MIT — see LICENSE
Made with ❤️ for developers who just want to run their code.
