CodeRunEz is a Bash script designed to streamline directory navigation within the Documents folder. It identifies Next.js or React projects and launches their development servers, while it initiates the Live Server for rapid development for vanilla HTML-CSS-JS files.
This implies the use of the grep command and jq which is a lightweight and flexible command-line JSON processor, that combines to classify the project. The searching process resembles linear search as we are using the grep command to search for the directory.
Here're some of the project's best features:- Fast
- Customizability
- Search Functionality
- Custom Command for Opening Directories
- Support for Next.js and React Projects
- Support for HTML/CSS/JS Projects
- This script is written in Shell so it will run only on the system that has the Bash interpreter installed. I have tested it and made it on a Linux system (Fedora) but it may also run on MacOS and Unix-like systems, for Windows you can run Bash scripts using the Windows Subsystem for Linux (WSL) or using third-party tools like Git Bash or Cygwin.
- You have super user permissions
- VS code installed
- Live server installed
If not, install it using (npm required)
npm install -g live-server
1. Navigate to bin directory
cd /bin
2. Create a new script file named start (or any other name you prefer)
sudo touch start
3. Add the contents of the start.sh file to the file created
sudo vim start
4. Make the file executable
chmod +x start
5. Add ~/bin to PATH so that you can execute the script from anywhere in the terminal
echo 'export PATH="$HOME/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
6. Ready for use, replace the dir_name with the directory you want to Search and Run
start dir_name
- Limited platform support
- Limited Project Type Detection
- Assumption that the project directories are stored in the documents folder
- File naming issue, as there can be more than one file with the same name in different directories
- Potential Security Risks as running a script from an unknown source is dangerous
- Shell