Skip to main content

Configuration Options

MyCoder provides a comprehensive configuration system that allows you to customize its behavior according to your preferences. This page details all available configuration options and how to use them.

Using the Configuration System

MyCoder is configured using a mycoder.config.js file in your project root, similar to ESLint and other modern JavaScript tools. This file exports a configuration object with your preferred settings.

// mycoder.config.js
export default {
// GitHub integration
githubMode: true,

// Browser settings
headless: true,
userSession: false,
pageFilter: 'none', // 'simple', 'none', or 'readability'

// Model settings
provider: 'anthropic',
model: 'claude-3-7-sonnet-20250219',
maxTokens: 4096,
temperature: 0.7,

// Custom settings
customPrompt: '',
profile: false,
tokenCache: true,
};

MyCoder will search for configuration in the following places (in order of precedence):

  1. CLI options (e.g., --githubMode true)
  2. Configuration file (mycoder.config.js)
  3. Default values

Available Configuration Options

AI Model Selection

OptionDescriptionPossible ValuesDefault
providerThe AI provider to useanthropic, openai, mistral, xai, ollamaanthropic
modelThe specific model to useDepends on providerclaude-3-7-sonnet-20250219

Example:

// mycoder.config.js
export default {
// Use OpenAI as the provider with GPT-4o model
provider: 'openai',
model: 'gpt-4o',
};

Logging and Debugging

OptionDescriptionPossible ValuesDefault
logLevelMinimum level of logs to showdebug, verbose, info, warn, errorinfo
tokenUsageShow token usage in logstrue, falsefalse
profileEnable performance profilingtrue, falsefalse

Example:

// mycoder.config.js
export default {
// Enable verbose logging and token usage reporting
logLevel: 'verbose',
tokenUsage: true,
};

Browser Integration

OptionDescriptionPossible ValuesDefault
headlessRun browser in headless modetrue, falsetrue
userSessionUse existing browser sessiontrue, falsefalse
pageFilterMethod to process webpage contentsimple, none, readabilitysimple

Example:

// mycoder.config.js
export default {
// Show browser windows and use readability for better web content parsing
headless: false,
pageFilter: 'readability',
};

Behavior Customization

OptionDescriptionPossible ValuesDefault
customPromptCustom instructions for the AIAny string""
githubModeEnable GitHub integrationtrue, falsefalse

Example:

// mycoder.config.js
export default {
// Set a custom prompt to guide the AI's behavior
customPrompt: "Always write TypeScript code with proper type annotations. Prefer functional programming patterns where appropriate.",

// Enable GitHub integration
githubMode: true,
};

Configuration File Location

The mycoder.config.js file should be placed in the root directory of your project. MyCoder will automatically detect and use this file when run from within the project directory or any of its subdirectories.

Overriding Configuration

Command-line arguments always override the stored configuration. For example:

# Use a different model provider just for this session
mycoder --provider openai "Create a React component"

This will use OpenAI for this session only, without changing your stored configuration.

Configuration Examples

Basic Configuration

// mycoder.config.js
export default {
provider: 'anthropic',
model: 'claude-3-7-sonnet-20250219',
githubMode: false,
};

Advanced Configuration

// mycoder.config.js
export default {
// Model settings
provider: 'anthropic',
model: 'claude-3-7-sonnet-20250219',
maxTokens: 4096,
temperature: 0.7,

// Browser settings
headless: false,
userSession: true,
pageFilter: 'readability',

// GitHub integration
githubMode: true,

// Custom settings
customPrompt: 'Always prioritize readability and simplicity in your code. Prefer TypeScript over JavaScript when possible.',
profile: true,
tokenUsage: true,
tokenCache: true,
};