Skip to content

Reference

Scripts

ScriptPurpose
pnpm run devRun Vite and the API server for local web development.
pnpm run dev:apiRun only the Express API server.
pnpm run startServe the built app/API.
pnpm run buildTypecheck and build the Vite app plus CLI bundle.
pnpm cli:buildBuild the Node CLI to dist/cli.js.
pnpm cli:devRun the TypeScript CLI entry with tsx.
pnpm run testRun Vitest tests.
pnpm run lintRun Oxlint.
pnpm run formatCheck formatting with oxfmt.
pnpm desktop:devRun the Tauri desktop app in development.
pnpm desktop:checkTypecheck and run Rust cargo check.
pnpm desktop:buildBuild the Tauri desktop app.
pnpm eval:smokeRun the Promptfoo smoke eval.
pnpm eval:iterationsRun focused iteration evals.
pnpm eval:iterations:matrixRun the full iteration matrix.
pnpm docs:devRun this documentation site locally.
pnpm docs:buildBuild this documentation site.
pnpm docs:previewPreview the built documentation site.

Provider Settings

See Provider Setup for LM Studio startup steps, UI endpoint configuration, OpenAI-compatible endpoint requirements, and remote-provider limitations.

ts
type ModelProviderSettings = {
  baseUrl: string;
  model?: string;
  reasoningEffort?: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh';
};

Default:

ts
{
  baseUrl: 'http://localhost:1234/v1',
  model: 'gemma-4',
  reasoningEffort: 'none',
}

Pipeline Options

ts
type PipelineOptions = {
  includeDebug?: boolean;
  styleThreshold?: number;
  finalSmoothing?: boolean;
  maxRewriteIterations?: number;
  runMeaningCheck?: boolean;
};

GET /api/health

Checks whether the default provider, or a supplied baseUrl, can list models.

sh
curl http://127.0.0.1:5174/api/health
sh
curl 'http://127.0.0.1:5174/api/health?baseUrl=http://localhost:11434/v1'

Response fields:

ts
{
  gemma4Found: boolean;
  lmStudioReachable: boolean;
  model: string;
  ok: boolean;
  status: string;
  error?: string;
}

GET /api/models

Lists models from the default provider or a supplied baseUrl.

sh
curl 'http://127.0.0.1:5174/api/models?baseUrl=http://localhost:1234/v1'

POST /api/rewrite

Runs the rewrite pipeline.

sh
curl -X POST http://127.0.0.1:5174/api/rewrite \
  -H 'Content-Type: application/json' \
  --data '{
    "document": "Our platform leverages advanced AI to improve workflows.",
    "provider": {
      "baseUrl": "http://localhost:1234/v1",
      "model": "google/gemma-4-12b-qat",
      "reasoningEffort": "none"
    },
    "options": {
      "includeDebug": true,
      "maxRewriteIterations": 2,
      "runMeaningCheck": true
    }
  }'

POST /api/eval/rewrite

Runs the eval rewrite endpoint against fixture profiles.

json
{
  "source": "This paragraph needs a clearer product-note style.",
  "styleProfileId": "direct-technical",
  "providerId": "lmstudio",
  "model": "google/gemma-4-12b-qat",
  "options": {
    "maxRewriteIterations": 2,
    "reasoningEffort": "none",
    "runMeaningCheck": true,
    "runFinalSmoothing": false
  }
}

Fixture profiles live under evals/fixtures/profiles/.

Eval Environment Variables

VariablePurpose
STYLEMAKAR_API_BASE_URLStyleMakar API server URL. Defaults to http://127.0.0.1:5174.
STYLEMAKAR_EVAL_BASE_URLOpenAI-compatible provider base URL for eval scripts.
STYLEMAKAR_EVAL_PROVIDER_IDProvider id or URL sent to /api/eval/rewrite; takes precedence over STYLEMAKAR_EVAL_BASE_URL.
STYLEMAKAR_EVAL_MODELModel id sent to the provider.
STYLEMAKAR_EVAL_REASONING_EFFORTReasoning effort passed through to compatible providers. Defaults to none.
STYLEMAKAR_EVAL_CASE_FILTERFilter used by the matrix eval script.

Released under the MIT License.