Deno C++ Project Generator

Generate C++/CMake projects with a single URL

Overview

This tool is a C++/CMake project generator that leverages Deno's URL execution feature. Simply run deno run with a URL to generate a ready-to-use C++ project.

🚀

No Installation Required

With Deno installed, you can run directly from a URL. No tool installation or configuration needed.

📦

Ready-to-Use Template

Generates CMake, Deno build scripts, and C++ source files all set up and ready to go.

🔧

Type-Safe Build System

TypeScript-based build scripts provide type-safe build automation.

🌍

Cross-Platform

The same scripts work on Windows, macOS, and Linux.

Quick Start

Step 1: Install Deno

If you haven't installed Deno yet:

curl -fsSL https://deno.land/install.sh | sh
irm https://deno.land/install.ps1 | iex

Step 2: Generate a Project

deno run --allow-read --allow-write --allow-run https://raw.githubusercontent.com/COx2/deno-advent-calender-2025/main/generator/generate.ts --name "MyProject" --author "Your Name" --with-git

Step 3: Build & Run

cd myproject
deno task build
deno task test

Example Output

====================
| MyProject Calculator |
====================
Version: 1.0.0

10 + 5 = 15
10 x 5 = 50

Generated Project Structure

myproject/
├── src/
│   ├── main.cpp           # Main application
│   ├── core/              # Static library (myproject_core)
│   │   ├── core.h
│   │   └── core.cpp
│   └── utils/             # Shared library (myproject_utils)
│       ├── utils.h
│       └── utils.cpp
├── CMakeLists.txt         # CMake configuration
├── build.ts               # Main build script
├── build.config.ts        # Build configuration
├── cmake-file-api.ts      # CMake File API integration
├── cmake-types.ts         # TypeScript type definitions
├── deno.json              # Deno tasks configuration
└── .gitignore

Why Deno?

Feature Traditional Shell Scripts Deno + TypeScript
Type Safety None Full TypeScript type checking
Cross-Platform Bash scripts don't work on Windows Same code on any OS
Dependency Management Manual management Automatic resolution via URL imports
IDE Support Limited Full VSCode support
Security All commands can execute Explicit permissions required

Technologies Used