MCPcopy Create free account
hub / github.com/cortexkit/magic-context / getArg

Function getArg

packages/plugin/scripts/backfill-embeddings.ts:24–27  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

22
23const DB_PATH = `${process.env.HOME}/.local/share/opencode/storage/plugin/magic-context/context.db`;
24function getArg(name: string): string | null {
25 const index = process.argv.indexOf(name);
26 return index >= 0 ? (process.argv[index + 1] ?? null) : null;
27}
28
29async function main() {
30 const directory = getArg("--directory") ?? process.cwd();

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected