Mira Code Configuration
Mira Code can be configured at multiple levels: globally, per-project, and through instruction files. This page covers all configuration options and their precedence.
Configuration Precedence
When the same option is specified in multiple places, Mira Code uses the following precedence order (highest to lowest):
1. CLI flags (--model mira-pro) 2. Environment vars (MIRA_MODEL=mira-pro) 3. Project local settings (.mira/settings.local.json) 4. Project settings (.mira/settings.json) 5. Global config (~/.mira.json) 6. Default values
Global Configuration
Global configuration applies to all projects and is stored in the user's home directory:
{
"model": "mira",
"maxTokens": 4096,
"theme": "dark",
"permissions": {
"fileRead": "auto",
"fileWrite": "ask",
"commandExecution": "ask"
},
"telemetry": false,
"editor": "code",
"shell": "/bin/zsh"
}This file is created automatically on first launch. You can edit it with any text editor.
Project Settings
Project settings are stored in .mira/settings.json in the project root. They override global settings:
{
"permissions": {
"allow": [
"Read",
"Edit",
"Write",
"Bash(npm test:*)",
"Bash(npm run build)"
],
"deny": [
"Bash(rm -rf *)"
]
},
"env": {
"MIRA_MODEL": "mira-pro"
}
}For private settings, use .mira/settings.local.json (add to .gitignore):
{
"env": {
"MIRA_API_KEY": "sk-mira-your-personal-key"
}
}Instruction Files (MIRA.md)
Mira Code supports MIRA.md files for storing project-specific instructions. These files are written in Markdown and loaded automatically at startup:
# Project Instructions ## Code Style - Use functional components with TypeScript - Prefer named exports over default exports - Use Tailwind CSS for styling — no CSS modules - All components must have proper TypeScript interfaces ## Architecture - Follow the App Router pattern (Next.js 14+) - Server components by default, "use client" only when needed - Data fetching in server components, not in client components ## Testing - Write tests for all utility functions - Use Vitest + React Testing Library - Minimum 80% coverage for new code ## Git - Use conventional commits (feat:, fix:, chore:, etc.) - Keep commits atomic — one logical change per commit
Mira Code looks for instruction files in the following order:
- MIRA.md — In project root (recommended)
- .mira/MIRA.md — In the project .mira directory
- .mira/rules/*.md — Rules in the .mira/rules directory
- MIRA.local.md — Private instructions (add to .gitignore)
Themes and Appearance
Mira Code supports two display themes:
// In ~/.mira.json
{
"theme": "light"
}
// Or via environment variable
export MIRA_THEME="light"Model Selection
Mira Code supports multiple AI models. Available models are fetched dynamically from the vmira.ai platform:
# CLI flag (highest priority)
mira --model mira-pro
# Environment variable
export MIRA_MODEL="mira-pro"
# In .mira/settings.json
{ "env": { "MIRA_MODEL": "mira-pro" } }
# Interactive: use /model command
> /modelPermission System
Mira Code uses a tool-based permission system. Each tool (Read, Edit, Write, Bash, etc.) can be allowed or denied in project settings:
{
"permissions": {
"allow": [
"Read",
"Edit",
"Write",
"Bash(npm test:*)",
"Bash(npm run build)"
],
"deny": [
"Bash(rm -rf *)"
]
}
}By default, Mira Code asks for confirmation before writing files and running commands. File reads are allowed automatically.