Configuration
Intend uses a configuration file intend.config.json at the root of your project to manage settings, AI providers, and compiler behavior.
Example Config
json
{
"sourceDir": "./src/intents",
"outDir": "./out",
"provider": "ollama",
"ollama": {
"model": "llama3",
"baseUrl": "http://localhost:11434"
},
"gemini": {
"apiKey": "${GEMINI_API_KEY}",
"model": "gemini-2.5-flash-lite"
},
"debug": false
}Options Reference
Core Settings
| Option | Type | Default | Description |
|---|---|---|---|
sourceDir | string | "./src/intents" | Directory to scan for .intent files. |
outDir | string | "./out" | Directory where generated TypeScript files will be placed. |
provider | "gemini" | "ollama" | "gemini" | Required. The AI provider backend to use. |
include | string[] | ["**/*.intent"] | Glob patterns to include. |
exclude | string[] | ["**/*.test.intent"] | Glob patterns to exclude. |
debug | boolean | false | Enable verbose logging of AI prompts and reasoning. |
Ollama Configuration
Used when provider is set to "ollama".
| Option | Type | Default | Description |
|---|---|---|---|
ollama.model | string | "llama3" | The model name to pull/run. |
ollama.baseUrl | string | "http://localhost:11434" | URL of the Ollama server. |
ollama.temperature | number | 0.2 | Creativity level (0.0 - 1.0). |
ollama.num_thread | number | undefined | Number of threads to use for generation. |
Gemini Configuration
Used when provider is set to "gemini".
| Option | Type | Default | Description |
|---|---|---|---|
gemini.apiKey | string | "${GEMINI_API_KEY}" | Your Google AI Studio API Key. |
gemini.model | string | "gemini-2.5-flash-lite" | The Gemini model version. |
gemini.temperature | number | 0.2 | Creativity level (0.0 - 1.0). |
Environment Variables
You can use environment variables in your config file by using the ${VAR_NAME} syntax. This is highly recommended for secrets like API keys.
- Create a
.envfile (ensure it is git-ignored):envGEMINI_API_KEY=your_actual_key_here - Reference it in
intend.config.json:json"apiKey": "${GEMINI_API_KEY}"