Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 7 additions & 10 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,19 @@
# [0.8.0](https://github.com/drivecore/mycoder/compare/v0.7.0...v0.8.0) (2025-03-11)


### Features

* add --githubMode and --userPrompt as boolean CLI options that override config settings ([0390f94](https://github.com/drivecore/mycoder/commit/0390f94651e40de93a8cb9486a056a0b9cb2e165))
* remove modelProvider and modelName - instant decrepation ([59834dc](https://github.com/drivecore/mycoder/commit/59834dcf932051a5c75624bd6f6ab12254f43769))
- add --githubMode and --userPrompt as boolean CLI options that override config settings ([0390f94](https://github.com/drivecore/mycoder/commit/0390f94651e40de93a8cb9486a056a0b9cb2e165))
- remove modelProvider and modelName - instant decrepation ([59834dc](https://github.com/drivecore/mycoder/commit/59834dcf932051a5c75624bd6f6ab12254f43769))

# [0.7.0](https://github.com/drivecore/mycoder/compare/v0.6.1...v0.7.0) (2025-03-10)


### Bug Fixes

* change where anthropic key is declared ([f6f72d3](https://github.com/drivecore/mycoder/commit/f6f72d3bc18a65fc775151cd375398aba230a06f))
* ensure npm publish only happens on release branch ([ec352d6](https://github.com/drivecore/mycoder/commit/ec352d6956c717726ef388a07d88372c12b634a6))

- change where anthropic key is declared ([f6f72d3](https://github.com/drivecore/mycoder/commit/f6f72d3bc18a65fc775151cd375398aba230a06f))
- ensure npm publish only happens on release branch ([ec352d6](https://github.com/drivecore/mycoder/commit/ec352d6956c717726ef388a07d88372c12b634a6))

### Features

* add GitHub Action for issue comment commands ([136950f](https://github.com/drivecore/mycoder/commit/136950f4bd6d14e544bbd415ed313f7842a9b9a2)), closes [#162](https://github.com/drivecore/mycoder/issues/162)
* allow for generic /mycoder commands ([4b6608e](https://github.com/drivecore/mycoder/commit/4b6608e0b8e5f408eb5f12fe891657a5fb25bdb4))
* **release:** implement conventional commits approach ([5878dd1](https://github.com/drivecore/mycoder/commit/5878dd1a56004eb8a994d40416d759553b022eb8)), closes [#140](https://github.com/drivecore/mycoder/issues/140)
- add GitHub Action for issue comment commands ([136950f](https://github.com/drivecore/mycoder/commit/136950f4bd6d14e544bbd415ed313f7842a9b9a2)), closes [#162](https://github.com/drivecore/mycoder/issues/162)
- allow for generic /mycoder commands ([4b6608e](https://github.com/drivecore/mycoder/commit/4b6608e0b8e5f408eb5f12fe891657a5fb25bdb4))
- **release:** implement conventional commits approach ([5878dd1](https://github.com/drivecore/mycoder/commit/5878dd1a56004eb8a994d40416d759553b022eb8)), closes [#140](https://github.com/drivecore/mycoder/issues/140)
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ mycoder --enableUserPrompt false "Generate a basic Express.js server"
# or using the alias
mycoder --userPrompt false "Generate a basic Express.js server"

# Disable user consent warning and version upgrade check for automated environments
mycoder --userWarning false --upgradeCheck false "Generate a basic Express.js server"

# Enable GitHub mode via CLI option (overrides config)
mycoder --githubMode "Work with GitHub issues and PRs"

Expand Down
14 changes: 14 additions & 0 deletions packages/cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ mycoder "Implement a React component that displays a list of items"
# Run with a prompt from a file
mycoder -f prompt.txt

# Disable user prompts for fully automated sessions
mycoder --userPrompt false "Generate a basic Express.js server"

# Disable user consent warning and version upgrade check for automated environments
mycoder --userWarning false --upgradeCheck false "Generate a basic Express.js server"

# Enable GitHub mode
mycoder config set githubMode true
```
Expand Down Expand Up @@ -104,6 +110,14 @@ mycoder config set model claude-3-7-sonnet-20250219 # or any other Anthropic mo
- `customPrompt`: Custom instructions to append to the system prompt for both main agent and sub-agents (default: `""`)
- `tokenCache`: Enable token caching for LLM API calls (default: `true`)

### CLI-Only Options

These options are available only as command-line parameters and are not stored in the configuration:

- `userWarning`: Skip user consent check for current session without saving consent (default: `true`)
- `upgradeCheck`: Disable version upgrade check for automated/remote usage (default: `true`)
- `userPrompt`/`enableUserPrompt`: Enable or disable the userPrompt tool (default: `true`)

Example:

```bash
Expand Down
12 changes: 10 additions & 2 deletions packages/cli/src/commands/$default.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,13 @@ export const command: CommandModule<SharedOptions, DefaultArgs> = {
`MyCoder v${packageInfo.version} - AI-powered coding assistant`,
);

await checkForUpdates(logger);
// Skip version check if upgradeCheck is false
if (argv.upgradeCheck !== false) {
await checkForUpdates(logger);
}

if (!hasUserConsented()) {
// Skip user consent check if userWarning is false
if (!hasUserConsented() && argv.userWarning !== false) {
const readline = createInterface({
input: process.stdin,
output: process.stdout,
Expand All @@ -81,6 +85,10 @@ export const command: CommandModule<SharedOptions, DefaultArgs> = {
logger.info('User did not consent. Exiting.');
throw new Error('User did not consent');
}
} else if (!hasUserConsented() && argv.userWarning === false) {
// Just skip the consent check without saving consent when userWarning is false
logger.debug('Skipping user consent check due to --userWarning=false');
// Note: We don't save consent here, just bypassing the check for this session
}

const tokenTracker = new TokenTracker(
Expand Down
13 changes: 13 additions & 0 deletions packages/cli/src/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ export type SharedOptions = {
readonly enableUserPrompt?: boolean;
readonly userPrompt?: boolean;
readonly githubMode?: boolean;
readonly userWarning?: boolean;
readonly upgradeCheck?: boolean;
};

export const sharedOptions = {
Expand Down Expand Up @@ -107,4 +109,15 @@ export const sharedOptions = {
description: 'Enable GitHub mode for working with issues and PRs',
default: false,
} as const,
userWarning: {
type: 'boolean',
description:
'Skip user consent check for current session (does not save consent)',
default: false,
} as const,
upgradeCheck: {
type: 'boolean',
description: 'Disable version upgrade check (for automated/remote usage)',
default: false,
} as const,
};
Loading