sigildocs

(sigil cli init)

(sigil cli init) - Project Scaffolding Command

Implementation of the sigil init command for creating new projects.

Exports

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

Get the default template files Note: No explicit dependencies on sigil-run/sigil-stdlib - the build system uses the running sigil binary's bundled runtime and stdlib automatically. This ensures version consistency and avoids needing to compile C code.

Get the library template files

Get the CLI template files

Get the game template files

Get template files by name

init-git-repoprocedure

Initialize a git repository

init-handlerprocedure

Main init handler