C Notebook is a notebook environment for writing and running C code in reusable cells, then saving that work as .cnb notebooks.
It provides two interfaces that share the same .cnb format:
- backend/: terminal C notebook engine
- frontend/: web UI (Google Colab-like)
Both interfaces compile and execute C code with GCC and share notebook storage, so notebooks created in one interface can be opened in the other.
- GCC
- Make
- Node.js (v18+)
From the repository root, run:
npm install && npm run devThen open http://localhost:3000.
This command flow:
- Installs frontend dependencies (via
postinstall) - Builds the C backend
- Builds the TypeScript frontend
- Starts the web server
make install
make devThis performs the same build-and-run flow using make.
package.json → Root orchestration scripts (all-in-one build & run)
Makefile → Root Makefile for make-based workflow
backend/ → C terminal backend, build files, memory, and saved notebooks
frontend/ → Web frontend (TypeScript + Express + static UI)
cd backend
make
./cnb:save→ Save current notebook:load→ Load default notebook:exit→ Exit
Backend data paths:
backend/output_cnbs/for saved.cnbnotebooksbackend/memory/for temporary compilation artifacts
cd frontend
npm install
npm run build
npm startOpen http://localhost:3000.
The frontend API compiles C cells with GCC and stores notebooks in backend/output_cnbs/, sharing notebook data with the terminal backend.
| Script | Description |
|---|---|
npm install |
Installs frontend dependencies (via postinstall) |
npm run build |
Builds both backend (make) and frontend (tsc) |
npm run build:backend |
Builds only the C backend |
npm run build:frontend |
Builds only the TypeScript frontend |
npm start |
Starts the web server |
npm run dev |
Builds everything and starts the server |
npm run clean |
Removes all build artifacts |
Eduardo J. Barrios
https://edujbarrios.com