sigildocs

(sigil cli init)

(sigil cli init) - Project Scaffolding Command

Implementation of the sigil init command for creating new projects.

Exports

Built-in templates registry

Default version range for sigil-* deps in scaffolded projects. Bump alongside sigil-cli minor releases.

Extracted ecosystem packages still release independently of the core toolchain. Templates that depend on them should use the latest stable ecosystem range rather than assuming a matching core release exists.

Test packages still live in the core monorepo.

Default .gitignore content

Get template description by name (for built-in templates)

Get the cache directory for templates

Parse a remote template specifier Returns: ((type . github|gitlab|codeberg|url) (repo . "user/repo") (branch . "main"|#f) (subdir . "path"|#f)) Or #f if not a remote specifier

Parse github/gitlab shorthand: user/repo, user/repo#branch, user/repo/subdir

parse-git-urlprocedure

Parse a full git URL

Build the git clone URL from parsed remote info

Generate a cache key for a remote template

Fetch a remote template to the cache Returns the path to the cached template directory, or #f on failure

Read all files from a template directory Returns list of (relative-path . content) pairs

Read a file to string

Walk a directory recursively, calling proc for each entry

Check if a template string is a remote specifier

List available templates

Write a file with directory creation

Create directories recursively

Default dev config block — included in every template's package.sgl so sigil run and sigil build work out of the box.

Dev dependencies needed when testing packages with native transitive deps.

Get the default template files

Get the library template files

Get the CLI template files

Get the game template files

Get the web-app template files

A minimal live web starter: a shared list you can add to and delete from, kept in sync across every open browser over SSE with no client-side JavaScript. Deps are pinned per-package here because the ecosystem ranges have diverged (sigil-web 0.15 / sigil-http 0.16), so the shared ecosystem-version no longer fits all of them.

Get the api-service template files

Get the mcp-tool template files

Get template files by name

init-git-repoprocedure

Initialize a git repository

init-handlerprocedure

Main init handler