No description
  • Crystal 91.3%
  • Nix 8.7%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-10-18 21:30:31 +03:00
spec initial commit 2026-10-18 21:30:31 +03:00
src initial commit 2026-10-18 21:30:31 +03:00
.editorconfig initial commit 2026-10-18 21:30:31 +03:00
.envrc initial commit 2026-10-18 21:30:31 +03:00
.gitignore initial commit 2026-10-18 21:30:31 +03:00
flake.lock initial commit 2026-10-18 21:30:31 +03:00
flake.nix initial commit 2026-10-18 21:30:31 +03:00
LICENSE initial commit 2026-10-18 21:30:31 +03:00
README.md initial commit 2026-10-18 21:30:31 +03:00
shard.lock initial commit 2026-10-18 21:30:31 +03:00
shard.yml initial commit 2026-10-18 21:30:31 +03:00

noita

Small command line tools for local LLM shims. Two subcommands: judge asks typed questions about input, tell sends the input with a prompt to a chat endpoint.

judge

noita judge asks typed questions about input through the local crygnet shim — the System One protocol, one token per answer. Files or stdin ride as the request state, question flags define the answers, and all questions in one invocation share a single request.

cat diff.patch | noita judge --noul 'Does this patch touch the auth code?'
noita judge article.md --choice 'lang: Which language is this?' 'en,de,fr'
noita judge cv.txt --score 'How senior is this candidate?' 'junior,mid,senior'

The shim lives at http://127.0.0.1:8009 by default; CRYGNET_URL, CRYGNET_MODEL and CRYGNET_API_KEY override the defaults. See noita judge --help for the full reference.

tell

noita tell sends the input plus a prompt to any OpenAI-compatible chat endpoint. The input goes first, the prompt follows after a blank line, and the pair rides as one user message. With --schema (an inline document) or --schema-file (a path), the generation is constrained with response_format: json_schema (retried without it if the server refuses) and the reply must parse as JSON and validate against the schema — otherwise the command exits 3.

cat diff.patch | noita tell -p 'List the changed files as a JSON array.'
noita tell -p 'Summarize in one sentence:' article.md
noita tell -p 'Extract the CVEs as JSON.' -s cves.schema.json notes.md
noita tell -p 'Extract the CVEs as JSON.' --schema "$CVES_SCHEMA" notes.md

The endpoint defaults to http://127.0.0.1:8080/v1; OPENAI_BASE_URL, OPENAI_MODEL and OPENAI_API_KEY override the defaults. See noita tell --help for the full reference.

Configuration

Both commands resolve settings in the same order: flag, environment, config file, built-in default. The config file is YAML with one section per command, and unknown keys are rejected:

tell:
  url: http://127.0.0.1:8080/v1
  model: qwen3-4b
  timeout: 300
judge:
  url: http://127.0.0.1:8009

The keys are url, model, api_key and timeout (seconds). The file is $NOITA_CONFIG, else $XDG_CONFIG_HOME/noita/config.yaml, else ~/.config/noita/config.yaml; --config points at another file.

For home-manager, the flake exposes a programs.noita module:

programs.noita = {
  enable = true;
  settings.judge.url = "http://127.0.0.1:8009";
};

Development

nix develop
shards install
crystal spec
crystal tool format --check src spec
ameba

Dependencies: webmock for the HTTP integration specs, and json_schemer (with simpleidn, linking libgmp) for schema validation at runtime. The Nix build therefore needs the shards two-step, like crygnet-cli.