TUI CONFIG

This commit is contained in:
Raven Scott
2026-04-22 02:51:45 -04:00
parent bc737094ca
commit 6ee7cfcb57
16 changed files with 690 additions and 170 deletions
+10 -4
View File
@@ -9,12 +9,15 @@ async function run(ctx, argv) {
ctx.console.log(
'usage: ' +
argv0 +
' [--setup | --reset] YOUR_REQUEST_HERE\n' +
' [--setup | --config | --reset] YOUR_REQUEST_HERE\n' +
' ' +
argv0 +
' --setup\n' +
' ' +
argv0 +
' --config\n' +
' ' +
argv0 +
' --reset\n' +
' ' +
argv0 +
@@ -22,7 +25,7 @@ async function run(ctx, argv) {
'\n' +
'Runs an autonomous coding/OS agent against any OpenAI-compatible HTTPS API.\n' +
'Configuration: ~/.agent/config.json on your personal drive (created on first run).\n' +
'Use --setup to interactively set API URL, key, model, and provider label.\n' +
'Use --setup or --config to interactively set owner name, agent label, API URL, key, model, and provider (plain TTY prompts).\n' +
'Use --reset or `reset` to clear ~/.agent/history.json and start a fresh chat session.\n' +
'\n' +
'Examples:\n' +
@@ -34,6 +37,9 @@ async function run(ctx, argv) {
' --setup\n' +
' ' +
argv0 +
' --config\n' +
' ' +
argv0 +
' --reset\n' +
'\n' +
'See man agent.'
@@ -48,7 +54,7 @@ async function run(ctx, argv) {
const rest = []
for (let i = 0; i < args.length; i++) {
const a = args[i]
if (a === '--setup') setupFlag = true
if (a === '--setup' || a === '--config') setupFlag = true
else if (a === '--reset') resetFlag = true
else rest.push(a)
}
@@ -72,7 +78,7 @@ async function run(ctx, argv) {
const task = rest.join(' ').trim()
if (!task && !setupFlag) {
ctx.console.error(argv0 + ': missing task (or use --setup)')
ctx.console.error(argv0 + ': missing task (or use --setup / --config)')
ctx.exitCode = 1
return
}