LLM
cratis llm configures the language model that Cratis tools use. The CLI does not talk to a language model itself — it stores the provider settings in ~/.cratis/config.json, where tools such as Prologue pick them up, for example when interpreting a captured system.
cratis llm use <KIND>cratis llm showcratis llm clearProviders
Section titled “Providers”| Kind | Description | Default model hint |
|---|---|---|
anthropic | Anthropic’s hosted API | claude-opus-4-6 |
openai | OpenAI’s hosted API | gpt-4o-mini |
local | Any OpenAI-compatible endpoint running on your own machine (e.g. Ollama, LM Studio) | none |
cratis llm use <KIND>
Section titled “cratis llm use <KIND>”Configures the provider and saves it to the configuration file. Values not passed as options are prompted for interactively when running in a terminal — the API key with hidden input, the endpoint only for local (where it is required), and the model with the provider’s default pre-filled.
| Option | Description |
|---|---|
--api-key <KEY> | API key for the provider. Required for anthropic and openai; optional for local. |
--endpoint <URL> | Endpoint URL. Required for local (e.g. http://localhost:11434/v1); the hosted providers use their own default endpoints. |
--model <NAME> | Model to use. Optional — each hosted provider has a sensible default. |
cratis llm use anthropiccratis llm use openai --api-key sk-... --model gpt-4o-minicratis llm use local --endpoint http://localhost:11434/v1 --model llama3When the terminal is not interactive (CI, piped input), all required values must be passed as options — a missing required value fails with a validation error and a non-zero exit code.
cratis llm show
Section titled “cratis llm show”Displays the configured provider. The API key is always masked — only the first and last four characters are shown, and keys too short to mask partially are hidden entirely. Global options such as -o/--output select the output format — see Global Options.
cratis llm clear
Section titled “cratis llm clear”Removes the language model configuration, including the stored API key. Prompts for confirmation; pass -y/--yes to skip the prompt.
What is stored
Section titled “What is stored”The settings live in the llm section of ~/.cratis/config.json:
{ "llm": { "kind": "anthropic", "apiKey": "sk-ant-...", "model": "claude-opus-4-6" }}Errors
Section titled “Errors”| Condition | Result |
|---|---|
Unknown <KIND> | Validation error listing the valid kinds. |
Missing API key for anthropic/openai in a non-interactive terminal | Validation error. |
Missing --endpoint for local in a non-interactive terminal | Validation error. |