fix(cli): hide auto approval aliases in help (#34641)
Co-authored-by: James Long <longster@gmail.com> Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
6fc9405618
commit
20445ca031
@@ -240,11 +240,20 @@ export const RunCommand = effectCmd({
|
|||||||
default: false,
|
default: false,
|
||||||
})
|
})
|
||||||
.option("auto", {
|
.option("auto", {
|
||||||
alias: ["yolo", "dangerously-skip-permissions"],
|
|
||||||
type: "boolean",
|
type: "boolean",
|
||||||
describe: "auto-approve permissions that are not explicitly denied (dangerous!)",
|
describe: "auto-approve permissions that are not explicitly denied (dangerous!)",
|
||||||
default: false,
|
default: false,
|
||||||
})
|
})
|
||||||
|
.option("yolo", {
|
||||||
|
type: "boolean",
|
||||||
|
hidden: true,
|
||||||
|
default: false,
|
||||||
|
})
|
||||||
|
.option("dangerously-skip-permissions", {
|
||||||
|
type: "boolean",
|
||||||
|
hidden: true,
|
||||||
|
default: false,
|
||||||
|
})
|
||||||
.option("demo", {
|
.option("demo", {
|
||||||
type: "boolean",
|
type: "boolean",
|
||||||
default: false,
|
default: false,
|
||||||
@@ -262,6 +271,7 @@ export const RunCommand = effectCmd({
|
|||||||
yield* Effect.promise(async () => {
|
yield* Effect.promise(async () => {
|
||||||
const rawMessage = [...args.message, ...(args["--"] || [])].join(" ")
|
const rawMessage = [...args.message, ...(args["--"] || [])].join(" ")
|
||||||
const interactive = args.mini
|
const interactive = args.mini
|
||||||
|
const auto = args.auto || args.yolo || args["dangerously-skip-permissions"]
|
||||||
const thinking = interactive ? (args.thinking ?? true) : (args.thinking ?? false)
|
const thinking = interactive ? (args.thinking ?? true) : (args.thinking ?? false)
|
||||||
const die = (message: string): never => {
|
const die = (message: string): never => {
|
||||||
UI.error(message)
|
UI.error(message)
|
||||||
@@ -787,7 +797,7 @@ export const RunCommand = effectCmd({
|
|||||||
const permission = event.properties
|
const permission = event.properties
|
||||||
if (permission.sessionID !== sessionID) continue
|
if (permission.sessionID !== sessionID) continue
|
||||||
|
|
||||||
if (args.auto) {
|
if (auto) {
|
||||||
await client.permission.reply({
|
await client.permission.reply({
|
||||||
requestID: permission.id,
|
requestID: permission.id,
|
||||||
reply: "once",
|
reply: "once",
|
||||||
|
|||||||
@@ -106,11 +106,20 @@ export const TuiThreadCommand = cmd({
|
|||||||
describe: "agent to use",
|
describe: "agent to use",
|
||||||
})
|
})
|
||||||
.option("auto", {
|
.option("auto", {
|
||||||
alias: ["yolo", "dangerously-skip-permissions"],
|
|
||||||
type: "boolean",
|
type: "boolean",
|
||||||
describe: "auto-approve permissions that are not explicitly denied (dangerous!)",
|
describe: "auto-approve permissions that are not explicitly denied (dangerous!)",
|
||||||
default: false,
|
default: false,
|
||||||
})
|
})
|
||||||
|
.option("yolo", {
|
||||||
|
type: "boolean",
|
||||||
|
hidden: true,
|
||||||
|
default: false,
|
||||||
|
})
|
||||||
|
.option("dangerously-skip-permissions", {
|
||||||
|
type: "boolean",
|
||||||
|
hidden: true,
|
||||||
|
default: false,
|
||||||
|
})
|
||||||
.option("mini", {
|
.option("mini", {
|
||||||
type: "boolean",
|
type: "boolean",
|
||||||
describe: "start the minimal interactive interface",
|
describe: "start the minimal interactive interface",
|
||||||
@@ -278,7 +287,7 @@ export const TuiThreadCommand = cmd({
|
|||||||
model: args.model,
|
model: args.model,
|
||||||
prompt,
|
prompt,
|
||||||
fork: args.fork,
|
fork: args.fork,
|
||||||
auto: args.auto,
|
auto: args.auto || args.yolo || args["dangerously-skip-permissions"],
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -79,43 +79,31 @@ Options:
|
|||||||
-h, --help show help [boolean]
|
-h, --help show help [boolean]
|
||||||
-v, --version show version number [boolean]
|
-v, --version show version number [boolean]
|
||||||
--print-logs print logs to stderr [boolean]
|
--print-logs print logs to stderr [boolean]
|
||||||
--log-level log level
|
--log-level log level [string] [choices: "DEBUG", "INFO", "WARN", "ERROR"]
|
||||||
[string] [choices: "DEBUG", "INFO", "WARN", "ERROR"]
|
|
||||||
--pure run without external plugins [boolean]
|
--pure run without external plugins [boolean]
|
||||||
--command the command to run, use message for args
|
--command the command to run, use message for args [string]
|
||||||
[string]
|
|
||||||
-c, --continue continue the last session [boolean]
|
-c, --continue continue the last session [boolean]
|
||||||
-s, --session session id to continue [string]
|
-s, --session session id to continue [string]
|
||||||
--fork fork the session before continuing (requires
|
--fork fork the session before continuing (requires --continue or --session) [boolean]
|
||||||
--continue or --session) [boolean]
|
|
||||||
--share share the session [boolean]
|
--share share the session [boolean]
|
||||||
-m, --model model to use in the format of provider/model
|
-m, --model model to use in the format of provider/model [string]
|
||||||
[string]
|
|
||||||
--agent agent to use [string]
|
--agent agent to use [string]
|
||||||
--format format: default (formatted) or json (raw JSON
|
--format format: default (formatted) or json (raw JSON events)
|
||||||
events)
|
|
||||||
[string] [choices: "default", "json"] [default: "default"]
|
[string] [choices: "default", "json"] [default: "default"]
|
||||||
-f, --file file(s) to attach to message [array]
|
-f, --file file(s) to attach to message [array]
|
||||||
--title title for the session (uses truncated prompt
|
--title title for the session (uses truncated prompt if no value provided) [string]
|
||||||
if no value provided) [string]
|
--attach attach to a running opencode server (e.g., http://localhost:4096) [string]
|
||||||
--attach attach to a running opencode server (e.g.,
|
-p, --password basic auth password (defaults to OPENCODE_SERVER_PASSWORD) [string]
|
||||||
http://localhost:4096) [string]
|
-u, --username basic auth username (defaults to OPENCODE_SERVER_USERNAME or 'opencode')
|
||||||
-p, --password basic auth password (defaults to
|
[string]
|
||||||
OPENCODE_SERVER_PASSWORD) [string]
|
--dir directory to run in, path on remote server if attaching [string]
|
||||||
-u, --username basic auth username (defaults to
|
--port port for the local server (defaults to random port if no value provided)
|
||||||
OPENCODE_SERVER_USERNAME or 'opencode')
|
[number]
|
||||||
|
--variant model variant (provider-specific reasoning effort, e.g., high, max, minimal)
|
||||||
[string]
|
[string]
|
||||||
--dir directory to run in, path on remote server if
|
|
||||||
attaching [string]
|
|
||||||
--port port for the local server (defaults to random
|
|
||||||
port if no value provided) [number]
|
|
||||||
--variant model variant (provider-specific reasoning
|
|
||||||
effort, e.g., high, max, minimal) [string]
|
|
||||||
--thinking show thinking blocks [boolean]
|
--thinking show thinking blocks [boolean]
|
||||||
-i, --interactive run in direct interactive split-footer mode
|
-i, --interactive run in direct interactive split-footer mode [boolean] [default: false]
|
||||||
[boolean] [default: false]
|
--auto auto-approve permissions that are not explicitly denied (dangerous!)
|
||||||
--auto, --yolo, --dangerously-skip-permissions auto-approve permissions that are not
|
|
||||||
explicitly denied (dangerous!)
|
|
||||||
[boolean] [default: false]"
|
[boolean] [default: false]"
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user