Deep links
Learn how to run CLI commands from the browser.
The CLI supports deep links, a feature that lets you trigger commands directly from the browser. When you click a run button on the Croct website, the admin panel, or the documentation, the CLI opens in your terminal with the corresponding command ready to execute.
The CLI always asks for your confirmation before running any command triggered through a deep link, so you stay in full control.
This means you can follow tutorials, apply templates, add slots, and update your project without having to copy and paste commands manually.
For example, with deep links enabled, you can click the run button on the following command to execute it in your terminal:
npx croct@latest --versionHow it works
Deep links connect the browser to your local CLI through a registered URL protocol. When you click a run button, your operating system routes the request to the CLI, which parses the command and prompts you for confirmation before executing it.
Here are some examples of where deep links are used:
- Documentation: code blocks throughout the docs include a run button that lets you execute commands directly in your terminal
- Admin panel: actions in the admin panel can open the CLI with the relevant command
- Templates: applying a template from the Croct website triggers the use command in your terminal
Enabling deep links
The first time you run any CLI command without deep links enabled, the CLI asks whether you want to enable the feature. You can also enable it explicitly by running:
npx croct@latest enable deep-linkSee the enable deep-link command reference for more details.
Disabling deep links
If you no longer want the CLI to respond to browser actions, you can disable the feature:
npx croct@latest disable deep-linkSee the disable deep-link command reference for more details.