MCPcopy Create free account
hub / github.com/RomanHotsiy/commitgpt / getApiKey

Function getApiKey

config.ts:19–32  ·  view source on GitHub ↗
(clean?: boolean)

Source from the content-addressed store, hash-verified

17}
18
19export async function getApiKey(clean?: boolean): Promise<string> {
20 let apiKey = getConfig<string | undefined>("apiKey");
21
22 if (clean) {
23 apiKey = undefined;
24 }
25
26 if (!apiKey) {
27 apiKey = await promptToken();
28 setGlobalConfig("apiKey", apiKey);
29 }
30
31 return apiKey;
32}
33
34export async function getPromptOptions(): Promise<{
35 model: string;

Callers 1

client.tsFile · 0.85

Calls 3

getConfigFunction · 0.85
promptTokenFunction · 0.85
setGlobalConfigFunction · 0.85

Tested by

no test coverage detected