Plugin reference
Every field of nojace.json (or plugin.json). For how to use them, with examples, see Write a plugin.
Start the file with the schema line, and your editor completes and checks fields as you type:
{
"$schema": "https://nojace.com/nojace.schema.json",
"format": 1,
"name": "My team"
}The file
| Field | Type | What it does |
|---|---|---|
format | integer | The plugin format this file is written for. Currently 1. |
namerequired | string | Shown on the plugin's tab. |
description | string | One line on what it adds, shown when browsing plugins. |
icon | string | An emoji shown when browsing plugins. |
requires | list of string | CLIs it needs, e.g. ["gh"]: shown when browsing plugins. "docker|podman" means either. |
platforms | list of "macos" | "linux" | The systems it runs on. Left out, all of them; elsewhere it isn't offered, and isn't run if added. |
settings | list of Setting | Choices you make once for the whole plugin (an account, a role, a region), shown under ⚙ on its chip and kept in ~/.nojace/plugins.json. Commands use them as {{setting.<id>}}. |
pages | list of object { id, label, file, icon, description } | Web pages it ships (a game, a dashboard), opened inside the Toolbox in a sandbox: scripts run, but the page can't reach the app, files or commands. |
actions | list of Action (a button) | Buttons, in groups and rows. |
services | list of Service | Things that keep running: start, stop, log. |
lists | list of List | Tables from a command, with toggles and row buttons. |
envs | list of string | Environments for the apps table and inputs with options "envs". |
methods | map of name → Method | How apps are deployed: actions and a status command, shared by apps. |
apps | list of App | Apps × envs table. |
links | list of Link |
Action (a button)
| Field | Type | What it does |
|---|---|---|
idrequired | string | Stable: saved buttons and needs refer to it. |
labelrequired | string | |
runrequired | string | The command, run in a terminal in the plugin's folder. |
title | string | What the run is called in the log and history, e.g. "exec {{item}} {{service}}". |
group | string | Card heading. |
row | string | Labelled row in the card. |
inputs | list of Input (something to choose) | |
each | list of Option or From a command | One button per item. |
check | Check (a badge) | |
needs | Needs | Checks that must pass first: "<action id>" or "<action id>:{{item}}". |
tone | Tone | danger: red, and running it means typing its name. For production. |
keepLog | boolean | false: output isn't kept after it ends. For logins and shells. |
cwd | "plugin" | "app" | |
confirm | string | |
confirmWhen | When | input id → value(s) it must have |
confirmType | boolean |
Input (something to choose)
| Field | Type | What it does |
|---|---|---|
idrequired | string | Fills {{id}}. |
label | string | |
options | list of Option or "envs" or From a command | |
default | string or list of string or object { run } | |
multi | boolean | A list of values, filled as separate words. |
multiline | boolean | A text box for longer text (a note, a message); ⌘Enter runs. |
emptyLabel | string | What an empty multi means, e.g. "all services". |
Option
Either string, or an object:
| Field | Type | What it does |
|---|---|---|
valuerequired | string | Fills {{item}} / the input. |
label | string | Shown instead of value. |
hint | string | |
link | string | |
tone | Tone | danger: red, and running it means typing its name. For production. |
vars | map of name → string | More {{placeholders}} when this item is used. |
From a command
| Field | Type | What it does |
|---|---|---|
runrequired | string | Prints the JSON list. |
Check (a badge)
| Field | Type | What it does |
|---|---|---|
runrequired | string | Prints {"ok", "text"}, or a map of them. |
key | string | Picks from the map; may use {{item}}. |
every | number | Seconds between checks (default 120). |
Needs
Checks that must pass first: "<action id>" or "<action id>:{{item}}".
Type: list of string
Tone
danger: red, and running it means typing its name. For production.
Type: "danger"
When
input id → value(s) it must have
Type: map of name → string or list of string
Service
| Field | Type | What it does |
|---|---|---|
idrequired | string | |
label | string | |
runrequired | string | Keeps running until stopped (Ctrl+C, then killed after 4 s). |
inputs | list of Input (something to choose) | |
autostart | boolean | |
ports | list of integer | |
confirm | string | |
confirmWhen | When | input id → value(s) it must have |
needs | Needs | Checks that must pass first: "<action id>" or "<action id>:{{item}}". |
List
| Field | Type | What it does |
|---|---|---|
idrequired | string | |
labelrequired | string | |
runrequired | string | Prints {"columns": [...], "rows": [{value, label, hint, on, vars, tone}]}. |
on | string | Turn a row on for a column: {{item}}, {{column}}. |
off | string | |
actions | list of List row action | |
group | string | Show the rows inside this action group's card. |
open | boolean | |
every | number | Reload every this many seconds while the Toolbox is showing (e.g. 60 for today's meetings). |
display | "table" | "cards" | cards: small cards with a filter, status / tag chips and grouping. Rows may add status, group, tags; the output may add groups [{value, label, hint, link}] and view {groupBy, folded}. |
List row action
| Field | Type | What it does |
|---|---|---|
idrequired | string | |
labelrequired | string | |
runrequired | string | {{item}} is the row; its vars fill the rest. |
title | string | |
tone | Tone | danger: red, and running it means typing its name. For production. |
keepLog | boolean | |
needs | Needs | Checks that must pass first: "<action id>" or "<action id>:{{item}}". |
inputs | list of Input (something to choose) | Asked for when the row's button is pressed, e.g. a text box started from the row's current text. |
Setting
| Field | Type | What it does |
|---|---|---|
idrequired | string | Fills {{setting.<id>}} in any command. |
labelrequired | string | |
hint | string | One line under it, e.g. what it changes. |
type | "choice" | "text" | "toggle" | choice (with options), text, or toggle (fills "true" / "false"). Default: choice when it has options, else text. |
options | list of Option or From a command | |
default | string |
Method
| Field | Type | What it does |
|---|---|---|
actions | list of Action (a button) | |
status | object { run, every } |
App
| Field | Type | What it does |
|---|---|---|
idrequired | string | |
name | string | |
method | string | |
folder | string | |
vars | map of name → string | |
actions | list of Action (a button) |
Link
| Field | Type | What it does |
|---|---|---|
labelrequired | string | |
urlrequired | string |