# print

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**

```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:

```sh
croct use template.json5
```

## Properties

These are the supported properties:

- `name`: `string`

  The action identifier. Always `print` for this action.

- `message`: `string`

  The message to display.

  The message supports basic markdown formatting:

  | Syntax        | Description   |
  | ------------- | ------------- |
  | `**text**`    | Bold          |
  | `*text*`      | Italic        |
  | `~~text~~`    | Strikethrough |
  | `` `text` ``  | Highlight     |
  | `[text](url)` | Link          |

- `semantics`: `string` (optional) (default: neutral)

  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.      |

- `title`: `string` (optional)

  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.

## Explore

- [Prompt](/reference/cli/templates/actions/prompt): Learn how to prompt the user for input.
- [Open link](/reference/cli/templates/actions/open-link): Learn how to open a URL in the browser.
- [Fail](/reference/cli/templates/actions/fail): Learn how to abort with an error message.
- [Test](/reference/cli/templates/actions/test): Learn how to branch based on conditions.
