MCPcopy Create free account
hub / github.com/QodeXcli/QodeX / keyGuidance

Function keyGuidance

src/setup/key-guidance.ts:37–47  ·  view source on GitHub ↗
(env: string)

Source from the content-addressed store, hash-verified

35
36/** One-key guidance block: where to get it + the three ways to set it. PURE. */
37export function keyGuidance(env: string): string {
38 const k = findServiceKey(env);
39 const from = k ? `Get a key at ${k.url}${k.freeTier ? ' (free tier available)' : ''} — it unlocks ${k.unlocks}.` : `This needs the ${env} environment variable.`;
40 return [
41 from,
42 'Then any of:',
43 ` • paste the key here in chat — I'll store it safely (~/.qodex/.env, chmod 600) and continue your task`,
44 ` • add \`${env}=<key>\` to ~/.qodex/.env yourself`,
45 ` • or \`export ${env}=<key>\` in your shell`,
46 ].join('\n');
47}
48
49/** Which web keys are set / missing, given an env-like map. PURE. */
50export function webKeyStatus(env: Record<string, string | undefined>): { set: ServiceKey[]; missing: ServiceKey[] } {

Callers 1

Calls 1

findServiceKeyFunction · 0.85

Tested by

no test coverage detected