Skip to content

Lussskki/Node.js-Javascript-Cpp-CLI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Node.js-Javascript-Cpp-CLI

This is my first CLI tool. I created it to quickly set up C++ / OpenGL projects and work in a lightweight VSCode environment.

YouTube Video

Watch the Video

Watch the demo on YouTube → Click Here

Features

  • Initialize a new C++ project folder
  • Create standard project directories: src, include, lib, and .vscode
  • Generate tasks.json for building and running in VSCode
  • Generate c_cpp_properties.json for IntelliSense and compiler configuration
  • Supports custom C++ standard, compiler, and libraries

Requirements

  • Node.js (v14+ recommended)
  • npm
  • g++ or another compatible C++ compiler
  • VSCode (optional but recommended for using the generated tasks)

Installation

Clone or download the project, then go into the project folder and run:

npm install -g .

This installs the CLI globally so you can use it from anywhere.

Alternative (for development)

If you are developing the CLI, you can use:

npm link

This creates a global symlink so your changes update automatically.

Usage

Initialize a project

cpp-starter-cli init

You will be prompted for:

  • Project name (default: cpp_project)
  • C++ standard (default: c++17)
  • Compiler command (default: g++)
  • Libraries (comma-separated, default: opengl, glfw, glad, glm, tinyobjloader, stbimage)

Supported libraries:

  • opengl
  • glfw
  • glm
  • glad
  • tinyobjloader
  • stbimage

Example:

? Project name: my_game
? C++ standard: c++17
? Compiler command: g++
? Libraries (comma separated): glfw,glm,glad,tinyobjloader,stbimage

Project Structure

After completion, your project structure will look like:

your-project/
├── src/
├── lib/
├── include/
└── .vscode/
    ├── tasks.json
    └── c_cpp_properties.json

Commands

Build the project

cpp-starter-cli build

Run the project

cpp-starter-cli run

Full workflow example

cpp-starter-cli init
cd your-project
cpp-starter-cli build
cpp-starter-cli run

Notes

To use the listed libraries, you need to download them manually and copy them into the include and lib folders.

Works best on Linux and other systems using g++ or compatible compilers.

License

This project is licensed under the MIT License.

About

This is a simple cli for me cpp-starter-cli to generate tasks.json and c_cpp_properties.json for mine cpp/opengl projects.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages