cps (C Project Scaffold)
A VS Code extension for scaffolding C projects, generating project structures, and creating C source and header files templates.
Requirements
The extension runs in VS Code and is not limited to Linux. The generated project's
Makefile requires make, gcc with C11 support, and a Unix-like shell because it
uses commands such as mkdir -p and rm -rf. These are commonly available on
Linux and macOS. On Windows, use WSL or a compatible environment such as MSYS2
with the required tools installed.
Steps to Install
- Search for
cps-for-cin your VS Code Extensions
- Click Install
- Done!
Commands
Open the Command Palette and run one of these commands:
- CPS: Initialize C Project creates
src/main.c,include/,build/, a C11Makefile, and.gitignorein the active workspace folder. If any target already exists, choose Overwrite, Merge, or cancel. Merge keeps existing files and adds the requiredbuild/andappignore entries when needed. - CPS: Create Source File creates
src/<name>.c. - CPS: Create Header File creates
include/<name>.hwith an include guard. - CPS: Create Source & Header Pair creates both files and includes the header by filename in the source.
- CPS: Switch Source / Header opens the matching counterpart when it exists.
Names may include the expected .c or .h extension. File paths and traversal names are rejected. Creating a file that already exists prompts before replacing it.
License
MIT

