Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/gnmyt/Nexterm/llms.txt

Use this file to discover all available pages before exploring further.

Scripts and snippets are reusable automation assets. Scripts contain multi-line shell content (with optional OS filtering) that can be executed on servers. Snippets are single-command shortcuts that appear in terminal sessions for quick insertion. Both resource types support personal and organization-scoped ownership. All endpoints require authentication via Authorization: Bearer YOUR_TOKEN.

Scripts

GET /api/scripts

Returns available scripts for the authenticated user. Supports optional search and organization filtering.

Query parameters

Filter scripts by name or description. When omitted, all accessible scripts are returned.
organizationId
number
Restrict results to scripts belonging to a specific organization.

Response

Returns an array of script objects.
[].id
number
Unique script identifier.
[].name
string
Display name of the script.
[].description
string
Optional description of what the script does.
[].osFilter
string[]
List of OS identifiers this script is filtered to, or null for all systems.
[].organizationId
number
Owning organization ID, or null for personal scripts.
curl --request GET \
  --url 'http://your-server:6989/api/scripts?search=backup' \
  --header 'Authorization: Bearer YOUR_TOKEN'

GET /api/scripts/all

Returns all scripts accessible to the authenticated user — personal scripts plus scripts from every organization they belong to.

Response

Returns a flat array of all accessible script objects.
curl --request GET \
  --url http://your-server:6989/api/scripts/all \
  --header 'Authorization: Bearer YOUR_TOKEN'

GET /api/scripts/sources

Returns all scripts from external (community or marketplace) sources.

Response

Returns an array of source script objects.
curl --request GET \
  --url http://your-server:6989/api/scripts/sources \
  --header 'Authorization: Bearer YOUR_TOKEN'

GET /api/scripts/:scriptId

Returns the full details of a single script, including its content.

Path parameters

scriptId
string
required
Unique identifier of the script.

Query parameters

organizationId
number
Required when accessing an organization script.

Response

id
number
Script identifier.
name
string
Script name.
content
string
The full shell script content.
description
string
Script description.
osFilter
string[]
OS filter list, or null.
organizationId
number
Owning organization ID, or null.
curl --request GET \
  --url http://your-server:6989/api/scripts/12 \
  --header 'Authorization: Bearer YOUR_TOKEN'

POST /api/scripts

Creates a new custom script.

Request body

name
string
required
Display name. Between 1 and 255 characters.
content
string
required
The shell script content. Cannot be empty.
description
string
Optional description of what the script does.
organizationId
number
Create the script under an organization. Omit for a personal script.
osFilter
string[]
List of OS identifiers to restrict this script to (e.g. ["linux", "macos"]). Pass null to target all systems.

Response (201)

id
number
ID of the newly created script.
message
string
Confirmation message.
curl --request POST \
  --url http://your-server:6989/api/scripts \
  --header 'Authorization: Bearer YOUR_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
    "name": "Disk Usage Report",
    "content": "#!/bin/bash\ndf -h",
    "description": "Prints disk usage in human-readable form",
    "osFilter": ["linux"]
  }'

PUT /api/scripts/:scriptId

Replaces an existing custom script’s content or metadata. Only the script creator can update it.

Path parameters

scriptId
string
required
Unique identifier of the script to update.

Query parameters

organizationId
number
Required when updating an organization script.

Request body

name
string
Updated display name.
content
string
Updated script content.
description
string
Updated description.
osFilter
string[]
Updated OS filter list.

Response

message
string
Confirmation message.
curl --request PUT \
  --url http://your-server:6989/api/scripts/12 \
  --header 'Authorization: Bearer YOUR_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{"content": "#!/bin/bash\ndf -hT"}'

DELETE /api/scripts/:scriptId

Permanently deletes a custom script. Only the script creator can delete it.

Path parameters

scriptId
string
required
Unique identifier of the script to delete.

Query parameters

organizationId
number
Required when deleting an organization script.

Response

message
string
Confirmation message.
curl --request DELETE \
  --url http://your-server:6989/api/scripts/12 \
  --header 'Authorization: Bearer YOUR_TOKEN'

PATCH /api/scripts/:scriptId/reposition

