Line

You are reading the unreleased docs (next). See latest (v0.9)

/api/init

1 route under /api/init.

Cockpit server REST reference, next.

All routes sit below the Cockpit server's session gate (app.use('/api', auth.requireSession)) except /api/health. Generated from the real route table in ui/server/src.

POST /api/init#

Initializes a Construct project (architecture.yml + AGENTS.md + a core feature) at the currently selected project directory — the same init function construct init runs, called in-process like every other command endpoint. Exists so the frontend's "this isn't a Construct project yet" state (see projectStatusFor above) has somewhere to send the user other than a dead end: pick a directory in Settings, then either select an existing project or press "Initialize Construct here".

Source: ui/server/src/index.mjs.