src / configSchematics.ts
import { createConfigSchematics } from "@lmstudio/sdk";
export const configSchematics = createConfigSchematics()
.field(
"shell",
"string",
{
displayName: "Shell binary",
hint: "Absolute path to the shell to use. Leave blank to auto-detect from $SHELL or the user's login shell (e.g. /bin/zsh on macOS, /bin/bash on Linux).",
},
"",
)
.field(
"loginShell",
"boolean",
{
displayName: "Use login shell",
hint: "Pass -l so the shell sources the user's login profile (~/.zprofile, ~/.bash_profile). Required to inherit the user's PATH and environment, since LM Studio's plugin runtime starts with a stripped PATH.",
},
true,
)
.field(
"defaultCwd",
"string",
{
displayName: "Default working directory",
hint: "Directory commands run in when the model does not specify one. Leave blank to use the user's home directory.",
},
"",
)
.field(
"timeoutMs",
"numeric",
{
displayName: "Default timeout (ms)",
hint: "Default per-command timeout. Commands exceeding this are sent SIGTERM, then SIGKILL after a 2s grace period.",
min: 1000,
max: 600000,
int: true,
},
60000,
)
.field(
"maxOutputBytes",
"numeric",
{
displayName: "Max output bytes",
hint: "Per-stream cap on captured stdout/stderr. Output past this is dropped with a [truncated] marker so a chatty command does not blow up the model's context.",
min: 1024,
max: 10485760,
int: true,
},
262144,
)
.build();