summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2025-08-16 16:26:12 +0300
committerPaul Buetow <paul@buetow.org>2025-08-16 16:26:12 +0300
commit833bb66706dd991ecd3973da360c472d818e970a (patch)
tree62d8465b305883af1002063eb54ef38a08de299d /README.md
parent148cda5f7ed4513528e3a46164b990708eeb1bc6 (diff)
logging: migrate LSP logs to global singleton (internal/logging); use consistent colors/prefix; refactor LLM provider to use global logger and remove per-client loggers
Diffstat (limited to 'README.md')
-rw-r--r--README.md32
1 files changed, 16 insertions, 16 deletions
diff --git a/README.md b/README.md
index 22a7821..c3c77c2 100644
--- a/README.md
+++ b/README.md
@@ -12,7 +12,7 @@ Hexai exposes a simple LLM provider interface and uses OpenAI by default for
code completion when `OPENAI_API_KEY` is present in the environment.
- Required: set `OPENAI_API_KEY` to your OpenAI API key.
-- Optional: set `OPENAI_MODEL` (default: `gpt-4o-mini`).
+- Optional: set `OPENAI_MODEL`.
- Optional: set `OPENAI_BASE_URL` to point at a compatible endpoint.
If no key is configured, Hexai will fall back to a basic, local completion.
@@ -20,17 +20,17 @@ If no key is configured, Hexai will fall back to a basic, local completion.
## CLI usage and configuration
- Run LSP server over stdio:
- - `hexai -stdio`
+ - `hexai`
- Completion settings:
- - `-max-tokens`: maximum tokens for LLM completions (default `500`). If the flag isn’t provided, `HEXAI_MAX_TOKENS` is used when set.
+ - `-max-tokens`: maximum tokens for LLM completions. If the flag isn’t provided, `HEXAI_MAX_TOKENS` is used when set.
- `-context-mode`: how much additional context to include with completion prompts (If the flag isn’t provided, `HEXAI_CONTEXT_MODE` is used when set). One of:
- `minimal`: no extra context
- `window`: include a sliding window around the cursor
- - `file-on-new-func` (default): include the full file only when defining a new function (cursor before the opening `{`)
+ - `file-on-new-func`ude the full file only when defining a new function (cursor before the opening `{`)
- `always-full`: always include the full file (may be slower/costly)
- - `-context-window-lines`: line count for the sliding window when `context-mode=window` (default `120`).
- - `-max-context-tokens`: budget for additional context tokens (default `2000`). If the flag isn’t provided, `HEXAI_MAX_CONTEXT_TOKENS` is used when set.
+ - `-context-window-lines`: line count for the sliding window when `context-mode=window`.
+ - `-max-context-tokens`: budget for additional context tokens. If the flag isn’t provided, `HEXAI_MAX_CONTEXT_TOKENS` is used when set.
Notes:
- Token estimation for truncation uses a simple 4 chars/token heuristic.
@@ -38,13 +38,13 @@ Notes:
### Flags quick reference
-| Flag | Default | Env override | Description |
-|-------------------------|--------------------|----------------------------|----------------------------------------------------|
-| `-stdio` | `true` | — | Run as LSP over stdio (only supported mode). |
-| `-log` | `/tmp/hexai.log` | — | Path to log file (optional). |
-| `-max-tokens` | `500` | `HEXAI_MAX_TOKENS` | Max tokens for LLM completions. |
-| `-context-mode` | `file-on-new-func` | `HEXAI_CONTEXT_MODE` | `minimal` `window` `file-on-new-func` `always-full` |
-| `-context-window-lines` | `120` | `HEXAI_CONTEXT_WINDOW_LINES` | Lines around cursor when using `window` mode. |
-| `-max-context-tokens` | `2000` | `HEXAI_MAX_CONTEXT_TOKENS` | Token budget for additional context. |
-| `-log-preview-limit` | `0` (unlimited) | `HEXAI_LOG_PREVIEW_LIMIT` | Limit characters shown in LLM preview logs. |
-| `-no-disk-io` | `true` | `HEXAI_NO_DISK_IO` | Disallow any disk reads for context. |
+| Flag | Env override | Description |
+|-------------------------|----------------------------|----------------------------------------------------|
+| `-stdio` | — | Run as LSP over stdio (only supported mode). |
+| `-log` | — | Path to log file (optional). |
+| `-max-tokens` | `HEXAI_MAX_TOKENS` | Max tokens for LLM completions. |
+| `-context-mode` | `HEXAI_CONTEXT_MODE` | `minimal` `window` `file-on-new-func` `always-full` |
+| `-context-window-lines` | `HEXAI_CONTEXT_WINDOW_LINES` | Lines around cursor when using `window` mode. |
+| `-max-context-tokens` | `HEXAI_MAX_CONTEXT_TOKENS` | Token budget for additional context. |
+| `-log-preview-limit` | `HEXAI_LOG_PREVIEW_LIMIT` | Limit characters shown in LLM preview logs. |
+| `-no-disk-io` | `HEXAI_NO_DISK_IO` | Disallow any disk reads for context. |