Presets/Scripts

Create

Create new script preset

Creating a New Script Preset

It's recommended to run the CLI from the root of a project that already contains the files structured the way you want them to be in the preset.

After accessing the script presets menu, you can select the option to create a new preset:

Manage script presets New preset List preset Apply preset Edit preset Delete preset Back

Add Files

You can add files to your preset by selecting the Add files option:

New script preset🗐 Select files Add dependencies⦿ Preview Save Cancel

All files starting from the directory where the CLI was executed will be displayed

In the menu that appears with the files, you can search for a specific file by simply typing. To select/deselect a file, press the Tab key and confirm with the Enter key.

Remove Files

If you’ve already added files to the preset, the Remove files option will appear. You can use it to select which files to remove:

New script preset🗐 Select files Remove files Add dependencies⦿ Preview Save Cancel

If you change your mind about a file, you can select it for removal.

Add Dependencies

If the files you've selected require dependencies, you can add them using the Add dependencies option:

New script preset🗐 Select files Remove files Add dependencies⦿ Preview Save Cancel

You’ll be able to type the name of a dependency to add it to the preset.

You can add a dependency with a specific version using the same syntax as npm: Using the Fastify library as an example:

  • Install a major version: fastify@5
  • Install a minor version: fastify@4.28
  • Install a specific version: fastify@3.25.2

Then, you can choose whether to add it as a production or development dependency:

Dependency TypeProperty in package.json
Production dependencydependencies
Development dependencydevDependencies

Remove Dependencies

You can remove previously added dependencies using the Remove dependencies option:

New script preset🗐 Select files Remove files Add dependencies Remove dependencies⦿ Preview Save Cancel

Preview

You can preview the structure of your script preset using the Preview option:

New script preset🗐 Select files Remove files Add dependencies Remove dependencies⦿ Preview Save Cancel

The terminal will display the file and dependency structure of the preset.

Save

Once you’ve finished building your script preset, save it using the Save option:

New script preset🗐 Select files Remove files Add dependencies Remove dependencies⦿ Preview Save Cancel

You’ll be asked to enter a name for the preset. Choose a short and clear name that helps identify its contents (you can use emojis if you'd like).

On this page