cinit-project-cli
v1.0.3
Published
Generate a standardized project structure—including directories and essential files like `CMakeLists.txt`, `README.md`, and `.gitignore`—using Bash, Zsh, or PowerShell snippets
Readme
cinit-project-cli
cinit-project-cli is a command-line tool for quickly scaffolding a new C++ project structure. With just one command, you can generate a standardized directory layout and essential files (such as CMakeLists.txt, README.md, and .gitignore) using either Bash or PowerShell scripts.
Features
- Multi-Shell Support
- Bash: Use the
cinitbashcommand to scaffold a project with a Bash script. - PowerShell: Use the
cinitpscommand to scaffold a project with a PowerShell script.
- Bash: Use the
- Standardized Project Structure: Automatically creates common directories:
buildsrcincludebintests
- Essential File Generation:
- CMakeLists.txt: A basic CMake configuration file.
- README.md: A starter README with your project name.
- .gitignore: Ignores common build folders.
Installation
Install the package globally using npm:
npm install -g cinit-project-cliThis command installs two global commands:
cinitbash– for Bash users.cinitps– for PowerShell users.
Usage
Bash
In your terminal (Bash), run:
cinitbash MyProjectName- If you omit the project name, it defaults to GenericProject.
- This will generate the project structure in the current directory.
PowerShell
In a PowerShell terminal, run:
cinitps MyProjectName- If you omit the project name, it defaults to GenericProject.
- This will generate the project structure in the current directory.
Generated Project Structure
After running the command, your directory will look similar to this:
├── build
├── src
├── include
├── bin
├── tests
├── CMakeLists.txt
├── README.md
└── .gitignore- CMakeLists.txt: Configured for a C++ project with CMake.
- README.md: A starter file including your project name.
- .gitignore: Configured to ignore build artifacts.
Customization
You can customize the scripts inside the bin folder as needed to fit your project’s requirements.
Contributing
Contributions are welcome! Please:
- Open an issue for any bugs or feature requests.
- Submit a pull request with your improvements.
License
This project is licensed under the MIT License.
Additional Resources
Enjoy scaffolding your projects with cinit-project-cli!
