MCPcopy Create free account
hub / github.com/arctic-cli/interface / createArcticTui

Function createArcticTui

packages/sdk/js/src/server.ts:90–120  ·  view source on GitHub ↗
(options?: TuiOptions)

Source from the content-addressed store, hash-verified

88}
89
90export function createArcticTui(options?: TuiOptions) {
91 const args = []
92
93 if (options?.project) {
94 args.push(`--project=${options.project}`)
95 }
96 if (options?.model) {
97 args.push(`--model=${options.model}`)
98 }
99 if (options?.session) {
100 args.push(`--session=${options.session}`)
101 }
102 if (options?.agent) {
103 args.push(`--agent=${options.agent}`)
104 }
105
106 const proc = spawn(`arctic`, args, {
107 signal: options?.signal,
108 stdio: "inherit",
109 env: {
110 ...process.env,
111 ARCTIC_CONFIG_CONTENT: JSON.stringify(options?.config ?? {}),
112 },
113 })
114
115 return {
116 close() {
117 proc.kill()
118 },
119 }
120}

Callers

nothing calls this directly

Calls 2

spawnFunction · 0.85
pushMethod · 0.80

Tested by

no test coverage detected