mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-04-01 06:42:26 +00:00
OpenTUI is here (#2685)
This commit is contained in:
22
packages/opencode/src/cli/cmd/tui/attach.ts
Normal file
22
packages/opencode/src/cli/cmd/tui/attach.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import { cmd } from "../cmd"
|
||||
import { tui } from "./app"
|
||||
|
||||
export const AttachCommand = cmd({
|
||||
command: "attach <url>",
|
||||
describe: "attach to a running opencode server",
|
||||
builder: (yargs) =>
|
||||
yargs
|
||||
.positional("url", {
|
||||
type: "string",
|
||||
describe: "http://localhost:4096",
|
||||
demandOption: true,
|
||||
})
|
||||
.option("dir", {
|
||||
type: "string",
|
||||
description: "directory to run in",
|
||||
}),
|
||||
handler: async (args) => {
|
||||
if (args.dir) process.chdir(args.dir)
|
||||
await tui(args)
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user