Moves a script to a new position in the list relative to a target script.

Path parameters

scriptId
string
required
Unique identifier of the script to reposition.

Query parameters

organizationId
number
Required when repositioning an organization script.

Request body

targetId
number
required
The ID of the script to position next to.

Response

message
string
Confirmation message.
curl --request PATCH \
  --url http://your-server:6989/api/scripts/12/reposition \
  --header 'Authorization: Bearer YOUR_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{"targetId": 10}'

Snippets

GET /api/snippet/all

Returns all snippets accessible to the authenticated user — personal snippets plus snippets from every organization they belong to.

Response

Returns an array of snippet objects.
[].id
number
Unique snippet identifier.
[].name
string
Display name of the snippet.
[].command
string
The command string for this snippet.
[].description
string
Optional description.
[].osFilter
string[]
OS filter list, or null.
[].organizationId
number
Owning organization ID, or null for personal snippets.
curl --request GET \
  --url http://your-server:6989/api/snippet/all \
  --header 'Authorization: Bearer YOUR_TOKEN'

GET /api/snippet/sources

Returns all snippets from external (community or marketplace) sources.

Response

Returns an array of source snippet objects.
curl --request GET \
  --url http://your-server:6989/api/snippet/sources \
  --header 'Authorization: Bearer YOUR_TOKEN'

GET /api/snippet/:snippetId

Returns the full details of a single snippet.

Path parameters

snippetId
string
required
Unique identifier of the snippet.

Query parameters

organizationId
number
Required when accessing an organization snippet.

Response

id
number
Snippet identifier.
name
string
Snippet name.
command
string
The command string.
description
string
Snippet description.
osFilter
string[]
OS filter list, or null.
curl --request GET \
  --url http://your-server:6989/api/snippet/8 \
  --header 'Authorization: Bearer YOUR_TOKEN'

PUT /api/snippet

Creates a new snippet.

Request body

name
string
required
Display name. Between 1 and 255 characters.
command
string
required
The command string for this snippet. Cannot be empty.
description
string
Optional description.
organizationId
number
Create the snippet under an organization. Omit for a personal snippet.
osFilter
string[]
List of OS identifiers to restrict this snippet to. Pass null for all systems.

Response

id
number
ID of the newly created snippet.
message
string
Confirmation message.
curl --request PUT \
  --url http://your-server:6989/api/snippet \
  --header 'Authorization: Bearer YOUR_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
    "name": "Tail syslog",
    "command": "tail -f /var/log/syslog",
    "description": "Stream system log in real time"
  }'

PATCH /api/snippet/:snippetId

Updates an existing snippet. At least one field must be provided.

Path parameters

snippetId
string
required
Unique identifier of the snippet to update.

Query parameters

organizationId
number
Required when updating an organization snippet.

Request body

name
string
New display name.
command
string
New command string.
description
string
New description.
osFilter
string[]
Updated OS filter list.

Response

message
string
Confirmation message.
curl --request PATCH \
  --url http://your-server:6989/api/snippet/8 \
  --header 'Authorization: Bearer YOUR_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{"name": "Follow syslog"}'

DELETE /api/snippet/:snippetId

Permanently deletes a snippet. This action cannot be undone.

Path parameters

snippetId
string
required
Unique identifier of the snippet to delete.

Query parameters

organizationId
number
Required when deleting an organization snippet.

Response

message
string
Confirmation message.
curl --request DELETE \
  --url http://your-server:6989/api/snippet/8 \
  --header 'Authorization: Bearer YOUR_TOKEN'

PATCH /api/snippet/:snippetId/reposition

Moves a snippet to a new position in the list relative to a target snippet.

Path parameters

snippetId
string
required
Unique identifier of the snippet to reposition.

Query parameters

organizationId
number
Required when repositioning an organization snippet.

Request body

targetId
number
required
The ID of the snippet to position next to.

Response

message
string
Confirmation message.
curl --request PATCH \
  --url http://your-server:6989/api/snippet/8/reposition \
  --header 'Authorization: Bearer YOUR_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{"targetId": 5}'

Build docs developers (and LLMs) love