Launch Frontend And Backend With Terminal Menu

by Jule 47 views
Launch Frontend And Backend With Terminal Menu

Creating a lean CLI launcher for dev teams isn’t just about speed - it’s about control and calm in the chaos of startup life. The right script turns a stressful boot-up into a calm command: launch front, launch back, launch both, or shut down clean. Here’s how to build a terminal-based launcher that stays lightweight, intuitive, and safe. nnThe core script runs a single terminal window with a clean menu that reads numeric input to launch or close services. Each service - frontend and backend - runs in its own terminal tab, letting developers switch focus without clutter. Users close the window to exit; closing both tabs closes every terminal. No old windows stuck open - just fresh starts.nnBehind the interface, the script uses simple shell logic: a menu loop prompts for input, runs cd-based commands, and manages terminal sessions. When asked to relaunch, it kills the current process and starts fresh - no disconnect needed. If all tabs close, the script exits clean. This setup works for small dev teams, solo founders, or anyone who values focus over friction.nn- Terminal tabs hold independent service launches; no shared context.

  • Menu responds to numbers 1, 2, 3, or 0 to close all.
  • Closing any tab triggers script shutdown - no hangs, no errors.
  • CLI input is fast, zero dependencies, zero setup stress.

Here’s the script that puts control back in your hands:

#!/bin/bash
# Launch frontend and backend with terminal menu
SERVICES=(