Learn how to display messages in the terminal.
This action outputs a message to the terminal with optional semantic styling and a title.
Use it to give feedback to the user at any point during the workflow.
Example
The following template prints a success message after setup:
template.json5
{ "$schema": "https://schema.croct.com/json/v1/template.json", "title": "Setup confirmation", "description": "Prints a setup confirmation message.", "actions": [ { "name": "print", "semantics": "success", "title": "All set", "message": "The project is ready. Run `npm run dev` to start." } ]}To apply this template, run:
npm
npx croct@latest use template.json5Properties
These are the supported properties:
- namestring
The action identifier. Always print for this action.
- messagestring
The message to display.
The message supports basic markdown formatting:
Syntax Description **text** Bold *text* Italic ~~text~~ Strikethrough `text` Highlight [text](url) Link - semantics(optional)string
The visual style of the message.
Value Description neutral Default style for general messages. info Informational messages. success Confirmation that an operation completed. warning Cautionary messages that need attention. error Error messages indicating a problem. Default:neutral- title(optional)string
A short title for the message.
When set, the message is rendered inside a callout box with the title centered at the top. The title also supports markdown formatting.