-
Notifications
You must be signed in to change notification settings - Fork 0
Configuration
Complete guide to configuring ALICE.
~/.alice/settings.jsonc
Platform-specific paths:
-
Windows:
C:\Users\<username>\.alice\settings.jsonc -
macOS:
/Users/<username>/.alice/settings.jsonc -
Linux:
/home/<username>/.alice/settings.jsonc
On first run, ALICE creates the configuration directory and file automatically with default values.
ALICE uses JSONC (JSON with Comments) format:
Type: string
Default: "."
Description: Default working directory for ALICE
{
"workspace": "." // Current directory
}Examples:
"workspace": "D:\\projects\\myproject" // Windows
"workspace": "/home/user/projects" // Linux/macOS
"workspace": "~/Documents/work" // Home directoryType: string
Default: "auto"
Description: LLM model to use
{
"llm": {
"model": "auto" // Let LM Studio choose
}
}Options:
-
"auto"- LM Studio picks best available model -
"gpt-3.5-turbo"- OpenAI GPT-3.5 -
"gpt-4"- OpenAI GPT-4 -
"deepseek-coder"- DeepSeek Coder - Any model supported by your backend
See Model Configuration Guide →
Type: string
Default: "http://localhost:1234/v1"
Description: LLM API endpoint
{
"llm": {
"baseURL": "http://localhost:1234/v1" // LM Studio default
}
}Common endpoints:
// LM Studio
"baseURL": "http://localhost:1234/v1"
// OpenAI
"baseURL": "https://api.openai.com/v1"
// Ollama
"baseURL": "http://localhost:11434/v1"
// Custom
"baseURL": "https://my-llm-server.com/v1"Type: string
Default: ""
Description: API key for LLM service
{
"llm": {
"apiKey": "sk-your-api-key-here"
}
}- Never commit API keys to Git
- Use environment variables instead:
$OPENAI_API_KEY - LM Studio doesn't require API key
See Environment Variables Guide →
Type: number (0.0 - 2.0)
Default: 0.7
Description: Controls response randomness
{
"llm": {
"temperature": 0.7 // Balanced creativity
}
}Guidelines:
-
0.0 - 0.3- Focused, deterministic (code generation) -
0.4 - 0.8- Balanced (general chat) -
0.9 - 2.0- Creative, diverse (brainstorming)
Type: number
Default: 2000
Description: Maximum tokens per response
{
"llm": {
"maxTokens": 2000 // About 1500 words
}
}Token guidelines:
-
500- Short answers -
1000- Normal responses -
2000- Detailed responses (default) -
4000+- Very long responses (slower)
Type: boolean
Default: true (recommended)
Description: Require confirmation for dangerous commands
{
"dangerous_cmd": true // Ask before dangerous operations
}Behavior:
-
true- Show confirmation dialog for dangerous commands (recommended) -
false- Execute all commands without asking (⚠️ dangerous!)
Dangerous operations:
- File deletion (
rm -rf,del /s) - Disk formatting (
format,mkfs) - System shutdown (
shutdown,reboot) - Disk operations (
dd if=)
Learn more about dangerous commands →
{
"workspace": ".",
"llm": {
"model": "gpt-4",
"baseURL": "https://api.openai.com/v1",
"apiKey": "$OPENAI_API_KEY", // Use environment variable
"temperature": 0.7,
"maxTokens": 2000
},
"dangerous_cmd": true
}{
"workspace": ".",
"llm": {
"model": "auto",
"baseURL": "http://localhost:1234/v1",
"apiKey": "", // Not needed
"temperature": 0.7,
"maxTokens": 2000
},
"dangerous_cmd": true
}{
"workspace": "~/projects",
"llm": {
"model": "deepseek-coder",
"baseURL": "http://localhost:1234/v1",
"apiKey": "",
"temperature": 0.2, // More focused
"maxTokens": 4000 // Longer code
},
"dangerous_cmd": true // Still ask for confirmation
}{
"workspace": ".",
"llm": {
"model": "gpt-4",
"baseURL": "https://api.openai.com/v1",
"apiKey": "$OPENAI_API_KEY",
"temperature": 0.7,
"maxTokens": 2000
},
"dangerous_cmd": false // ⚠️ No safety confirmations!
}Instead of hardcoding API keys:
{
"llm": {
"apiKey": "$OPENAI_API_KEY" // Reads from environment
}
}Set in your shell:
# Windows (PowerShell)
$env:OPENAI_API_KEY="sk-your-key"
# macOS/Linux (Bash)
export OPENAI_API_KEY="sk-your-key"Full environment variables guide →
Switch between models:
{
"llm": {
"model": "gpt-4", // Change this to switch models
"baseURL": "https://api.openai.com/v1",
"apiKey": "$OPENAI_API_KEY",
"temperature": 0.7,
"maxTokens": 2000
}
}Learn about multi-model setups →
Open the file in your editor:
# Windows
notepad %USERPROFILE%\.alice\settings.jsonc
# macOS
open ~/.alice/settings.jsonc
# Linux
nano ~/.alice/settings.jsoncChanges take effect on next ALICE restart.
Delete the configuration file:
# Windows
del %USERPROFILE%\.alice\settings.jsonc
# macOS/Linux
rm ~/.alice/settings.jsoncALICE will recreate it with defaults on next run.
ALICE validates your configuration on startup.
❌ Error: Failed to parse settings.jsonc
Syntax error at line 5
Solution: Check for missing commas, quotes, brackets
❌ Error: Invalid baseURL
Must start with http:// or https://
Solution: Use full URL with protocol
❌ Error: temperature must be between 0.0 and 2.0
Solution: Use value in valid range
Problem: Changes don't take effect
Solutions:
- Restart ALICE
- Check file location:
~/.alice/settings.jsonc - Verify JSON syntax (use JSON validator)
Problem: File doesn't exist
Solutions:
- Run ALICE once to auto-create
- Create manually with defaults
- Check user home directory
Problem: Authentication fails
Solutions:
- Verify API key is correct
- Check environment variable is set
- Try hardcoding key (temporarily)
- Ensure no extra spaces/quotes
- Quick Start - Get started with ALICE
- Model Configuration - Detailed model setup
- Environment Variables - Secure API key management
- Dangerous Commands - Safety features
- FAQ - Common questions
{ // Workspace settings "workspace": ".", // LLM configuration "llm": { "model": "auto", "baseURL": "http://localhost:1234/v1", "apiKey": "", "temperature": 0.7, "maxTokens": 2000 }, // Tool safety "dangerous_cmd": true }