Skip to content
Castellan
Pinder's icon

Reference · Pinder

Read as

The Pinder's settings, files and commands

Every setting with its default, where the Pinder keeps its files, its command line, and its local API.

Article
1604
Applies to
Pinder 0.5.18
Last reviewed
For
For developers
Written for Pinder 0.5.18. Pinder is at 0.5.19 now (1 small release since: what changed).

Settings#

On its page, under Settings in the title bar. Each shows its value, its default and a line on what it does, with Reset to default. Save checks every change first (a port out of range or listed twice, an empty name, a number out of range) and saves nothing until all are right. They apply at once: a process added to the allowlist leaves the pound straight away.

SettingDefaultWhat it does
An orphan is a stray after30 minutesAn orphaned runtime counts once it has run this long.
A runaway after10 minutesHot in every reading for this long.
AllowlistEmptyEach a Name (glob) and a Command-line pattern, * for anything. Empty pattern: a process with no command line.
A round every (Advanced)10 minutes1 to 1,440 minutes.
Hot above (Advanced)25% of one coreWhat counts as a hot reading.
CPU sample (Advanced)3 secondsBetween the two CPU readings, 1 to 30.
Runtimes watched (Advanced)node, python, dotnet, java, adb, emulator and othersThe process names (globs) that can be strays.
Launchers (Advanced)bash, sh, cmd, powershell, pwsh, conhostShells looked through when they only wrap one command.
Never under these (Advanced)Your terminals and editorsAlive above a process, it's never a stray.
More agent ports (Advanced)EmptyAgents beyond Castellan's staff: a Port and its Agent.
Shared servers (Advanced)GenieX, npu-embedWhat it is, and a Process name (glob), text its Command line holds, or a Port. Never orphans, still watched for CPU.
Model calls per round (Advanced)10New notes a round, at most 10. 0: none.

They're kept in %USERPROFILE%\.pinder\settings.json.

Files#

All in %USERPROFILE%\.pinder:

FileWhat's in it
settings.jsonIts settings and the allowlist.
report.jsonThe last round: strays, shared servers, agents, counts, how the notes went.
state.jsonThe CPU readings behind runaways.
notes.jsonThe newest 500 notes, each with where it was written.
impounded.jsonlEvery impound attempt, with its command line (secrets hidden).
server.json, serve.logThe running page's process, port and token, and its log.

PINDER_HOME moves its data folder, and PINDER_PORT its page.

Commands#

Run with node $HOME\.pinder\app\src\cli.ts <command>:

CommandWhat it does
runOne round here and now; prints the strays. Stops nothing.
startOn duty: its rounds run on their schedule, and its page is up. Castellan's Start.
stopOff duty: its scheduled rounds pause. The page stays up, and Run now still works. Castellan's Stop.
openMakes sure its page is up, without changing duty.
shutdownEnds its page's process, and with it any round.
statusExits 0 when on duty and working, 3 when not. --json prints what Castellan reads.
uninstallRemoves it and its sign-in task. --purge removes its data too; --dry-run says what it would do.

Its rounds run inside its page's process, so stopping it in Castellan stops its work. It starts at sign-in from the scheduled task \Pinder\Home page.

Local API#

At http://pinder.localhost:19393/, answering only this PC:

AddressWhat it answers
GET /api/pingIts version and duty, with busy (a round under way) and strays (how many are in the pound).
GET /api/reportThe last round's report, as JSON.

Its buttons need the token from its own page, so nothing else can impound through it.

Is this page right?

If something on it is wrong or out of date, tell us and we'll fix the page.

Still stuck? Write to support@castellan-software.com and mention article 1604. Every version of Pinder, and what changed in it, is in its release notes.