Skip to main content
The Script library is where you manage the scripts you can run on your fleet. Add a .sh, .py, or .ps1 script once, then run it on any compatible device.

Supported script types

Each script is limited to 1 MiB of content.

Open the Script library

1

Open Device Management

From the dashboard, open Device Management.
2

Go to the Scripts tab

Select the Scripts tab.
3

Select the Script library sub-tab

You see one row per script with its name, type, and available actions.

Add a script

1

Open the form

Select Add a script.
2

Provide the script

Choose one of two ways:
  • Drag and drop a .sh, .py, or .ps1 file into the upload area. The form fills in the name, platform, and contents for you.
  • Fill in the fields manually: pick a platform, enter a name ending in the matching extension, and paste the script into the editor.
3

Save the script

Select Save.
The Platform selector owns the extension. Switching platforms rewrites the extension in the name, and typing a name with a matching trailing extension updates the platform. You can edit either field freely — they stay in sync only when the other field is unambiguous.

Validation rules

Before saving, Primo checks that:
  • The name ends in a supported extension (.sh, .py, or .ps1).
  • The contents are 1 MiB or smaller.
  • A .py script starts with a python shebang, for example:
  • A .sh script uses a supported interpreter if it declares a shebang, for example #!/bin/bash or #!/usr/bin/env bash.
If a rule fails, Save stays disabled and the offending field shows the reason.

Edit a script

1

Open the edit form

On the script’s row, open the actions menu and select Edit.
2

Update the contents

Edit the script in the editor.
3

Save your changes

Select Save.
You can only edit the contents. The name and platform stay locked, because renaming would change the script’s type. To rename a script or change its type, delete it and create a new one.
Save stays disabled until you change the contents.

Download a script

On the script’s row, open the actions menu and select Download. The file downloads with the script’s original name and extension.

Delete a script

1

Open the delete dialog

On the script’s row, open the actions menu and select Delete.
2

Confirm

Confirm in the dialog.
Past runs of the script remain in each device’s script history — Primo keeps the name and contents used at run time. Any run that hadn’t completed yet moves to cancelled.

Permissions

If you’re missing a permission, the action stays visible but disabled and a tooltip explains why. In a demo workspace, only the confirm buttons in the modals are disabled — you can still open a script to read it.