Skip to content

Commit 5559567

Browse files
committed
fix: remove unreliable init command and createDefaultConfigFile function
Closes #225
1 parent 68d34ab commit 5559567

File tree

4 files changed

+1
-131
lines changed

4 files changed

+1
-131
lines changed

packages/cli/README.md

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -97,17 +97,7 @@ Requirements for GitHub mode:
9797

9898
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.
9999

100-
To create a default configuration file, run:
101-
102-
```bash
103-
# Create a default configuration file
104-
mycoder init
105-
106-
# Force overwrite an existing configuration file
107-
mycoder init --force
108-
```
109-
110-
This will create a `mycoder.config.js` file in your current directory with default settings that you can customize.
100+
You can create a `mycoder.config.js` file in your project root with your preferred settings.
111101

112102
Example configuration file:
113103

packages/cli/src/commands/init.ts

Lines changed: 0 additions & 67 deletions
This file was deleted.

packages/cli/src/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import yargs, { ArgumentsCamelCase, CommandModule } from 'yargs';
66
import { hideBin } from 'yargs/helpers';
77

88
import { command as defaultCommand } from './commands/$default.js';
9-
import { command as initCommand } from './commands/init.js';
109
import { command as testProfileCommand } from './commands/test-profile.js';
1110
import { command as testSentryCommand } from './commands/test-sentry.js';
1211
import { command as toolsCommand } from './commands/tools.js';
@@ -59,7 +58,6 @@ const main = async () => {
5958
testSentryCommand,
6059
testProfileCommand,
6160
toolsCommand,
62-
initCommand,
6361
] as CommandModule[])
6462
.strict()
6563
.showHelpOnFail(true)

packages/cli/src/settings/config.ts

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
import * as fs from 'fs';
2-
import * as path from 'path';
3-
41
import { cosmiconfig } from 'cosmiconfig';
52
import { ArgumentsCamelCase } from 'yargs';
63

@@ -107,51 +104,3 @@ export async function loadConfig(
107104
};
108105
return mergedConfig;
109106
}
110-
111-
/**
112-
* Create a default configuration file if it doesn't exist
113-
* @param filePath Path to create the configuration file
114-
* @returns true if file was created, false if it already exists
115-
*/
116-
export function createDefaultConfigFile(filePath?: string): boolean {
117-
// Default to current directory if no path provided
118-
const configPath = filePath || path.join(process.cwd(), 'mycoder.config.js');
119-
120-
// Check if file already exists
121-
if (fs.existsSync(configPath)) {
122-
return false;
123-
}
124-
125-
// Create default configuration file
126-
const configContent = `// mycoder.config.js
127-
export default {
128-
// GitHub integration
129-
githubMode: true,
130-
131-
// Browser settings
132-
headless: true,
133-
userSession: false,
134-
pageFilter: 'none', // 'simple', 'none', or 'readability'
135-
136-
// Model settings
137-
provider: 'anthropic',
138-
model: 'claude-3-7-sonnet-20250219',
139-
maxTokens: 4096,
140-
temperature: 0.7,
141-
142-
// Custom settings
143-
customPrompt: '',
144-
profile: false,
145-
tokenCache: true,
146-
147-
// Ollama configuration
148-
ollamaBaseUrl: 'http://localhost:11434',
149-
150-
// API keys (better to use environment variables for these)
151-
// ANTHROPIC_API_KEY: 'your-api-key',
152-
};
153-
`;
154-
155-
fs.writeFileSync(configPath, configContent);
156-
return true;
157-
}

0 commit comments

Comments
 (0)