https://github.com/raunaksingh9800/runner
C++ command-line tool compiler
https://github.com/raunaksingh9800/runner
bash-script command-line command-line-tool cpp11 shell-script
Last synced: 8 months ago
JSON representation
C++ command-line tool compiler
- Host: GitHub
- URL: https://github.com/raunaksingh9800/runner
- Owner: raunaksingh9800
- License: cc0-1.0
- Created: 2024-09-09T16:10:04.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-29T19:50:24.000Z (about 1 year ago)
- Last Synced: 2025-04-05T18:16:10.618Z (8 months ago)
- Topics: bash-script, command-line, command-line-tool, cpp11, shell-script
- Language: C++
- Homepage:
- Size: 841 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README

# RUNNER
Developed a C++ command-line tool that compiles and runs system commands from a `commands.txt` file 📄, handling command parsing, file I/O, and system calls with error handling 🚨. Integrated features for command listing 📝, initialization ⚙️, and efficient data processing using maps and vectors 🔄.
## Build 🛠️
To Build this project run
```
git clone https://github.com/raunaksingh9800/RUNNER.git
```
#### macOS / Linux 🍏🐧
```bash
g++ -std=c++11 main.cpp ./global_data/*.cpp ./__B2/*.cpp ./__file_handler/*.cpp ./__sys/*.cpp -o ./build/runner
```
#### Windows 🖥️
- Install MinGW or MSYS2
- Once installed, open the Command Prompt or MSYS2 Shell and navigate to the directory where your C++ file is located.
``` bash
g++ -std=c++11 main.cpp ./global_data/*.cpp ./__B2/*.cpp ./__file_handler/*.cpp ./__sys/*.cpp -o ./build/runner.exe
```
- Using Microsoft Visual Studio
``` bash
cl /EHsc main.cpp
```
## Run ▶️
MacOs / Linux 🍏🐧
```bash
./build/runner
```
Windows 🖥️
```bash
./build/runner.exe
```
## Syntax 💡
| Name | Symbol | Description | Example |
| :-------- | :------- | :------------------------- | :---------------- |
| Heading | `->` | This is like naming your command | ``` -> Run the Program ``` |
| Argument | `>` | This is your command's unique identifiers you will use this as an argument in your terminal | ``` > run ``` |
| command | `$` | You will Write your command to run in the console Here | ``` $ python main.py ``` |
####
```
-> Run Test
> test
$ ./test
###Ignored Lines
-> Push To Prod
> push
$ cp ./build ./prod
Ignored Lines
-> Run Build
> build
$ g++ main.cpp -o main
```
## Argument List 🔧
### Initialise 🆕
```bash
runner -init
```
| Name | Argument | Description |
| :-------- | :------- | :------------------------- |
| Initialise | `-init` | Makes a file called `commands.txt` . Where you can add your commands|
OUTPUT
```bash
Created commands.txt succesfully 🎉
SYNTAX:
->
>
$
EXAMPLE:
-> Your First Command
> first
$ echo hello
Copy the Above 👆 Code into commands.txt
Now Run : runner first
```
### List 📃
```bash
runner -list
```
| Name | Argument | Description |
| :-------- | :------- | :------------------------- |
| List | `-list` | lists all the commands stored in `commands.txt`|
OUTPUT
```bash
⏐⎯⎯⎯ Build the project
⏐⎯⎯ build
⏐⎯⎯⎯ clear the terminal
⏐⎯⎯ cls
⏐⎯⎯⎯ push to prod
⏐⎯⎯ push
⏐⎯⎯⎯ run the project
⏐⎯⎯ run
⏐⎯⎯⎯ run test
```
## Example 📘
#### File Structure
```
root/
│
├── main.py
│
├── commands.txt
```
#### main.py
```python
print("Hello World")
```
#### commands.txt
```
-> Run the Program
> run
$ python main.py
```
#### Your input in Terminal / Console
```
➜ runner run
```
#### Output
```
RUNNER
▶ V 1.0
Run the Program
Your Command:python main.py
Hello World
```
## Add To Path 🔗
- macOS : [YouTube Tutorial](https://youtu.be/2J58Pc2ZOAQ?si=zcRetl2UBtrtdrUo) 🍏
- Linux : [YouTube Tutorial](https://youtu.be/jIunQSnzs1Y?si=dhZDDfJejSVPGAP1) 🐧
- Windows : [YouTube Tutorial](https://youtu.be/pGRw1bgb1gU?si=EXLIyUoTYgxdq_tY) 🖥️
## Tech Stack
**C++ 11 with only Standard library**