MCPcopy Index your code
hub / github.com/forloopcodes/contextplus / buildOpenCodeConfig

Function buildOpenCodeConfig

src/index.ts:118–141  ·  view source on GitHub ↗
(runner: "npx" | "bunx")

Source from the content-addressed store, hash-verified

116}
117
118function buildOpenCodeConfig(runner: "npx" | "bunx") {
119 const command = runner === "npx" ? ["npx", "-y", "contextplus"] : ["bunx", "contextplus"];
120 return JSON.stringify(
121 {
122 $schema: "https://opencode.ai/config.json",
123 mcp: {
124 contextplus: {
125 type: "local",
126 command,
127 enabled: true,
128 environment: {
129 OLLAMA_EMBED_MODEL: "nomic-embed-text",
130 OLLAMA_CHAT_MODEL: "gemma2:27b",
131 OLLAMA_API_KEY: "YOUR_OLLAMA_API_KEY",
132 CONTEXTPLUS_EMBED_BATCH_SIZE: "8",
133 CONTEXTPLUS_EMBED_TRACKER: "lazy",
134 },
135 },
136 },
137 },
138 null,
139 2,
140 );
141}
142
143async function runInitCommand(args: string[]) {
144 const nonFlags = args.filter((arg) => !arg.startsWith("--"));

Callers 1

runInitCommandFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected