Skip to content

Commit 9fd3fa1

Browse files
committed
Update documentation to reflect new mycoder.config.js configuration system
- Remove references to old 'config' CLI commands\n- Update configuration documentation to use mycoder.config.js\n- Update examples throughout the documentation\n- Update platform-specific setup guides\n\nCloses #51
1 parent 7f7a877 commit 9fd3fa1

File tree

8 files changed

+205
-102
lines changed

8 files changed

+205
-102
lines changed

docs/getting-started/index.mdx

+9-6
Original file line numberDiff line numberDiff line change
@@ -66,17 +66,20 @@ MyCoder supports multiple AI providers:
6666
| xAI/Grok | `XAI_API_KEY` | grok-1 |
6767
| Ollama | N/A (local) | Various local models |
6868

69-
You can specify which provider and model to use with the `--modelProvider` and `--modelName` options:
69+
You can specify which provider and model to use with the `--provider` and `--model` options:
7070

7171
```bash
72-
mycoder --modelProvider openai --modelName gpt-4o "Your prompt here"
72+
mycoder --provider openai --model gpt-4o "Your prompt here"
7373
```
7474

75-
Or set them as defaults in your configuration:
75+
Or set them as defaults in your configuration file:
7676

77-
```bash
78-
mycoder config set modelProvider openai
79-
mycoder config set modelName gpt-4o
77+
```javascript
78+
// mycoder.config.js
79+
export default {
80+
provider: 'openai',
81+
model: 'gpt-4o',
82+
};
8083
```
8184

8285
## Next Steps

docs/getting-started/linux.md

+11-6
Original file line numberDiff line numberDiff line change
@@ -73,14 +73,19 @@ This guide will help you set up MyCoder on Linux.
7373

7474
**Enable GitHub Mode in MyCoder**:
7575

76-
After installing the GitHub CLI, enable GitHub mode in MyCoder for enhanced GitHub integration:
76+
After installing the GitHub CLI, enable GitHub mode in MyCoder for enhanced GitHub integration by creating a configuration file:
7777

78-
```bash
79-
# Enable GitHub mode
80-
mycoder config set githubMode true
78+
```javascript
79+
// mycoder.config.js
80+
export default {
81+
githubMode: true,
82+
};
83+
```
8184

82-
# Verify configuration
83-
mycoder config get githubMode
85+
Or by using the CLI option for a single session:
86+
87+
```bash
88+
mycoder --githubMode true "Your prompt here"
8489
```
8590

8691
With GitHub mode enabled, MyCoder can create issues, branches, and pull requests directly through the GitHub CLI.

docs/getting-started/macos.md

+11-6
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,19 @@ This guide will help you set up MyCoder on macOS.
9090

9191
**Enable GitHub Mode in MyCoder**:
9292

93-
After installing the GitHub CLI, enable GitHub mode in MyCoder for enhanced GitHub integration:
93+
After installing the GitHub CLI, enable GitHub mode in MyCoder for enhanced GitHub integration by creating a configuration file:
9494

95-
```bash
96-
# Enable GitHub mode
97-
mycoder config set githubMode true
95+
```javascript
96+
// mycoder.config.js
97+
export default {
98+
githubMode: true,
99+
};
100+
```
98101

99-
# Verify configuration
100-
mycoder config get githubMode
102+
Or by using the CLI option for a single session:
103+
104+
```bash
105+
mycoder --githubMode true "Your prompt here"
101106
```
102107

103108
With GitHub mode enabled, MyCoder can create issues, branches, and pull requests directly through the GitHub CLI.

docs/getting-started/windows.md

+10-5
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,19 @@ This guide will help you set up MyCoder on Windows.
5959
6060
**Enable GitHub Mode in MyCoder**:
6161
62-
After installing the GitHub CLI, enable GitHub mode in MyCoder for enhanced GitHub integration:
62+
After installing the GitHub CLI, enable GitHub mode in MyCoder for enhanced GitHub integration by creating a configuration file:
6363
64+
```javascript
65+
// mycoder.config.js
66+
export default {
67+
githubMode: true,
68+
};
6469
```
65-
# Enable GitHub mode
66-
mycoder config set githubMode true
6770

68-
# Verify configuration
69-
mycoder config get githubMode
71+
Or by using the CLI option for a single session:
72+
73+
```
74+
mycoder --githubMode true "Your prompt here"
7075
```
7176

7277
With GitHub mode enabled, MyCoder can create issues, branches, and pull requests directly through the GitHub CLI.

docs/usage/configuration.md

+100-47
Original file line numberDiff line numberDiff line change
@@ -8,35 +8,55 @@ MyCoder provides a comprehensive configuration system that allows you to customi
88

99
## Using the Configuration System
1010

11-
MyCoder's configuration is managed through a simple command-line interface:
12-
13-
```bash
14-
# List all configuration values
15-
mycoder config list
16-
17-
# Get a specific configuration value
18-
mycoder config get modelProvider
19-
20-
# Set a configuration value
21-
mycoder config set modelProvider openai
11+
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.
12+
13+
```javascript
14+
// mycoder.config.js
15+
export default {
16+
// GitHub integration
17+
githubMode: true,
18+
19+
// Browser settings
20+
headless: true,
21+
userSession: false,
22+
pageFilter: 'none', // 'simple', 'none', or 'readability'
23+
24+
// Model settings
25+
provider: 'anthropic',
26+
model: 'claude-3-7-sonnet-20250219',
27+
maxTokens: 4096,
28+
temperature: 0.7,
29+
30+
// Custom settings
31+
customPrompt: '',
32+
profile: false,
33+
tokenCache: true,
34+
};
2235
```
2336

24-
Configuration values are stored persistently and will be used for all future MyCoder sessions until changed.
37+
MyCoder will search for configuration in the following places (in order of precedence):
38+
39+
1. CLI options (e.g., `--githubMode true`)
40+
2. Configuration file (`mycoder.config.js`)
41+
3. Default values
2542

2643
## Available Configuration Options
2744

2845
### AI Model Selection
2946

30-
| Option | Description | Possible Values | Default |
31-
| --------------- | --------------------------- | ------------------------------------------------- | ----------- |
32-
| `modelProvider` | The AI provider to use | `anthropic`, `openai`, `mistral`, `xai`, `ollama` | `anthropic` |
33-
| `modelName` | The specific model to use | Depends on provider | `claude-3-opus-20240229` |
47+
| Option | Description | Possible Values | Default |
48+
| ---------- | ----------------------- | ------------------------------------------------- | ----------- |
49+
| `provider` | The AI provider to use | `anthropic`, `openai`, `mistral`, `xai`, `ollama` | `anthropic` |
50+
| `model` | The specific model to use | Depends on provider | `claude-3-7-sonnet-20250219` |
3451

3552
Example:
36-
```bash
37-
# Set OpenAI as the provider with GPT-4o model
38-
mycoder config set modelProvider openai
39-
mycoder config set modelName gpt-4o
53+
```javascript
54+
// mycoder.config.js
55+
export default {
56+
// Use OpenAI as the provider with GPT-4o model
57+
provider: 'openai',
58+
model: 'gpt-4o',
59+
};
4060
```
4161

4262
### Logging and Debugging
@@ -48,10 +68,13 @@ mycoder config set modelName gpt-4o
4868
| `profile` | Enable performance profiling | `true`, `false` | `false` |
4969

5070
Example:
51-
```bash
52-
# Enable verbose logging and token usage reporting
53-
mycoder config set logLevel verbose
54-
mycoder config set tokenUsage true
71+
```javascript
72+
// mycoder.config.js
73+
export default {
74+
// Enable verbose logging and token usage reporting
75+
logLevel: 'verbose',
76+
tokenUsage: true,
77+
};
5578
```
5679

5780
### Browser Integration
@@ -63,10 +86,13 @@ mycoder config set tokenUsage true
6386
| `pageFilter` | Method to process webpage content | `simple`, `none`, `readability` | `simple` |
6487

6588
Example:
66-
```bash
67-
# Show browser windows and use readability for better web content parsing
68-
mycoder config set headless false
69-
mycoder config set pageFilter readability
89+
```javascript
90+
// mycoder.config.js
91+
export default {
92+
// Show browser windows and use readability for better web content parsing
93+
headless: false,
94+
pageFilter: 'readability',
95+
};
7096
```
7197

7298
### Behavior Customization
@@ -77,41 +103,68 @@ mycoder config set pageFilter readability
77103
| `githubMode` | Enable GitHub integration | `true`, `false` | `false` |
78104

79105
Example:
80-
```bash
81-
# Set a custom prompt to guide the AI's behavior
82-
mycoder config set customPrompt "Always write TypeScript code with proper type annotations. Prefer functional programming patterns where appropriate."
83-
84-
# Enable GitHub integration
85-
mycoder config set githubMode true
106+
```javascript
107+
// mycoder.config.js
108+
export default {
109+
// Set a custom prompt to guide the AI's behavior
110+
customPrompt: "Always write TypeScript code with proper type annotations. Prefer functional programming patterns where appropriate.",
111+
112+
// Enable GitHub integration
113+
githubMode: true,
114+
};
86115
```
87116

88117
## Configuration File Location
89118

90-
MyCoder stores its configuration in a JSON file in your user directory:
91-
92-
- On macOS/Linux: `~/.config/mycoder/config.json`
93-
- On Windows: `%APPDATA%\mycoder\config.json`
94-
95-
While you can edit this file directly, it's recommended to use the `mycoder config` commands to ensure proper formatting.
119+
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.
96120

97121
## Overriding Configuration
98122

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

101125
```bash
102126
# Use a different model provider just for this session
103-
mycoder --modelProvider openai "Create a React component"
127+
mycoder --provider openai "Create a React component"
104128
```
105129

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

108-
## Resetting Configuration
132+
## Configuration Examples
109133

110-
To reset a specific configuration value to its default:
134+
### Basic Configuration
111135

112-
```bash
113-
# Remove a specific configuration value
114-
mycoder config set modelProvider ""
136+
```javascript
137+
// mycoder.config.js
138+
export default {
139+
provider: 'anthropic',
140+
model: 'claude-3-7-sonnet-20250219',
141+
githubMode: false,
142+
};
115143
```
116144

117-
To reset all configuration to defaults, you can delete the configuration file and restart MyCoder.
145+
### Advanced Configuration
146+
147+
```javascript
148+
// mycoder.config.js
149+
export default {
150+
// Model settings
151+
provider: 'anthropic',
152+
model: 'claude-3-7-sonnet-20250219',
153+
maxTokens: 4096,
154+
temperature: 0.7,
155+
156+
// Browser settings
157+
headless: false,
158+
userSession: true,
159+
pageFilter: 'readability',
160+
161+
// GitHub integration
162+
githubMode: true,
163+
164+
// Custom settings
165+
customPrompt: 'Always prioritize readability and simplicity in your code. Prefer TypeScript over JavaScript when possible.',
166+
profile: true,
167+
tokenUsage: true,
168+
tokenCache: true,
169+
};
170+
```

docs/usage/github-mode.md

+7-4
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,19 @@ Before using GitHub mode, you need:
3030

3131
## Enabling GitHub Mode
3232

33-
Enable GitHub mode using the configuration system:
33+
Enable GitHub mode using the configuration file:
3434

35-
```bash
36-
mycoder config set githubMode true
35+
```javascript
36+
// mycoder.config.js
37+
export default {
38+
githubMode: true,
39+
};
3740
```
3841

3942
Or use it for a single session:
4043

4144
```bash
42-
mycoder --githubMode "Fix the bug described in issue #42"
45+
mycoder --githubMode true "Fix the bug described in issue #42"
4346
```
4447

4548
## GitHub Mode Features

0 commit comments

Comments
 (0)