Package manager for Cpp.

Usage no npm install needed!

<script type="module">
  import cppPackageManager from 'https://cdn.skypack.dev/cpp-package-manager';


Logo of the project

Cpp Package Manager · License: MIT Build status codecov npm version

This is a package manager for Cpp to give agility in development.

Installing / Getting started

npm install cpp-package-manager -g

This project provide three features for manager cpp package.


cpm init

This command will generate a cpm.package.json file with the following properties:

  "name": "cpp-package-manager",
  "description": "This is a package manager for Cpp to give agility in development.",
  "version": "1.0.0"

After generate the file you can add packages with Git https url, just like the example:

"dependencies": [
      "name": "complex-number",
      "url": "https://github.com/lucaslacerdacl/complex-number.git"


cpm install

This command will clone the projects and create the cpm_modules folder with packages already built in dist folder by each package.

└── cpm_modules
    └── complex_number
      ├── dist                   # Compiled files
      └── src


cpm build

This command will generate binaries files in dist folder for all packages in cpm_modules.

Optionally you can create a config file called cpm.build.json just like the example:

  "fileName": "project.exe",
  "binaries": [


cpm version

This command will print the current version installed on your device.


If any error occured a cpm.log.json file will be created showing date and the description of the error.

*This feature is not avaliable as command.


Built With

  • Node
  • NPM
  • Typescript
  • Chalk
  • Figlet
  • Inquirer
  • Lodash
  • Minimist
  • Nodegit
  • Jest


You will need install Node. You will need install GNU Compiler Collection.

Deploying / Publishing

The project is build and release in Azure DevOps.


This project is using the pattern MAJOR.MINOR.PATCH. You can read more in Semantic Versioning.


You can run:

npm run test

This command will run jest with code coverage.

This project is using ts-jest preset and run on src folder.

  "jest": {
    "preset": "ts-jest",
    "roots": [

Style guide

└── src
    ├── assets
    ├── options
    └── index.ts


Created in first moment to store project logo. In the future can used to hosted static files.


All commands is in options folder. Each command has his own model and test.


Get command and choose the options.

Api Reference

Check the proccess in Medium: Construindo um CLI com Node.js e TS.


License under MIT.