Skip to content

TypeScript CLI application demonstrating object-oriented design, type safety, and structured command-driven logic using Inquirer.

License

Notifications You must be signed in to change notification settings

CodeSperoDev/vehicle-selector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vehicle Selector (CLI)

Description

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.

Table of Contents

Installation

  1. Clone the repo:

    git clone https://github.com/YOUR_GITHUB_USERNAME/vehicle-builder.git
    cd vehicle-builder
  2. Install dependencies:

     npm install
    
  3. 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.

Walkthrough Video

[https://drive.google.com/file/d/1XMTna7LOY9fX_fT79RpwYFczUvYPOvVU/view]

Usage

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 (unique) , 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.

License

MIT © 2025 Stephen Schier

About

TypeScript CLI application demonstrating object-oriented design, type safety, and structured command-driven logic using Inquirer.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published