(sigil cli init)
(sigil cli init) - Project Scaffolding Command
Implementation of the sigil init command for creating new projects.
Exports
*builtin-templates*variableBuilt-in templates registry
*sigil-version*variableDefault version range for sigil-* deps in scaffolded projects. Bump alongside sigil-cli minor releases.
*default-gitignore*variableDefault .gitignore content
get-template-descriptionprocedureGet template description by name (for built-in templates)
get-template-cache-dirprocedureGet the cache directory for templates
parse-remote-templateprocedureParse 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-git-shorthandprocedureParse github/gitlab shorthand: user/repo, user/repo#branch, user/repo/subdir
parse-git-urlprocedureParse a full git URL
remote-to-clone-urlprocedureBuild the git clone URL from parsed remote info
remote-to-cache-keyprocedureGenerate a cache key for a remote template
fetch-remote-templateprocedureFetch a remote template to the cache Returns the path to the cached template directory, or #f on failure
read-template-directoryprocedureRead all files from a template directory Returns list of (relative-path . content) pairs
read-file-to-stringprocedureRead a file to string
directory-walkprocedureWalk a directory recursively, calling proc for each entry
remote-template?procedureCheck if a template string is a remote specifier
list-templatesprocedureList available templates
write-template-fileprocedureWrite a file with directory creation
make-directory-recursiveprocedureCreate directories recursively
*default-configs-block*variableDefault dev config block — included in every template's package.sgl so sigil run and sigil build work out of the box.
get-default-template-filesprocedureGet the default template files
get-library-template-filesprocedureGet the library template files
get-cli-template-filesprocedureGet the CLI template files
get-game-template-filesprocedureGet the game template files
get-web-app-template-filesprocedureGet the web-app template files
get-api-service-template-filesprocedureGet the api-service template files
get-mcp-tool-template-filesprocedureGet the mcp-tool template files
get-template-filesprocedureGet template files by name
init-git-repoprocedureInitialize a git repository
init-handlerprocedureMain init handler