A TypeScript command-line application that allows users to create, manage, and interact with different types of vehicles including cars, trucks, and motorbikes. Built using Node.js, TypeScript, and Inquirer, this CLI-based tool guides users through the creation or selection of vehicles and lets them perform various vehicle-specific actions.
Walkthrough Video: [https://drive.google.com/file/d/1XMTna7LOY9fX_fT79RpwYFczUvYPOvVU/view]
-
Clone the repo:
git clone https://github.com/YOUR_GITHUB_USERNAME/vehicle-builder.git cd vehicle-builder -
Install dependencies: npm install
-
Start the application: npm start
Note: Ensure that Node.js is installed on your machine. TypeScript compilation is handled automatically via the start script if configured properly.
Use the command-line interface to:
• Create new vehicles (Car, Truck, Motorbike)
• Enter specific information about the vehicle
• Perform actions such as driving, loading cargo (truck-only), or popping a wheelie (motorbike-only)
• Select from existing vehicles to perform additional actions
• Loop through the action menu until you choose to exit
This is a CLI-only application. No front-end UI is provided.
Features • TypeScript object-oriented design • Uses Inquirer for interactive command-line prompts • Modular class structure for each vehicle type • Vehicle-specific prompts and actions • Ability to select and reuse previously created vehicles • Clean, looped user interaction for persistent session
Vehicle Types and Actions
Car • Prompts: Make, Model, Year • Actions: Drive, Refuel, Park
Motorbike • Prompts: Make, Model, Year, Engine Size • Actions: Drive, Pop a Wheelie, Refuel
Truck • Prompts: Make, Model, Year, Cargo Capacity • Actions: Drive, Load Cargo (unique), Refuel
Each vehicle type has at least one unique action that the others do not support.
Credits • Node.js • TypeScript • Inquirer
License
MIT © 2025 Stephen Schier