open-link

Learn how to open a URL in the browser.

This action opens a URL in the user's default browser.

The URL can be anything accessible from the browser, such as a local development server, documentation, or the admin app.

Example

The following template opens the admin app after setup:

template.json5
{  "$schema": "https://schema.croct.com/json/v1/template.json",  "title": "Open admin",  "description": "Opens the admin app.",  "actions": [    {      "name": "print",      "semantics": "success",      "message": "Setup complete."    },    {      "name": "open-link",      "url": "https://app.croct.com"    }  ]}

To apply this template, run:

npx croct@latest use template.json5

Properties

These are the supported properties:

name
string

The action identifier. Always open-link for this action.

url
string

The URL to open in the default browser.