writing scripts
Scripts are created from the new script button on the scripts page, which requires automation:create. You can describe what you want in plain English and let the AI builder write it, or write it yourself.
the three views
The new-script page opens on the AI builder and moves through up to three views.
1. AI builder
The default view asks "what do you want your script to do?" and gives you a large text box. Type a description of the job and press Generate Script — or use Ctrl+Enter (Cmd+Enter on a Mac) to submit.
| Control | Notes |
|---|---|
| Description box | Plain English. Ctrl/Cmd+Enter submits |
| Language dropdown | Labelled by platform — Windows – PowerShell, Linux – Bash, Windows – Batch, Cross-platform – Python |
| Generate Script | Sends the description for generation |
| Examples | A disclosure with eight ready-made prompts to start from |
| I know how to write code | Skips straight to the manual form |
Generation typically takes 15 to 40 seconds. Long or complex requests can time out, in which case you are asked to try again. Shortening the description or splitting the job into two scripts usually gets a result.
2. AI review
Once generation finishes you land on a review view carrying an AI Generated badge. Here you can:
- edit the Script Name and Description,
- read and edit the generated code in place in a full editor.
| Footer button | Does |
|---|---|
| Customize in Full Editor | Moves everything into the manual form so you can set parameters, timeout, platforms and tags |
| Regenerate | Asks for another attempt |
| Create Script | Saves the script as it stands |
Always read generated code before creating the script, and prefer Customize in Full Editor if the script needs parameters — parameters can only be defined at creation time and cannot be added afterwards.
3. manual form
The full editor is four cards plus a footer.
Basic Information
| Field | Notes |
|---|---|
| Script Name | Required, maximum 255 characters |
| Description | |
| Language | PowerShell, Bash, Batch or Python |
| Execution Timeout | 1, 2, 5 (default), 10, 15, 30 minutes or 1 hour |
| Target Platforms | Toggles — at least one is required |
| Tags | Searchable from the scripts list |
| Save as Template | A switch on the card |
Script Content
A code editor, plus a collapsible Variable Reference panel documenting the syntax available to you — credentials, environment variables and script parameters. The panel is language-aware, so it shows the syntax for the language you have selected.
Parameters
Add Parameter appends a row. Each parameter has:
| Field | Options |
|---|---|
| Name | |
| Type | String, Number, Boolean, Array |
| Description | |
| Default Value | |
| Required | A switch |
On an existing script, the same fields are editable from the Parameters tab — add, change or remove parameters and Save parameters.
languages and platforms
Choosing a language automatically sets sensible target platforms:
| Language | Platforms set |
|---|---|
| PowerShell | Windows |
| Batch | Windows |
| Bash | Linux |
| Python | Windows, Linux, macOS |
You can override the toggles, but at least one platform must stay selected.
Switching language replaces the editor's starter boilerplate only if you have not written anything yet. Code you have written is never overwritten.
One summary card in the product describes the supported languages as "PowerShell, Bash, and Python". Batch is supported too — it is available in the language dropdown and runs on Windows.
approval status
Every script carries an approval status, and only approved scripts can run. Specifically:
- Run Script is disabled unless the script is approved.
- Scheduled runs skip unapproved scripts.
- Trigger URLs can only be generated for approved scripts.
In practice, every script created through the portal — whether AI-generated, written by hand, or installed from a template — is approved as soon as it is created. There is no approval queue and no approve or reject screen. The status is worth knowing about because of what it gates, not because it is something you need to action.
the script detail page
Opening a script from the library gives you its full record.
header
The name, description, creator, created date and language, plus the script ID, which you can click to copy.
| Button | Availability |
|---|---|
| Run Script | Hidden without automation:execute; disabled unless the script is approved |
| Generate URL | Only on approved scripts. See trigger URLs |
| Edit | Changes the name and description |
| Delete | Blocked while the script has any schedules |
A script with one or more schedules cannot be deleted. The delete dialog says so and the action is disabled. Delete or repoint the schedules first — see schedules.
Four stat cards sit under the header: Executions, Schedules, Version and Timeout.
tabs
| Tab | Contents |
|---|---|
| Script | Execution Timeout dropdown, Modify with AI, the code editor, the Variable Reference panel and tags |
| Parameters | Read-only — see the caution above |
| Version History | One card per version, with a Current badge and the changelog |
| Schedules | A card for every schedule using this script |
| Executions | Paginated, with status and trigger filters |
Any edit on the Script tab raises a floating Save / Cancel bar. Nothing is committed until you save.
versioning
A new version is created only when the script content actually changes. Editing the timeout, the name or the description does not create a version, so the Version History tab stays a record of real code changes rather than metadata churn.
Modify with AI
Modify with AI opens a dialog that takes the current script as context. It offers a target language select, a prompt box and eight example prompts.
The result replaces the content of the editor but is not saved automatically. Review it, then use the floating Save bar. Navigating away without saving discards the change.
template-installed scripts
Scripts installed from the gallery show a banner naming the source template, the installed version and the install date.
When PosKit publishes a newer version, the banner turns amber and offers Update from Template, which opens a diff view so you can see exactly what changes before accepting it.