Skip to main content
NoteWise reads settings from code defaults, config.db, environment variables, and command flags.

State directory

By default, state lives under ~/.notewise. Set NOTEWISE_HOME to move this state root.
Older installs stored config in a ~/.notewise/config.env text file. On the first run after upgrading, NoteWise imports any existing config.env into config.db and deletes the file — no manual migration needed.

Practical precedence

For a command run, command-line flags win. For OUTPUT_DIR, the value in config.db is used unless --output is passed. Other settings use environment variables, then config.db, then code defaults.

Custom OpenAI-compatible endpoints

notewise setup lists built-in providers, each saved custom endpoint by name, and Add custom OpenAI-compatible endpoint. Select a saved endpoint to use its current configuration, or choose Add to enter a name, base URL, and API key. For either path, setup requests the endpoint’s current /v1/models list, requires you to select a discovered model, and sends a tiny completion request to verify that selection. The verification can incur a small provider charge. Adding an endpoint appends it to the registry. Adding a name that normalizes to an existing name replaces only that endpoint after discovery and verification succeed; other saved endpoints remain unchanged. Names are unique after normalization and cannot use LiteLLM provider prefixes. Base URLs must be absolute HTTPS URLs, except explicit loopback endpoints may use HTTP. Setup accepts a URL with or without /v1 and stores it with the /v1 suffix. The registry is stored as one row per endpoint (name, base_url, api_key) in a dedicated table in ~/.notewise/config.db, managed with notewise inference list|add|update|delete. You can also override the whole registry for one process with the CUSTOM_LLM_ENDPOINTS environment variable, a compact JSON array with the same fields — this safe two-profile example uses placeholder credentials:
Custom models are always named <name>/<model-id>. When that name exactly matches a saved profile prefix, NoteWise uses that profile’s endpoint configuration and sends the compatible request as openai/<model-id>. CUSTOM_LLM_ENDPOINTS is a secret-bearing value: notewise config masks the entire value, and NoteWise never copies its credentials into ambient environment variables.

Common config keys

Provider API keys and provider auth keys are also accepted in config.db (via notewise config set KEY VALUE) when they are listed in source constants. Omit VALUE for a sensitive key to be prompted for it with hidden input instead of typing it as a plain CLI argument.
chunk_size, chunk_overlap, and max_concurrent_chapters are code-default settings, not normal config.db keys.

Commands

notewise config (no arguments) masks secrets before printing all settings. notewise config keys lists every key get/set/unset accept, since the full set (provider API keys, provider auth keys, and core settings) isn’t obvious up front. notewise config get/set/unset read or write one key at a time; set validates the new value immediately and reports an error without leaving the process in a broken state if it’s invalid (e.g. TEMPERATURE out of range). edit-config opens the current settings as an editable env-style file in your $EDITOR, then re-saves whatever you leave in it — including removing lines you delete.
Last modified on September 13, 2026