MCPcopy Create free account
hub / github.com/cursor/cookbook / readOptionValue

Function readOptionValue

sdk/coding-agent-cli/src/index.ts:145–151  ·  view source on GitHub ↗
(argv: string[], index: number, option: string)

Source from the content-addressed store, hash-verified

143}
144
145function readOptionValue(argv: string[], index: number, option: string) {
146 const value = argv[index + 1]
147 if (!value || value.startsWith("-")) {
148 throw new Error(`Expected a value after ${option}.`)
149 }
150 return value
151}
152
153async function runPlainPrompt(
154 apiKey: string,

Callers 1

parseArgsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected