File tree Expand file tree Collapse file tree 4 files changed +39
-2
lines changed Expand file tree Collapse file tree 4 files changed +39
-2
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,9 @@ mycoder --enableUserPrompt false "Generate a basic Express.js server"
39
39
# or using the alias
40
40
mycoder --userPrompt false " Generate a basic Express.js server"
41
41
42
+ # Disable user consent warning and version upgrade check for automated environments
43
+ mycoder --userWarning false --upgradeCheck false " Generate a basic Express.js server"
44
+
42
45
# Enable GitHub mode via CLI option (overrides config)
43
46
mycoder --githubMode " Work with GitHub issues and PRs"
44
47
Original file line number Diff line number Diff line change @@ -32,6 +32,12 @@ mycoder "Implement a React component that displays a list of items"
32
32
# Run with a prompt from a file
33
33
mycoder -f prompt.txt
34
34
35
+ # Disable user prompts for fully automated sessions
36
+ mycoder --userPrompt false " Generate a basic Express.js server"
37
+
38
+ # Disable user consent warning and version upgrade check for automated environments
39
+ mycoder --userWarning false --upgradeCheck false " Generate a basic Express.js server"
40
+
35
41
# Enable GitHub mode
36
42
mycoder config set githubMode true
37
43
```
@@ -104,6 +110,14 @@ mycoder config set model claude-3-7-sonnet-20250219 # or any other Anthropic mo
104
110
- ` customPrompt ` : Custom instructions to append to the system prompt for both main agent and sub-agents (default: ` "" ` )
105
111
- ` tokenCache ` : Enable token caching for LLM API calls (default: ` true ` )
106
112
113
+ ### CLI-Only Options
114
+
115
+ These options are available only as command-line parameters and are not stored in the configuration:
116
+
117
+ - ` userWarning ` : Disable user consent check for automated/remote usage (default: ` true ` )
118
+ - ` upgradeCheck ` : Disable version upgrade check for automated/remote usage (default: ` true ` )
119
+ - ` userPrompt ` /` enableUserPrompt ` : Enable or disable the userPrompt tool (default: ` true ` )
120
+
107
121
Example:
108
122
109
123
``` bash
Original file line number Diff line number Diff line change @@ -57,9 +57,13 @@ export const command: CommandModule<SharedOptions, DefaultArgs> = {
57
57
`MyCoder v${ packageInfo . version } - AI-powered coding assistant` ,
58
58
) ;
59
59
60
- await checkForUpdates ( logger ) ;
60
+ // Skip version check if upgradeCheck is false
61
+ if ( argv . upgradeCheck !== false ) {
62
+ await checkForUpdates ( logger ) ;
63
+ }
61
64
62
- if ( ! hasUserConsented ( ) ) {
65
+ // Skip user consent check if userWarning is false
66
+ if ( ! hasUserConsented ( ) && argv . userWarning !== false ) {
63
67
const readline = createInterface ( {
64
68
input : process . stdin ,
65
69
output : process . stdout ,
@@ -81,6 +85,10 @@ export const command: CommandModule<SharedOptions, DefaultArgs> = {
81
85
logger . info ( 'User did not consent. Exiting.' ) ;
82
86
throw new Error ( 'User did not consent' ) ;
83
87
}
88
+ } else if ( ! hasUserConsented ( ) && argv . userWarning === false ) {
89
+ // Auto-save consent when userWarning is false
90
+ logger . debug ( 'Skipping user consent check due to --userWarning=false' ) ;
91
+ saveUserConsent ( ) ;
84
92
}
85
93
86
94
const tokenTracker = new TokenTracker (
Original file line number Diff line number Diff line change @@ -16,6 +16,8 @@ export type SharedOptions = {
16
16
readonly enableUserPrompt ?: boolean ;
17
17
readonly userPrompt ?: boolean ;
18
18
readonly githubMode ?: boolean ;
19
+ readonly userWarning ?: boolean ;
20
+ readonly upgradeCheck ?: boolean ;
19
21
} ;
20
22
21
23
export const sharedOptions = {
@@ -107,4 +109,14 @@ export const sharedOptions = {
107
109
description : 'Enable GitHub mode for working with issues and PRs' ,
108
110
default : false ,
109
111
} as const ,
112
+ userWarning : {
113
+ type : 'boolean' ,
114
+ description : 'Disable user consent check (for automated/remote usage)' ,
115
+ default : false ,
116
+ } as const ,
117
+ upgradeCheck : {
118
+ type : 'boolean' ,
119
+ description : 'Disable version upgrade check (for automated/remote usage)' ,
120
+ default : false ,
121
+ } as const ,
110
122
} ;
You can’t perform that action at this time.
0 commit comments