-
-
Notifications
You must be signed in to change notification settings - Fork 28
Configuration
This document explains how to configure the In Memoria application. Configuration is managed through a combination of a config.json file and environment variables.
When you run in-memoria setup --interactive or in-memoria init, a configuration directory is created at the root of your project: .in-memoria/. Inside this directory, you will find config.json.
This file contains settings that are specific to the project being analyzed.
Example config.json:
{
"version": "0.5.4",
"project": {
"name": "my-awesome-project",
"languages": ["typescript", "rust"]
},
"intelligence": {
"enableRealTimeAnalysis": true,
"enablePatternLearning": true,
"vectorEmbeddings": true
},
"watching": {
"patterns": ["**/*.ts", "**/*.tsx", "**/*.rs"],
"ignored": [
"**/node_modules/**",
"**/.git/**",
"**/dist/**",
"**/build/**",
"**/target/**"
],
"debounceMs": 500
},
"mcp": {
"serverPort": 3000,
"enableAllTools": true
}
}Key Sections:
-
project: Basic information about the project being analyzed. -
intelligence: Toggles for core In Memoria features.-
enableRealTimeAnalysis: Iftrue, the file watcher will analyze changes as they happen. -
enablePatternLearning: Iftrue, the system will learn and update coding patterns. -
vectorEmbeddings: Iftrue, enables semantic search capabilities using local embeddings.
-
-
watching: Configuration for the file watcher.-
patterns: An array of glob patterns for the files to watch. -
ignored: An array of glob patterns for files and directories to ignore. -
debounceMs: The delay (in milliseconds) to wait after a file change before triggering an analysis, to prevent excessive processing while typing.
-
-
mcp: Settings for the MCP server.-
serverPort: The port on which the MCP server will listen for connections from AI agents.
-
In addition to the project-specific config.json, there is a global configuration file within the In Memoria source code at src/config/config.ts. This file defines the default values for all settings and manages configuration loading.
This file is not meant to be edited by end-users directly, but it provides a complete reference for all available settings.
This interface defines the shape of the complete configuration object.
export interface InMemoriaConfig {
database: {
filename: string;
// ...
};
performance: {
batchSize: number;
maxConcurrentFiles: number;
// ...
};
analysis: {
supportedLanguages: string[];
maxFileSize: number; // in bytes
skipDirectories: string[];
skipFilePatterns: string[];
};
logging: {
level: 'error' | 'warn' | 'info' | 'debug';
// ...
};
}You can override many of the default settings using environment variables. This is useful for CI/CD environments or for making temporary adjustments without modifying configuration files.
-
IN_MEMORIA_DB_FILENAME: Overrides the name of the database file (default:in-memoria.db). -
IN_MEMORIA_BATCH_SIZE: The number of files to process in a single batch during analysis (default:50). -
IN_MEMORIA_MAX_CONCURRENT: The maximum number of files to analyze concurrently (default:10). -
IN_MEMORIA_REQUEST_TIMEOUT: The timeout in milliseconds for external API requests (default:30000). -
IN_MEMORIA_LOG_LEVEL: Sets the logging verbosity. Can beerror,warn,info, ordebug(default:info). -
IN_MEMORIA_PERFORMANCE_LOGGING: Set totrueto enable detailed performance logging. -
IN_MEMORIA_VECTOR_DB_PATH: Overrides the path for the vector embeddings database (default:in-memoria-vectors.db).
Environment variables always take precedence over settings in config.json or the default configuration.