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.

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.

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

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