Ktavi uses a layered configuration system. You can configure it at the project level, global level, or rely on defaults.
Create a config file with the interactive wizard:
ktavi config initOr with defaults:
ktavi config init --defaultsThis creates a ktavi.config.ts (or .js) in your project root.
export default {
ai: {
provider: 'openai',
textModel: 'gpt-4o',
imageModel: 'gpt-image-2',
},
writing: {
defaultMode: 'medium',
},
image: {
size: '1792x1024',
style: 'modern editorial illustration',
},
markdown: {
coverField: 'cover',
},
storage: {
provider: 'local',
local: {
outputDir: './temp/images/blog',
publicPathPrefix: '/images/blog',
},
},
};Configuration is loaded with the following priority (highest first):
- Project config --
ktavi.config.tsorktavi.config.jsin the current working directory - Global config --
~/.config/ktavi/config.js - Defaults -- built-in defaults
Values are deep-merged: a project config only needs to specify the fields it overrides.
| Field | Type | Default | Description |
|---|---|---|---|
provider |
'openai' |
'openai' |
AI provider |
textModel |
string |
'gpt-4o' |
Model for text generation (review, SEO, summary, cover prompt) |
imageModel |
string |
'gpt-image-2' |
Model for image generation |
| Field | Type | Default | Description |
|---|---|---|---|
defaultMode |
'light' | 'medium' | 'strong' |
'medium' |
Default writing review intensity |
| Field | Type | Default | Description |
|---|---|---|---|
size |
'1024x1024' | '1536x1024' | '1792x1024' |
'1792x1024' |
Generated cover image dimensions |
style |
string |
(none) | Style hint passed to the cover prompt generator (e.g. 'watercolor illustration', 'modern editorial') |
| Field | Type | Default | Description |
|---|---|---|---|
coverField |
'cover' | 'image' | 'heroImage' | 'ogImage' | 'thumbnail' | 'img' | 'cover_image' |
'cover' |
Frontmatter field name used for the cover image URL |
preserveFrontmatterOrder |
boolean |
true |
Preserve original field ordering when updating frontmatter |
| Field | Type | Default | Description |
|---|---|---|---|
provider |
'local' | 'cloudinary' |
'local' |
Default storage target for generated images |
| Field | Type | Default | Description |
|---|---|---|---|
outputDir |
string |
'./temp/images/blog' |
Directory where images are saved |
publicPathPrefix |
string |
'/images/blog' |
URL prefix for the image in frontmatter |
| Field | Type | Default | Description |
|---|---|---|---|
folder |
string |
'blog-covers' |
Cloudinary folder for uploaded images |
See the fully resolved configuration and where each value comes from:
ktavi config showThis displays every field, its value, and its source (default, global, or project).
ktavi config show --json # Machine-readable outputCreate a global config that applies to all projects:
ktavi config init --globalThis writes to ~/.config/ktavi/config.js. Useful for setting your preferred AI model or writing mode across all projects. Project-level config always takes priority over global config.