CLI for C++ projects by Jeremy Junac
The CLI only needs Python 2.7. But if you want to use all the functionalities, you will also need :
- make
- gcc/g++
- gdb
- VSCode
git clone https://github.com/Taken0711/cpp-cli.git
If you want to use the CLI from anywhere, you can put a link in your $PATH (assuming that ~/bin is in your $PATH):
ln -s ./cpp-cli.py ~/bin/cpp-cli
cpp-cli new <PROJECT-NAME>
This command generates a project containing :
- A basic
main
with acout
. - Its
Makefile
. - The .json settings files for vscode (
settings.json
,launch.json
,c_cpp_properties.json
andtasks.json
) to build, debug and launch your project, using make, gcc and gdb.
You can use the cpp-cli g class
command to generate C++ classes:
cpp-cli g class <MyClass>
Note : the PATH must be your newly created project.
This command creates a basic cpp and a header file. The CLI will automatically add dependency in the Makefile.
You can also create several classes in one command:
cpp-cli g class MyFirstClass MySecondClass MyThirdClass
Default is Ctrl+B.
Debugging and launching automatically launch the build task.
Default is F5.
Automatically launches the build task.
Default is Ctrl+F5.
Automatically launches the build task.