Action reference

Explore all available template actions.

Croct's mascot winking
Looking for something specific?

Use the search bar at the top of the page or press / to quickly search through the documentation.

Use the summary below to quickly jump to a specific topic:

PageDescription
add-componentLearn how to install components into a project.
add-dependencyLearn how to add packages to a project.
add-slotLearn how to add slots to a project.
change-directoryLearn how to change the working directory.
check-dependencyLearn how to check if packages are installed.
create-api-keyLearn how to create an API key.
create-directoryLearn how to create a directory.
create-resourceLearn how to create Croct resources.
defineLearn how to set variables in the current scope.
delete-pathLearn how to delete files or directories.
downloadLearn how to download files from the template source.
execute-packageLearn how to run a package command.
failLearn how to terminate execution with an error.
format-codeLearn how to format code files.
importLearn how to import and execute another template.
installLearn how to install project dependencies.
integrate-croctLearn how to set up Croct in a project.
locate-pathLearn how to find files matching a pattern.
move-pathLearn how to move or rename files and directories.
open-linkLearn how to open a URL in the browser.
printLearn how to display messages in the terminal.
promptLearn how to request input from the user.
read-fileLearn how to read file content into a variable.
repeatLearn how to execute actions in a loop.
replace-file-contentLearn how to replace content in files using patterns.
resolve-importLearn how to resolve import paths in source files.
runLearn how to execute actions sequentially.
start-serverLearn how to start a development server.
stop-serverLearn how to stop a running server.
testLearn how to execute actions conditionally.
tryLearn how to handle errors in template execution.
write-fileLearn how to write content to a file.