MCPcopy Index your code
hub / github.com/cameri/nostream / runConfigEnvGet

Function runConfigEnvGet

src/cli/commands/config.ts:202–221  ·  view source on GitHub ↗
(key: string, options: { showSecrets?: boolean } = {})

Source from the content-addressed store, hash-verified

200}
201
202export const runConfigEnvGet = async (key: string, options: { showSecrets?: boolean } = {}): Promise<number> => {
203 const normalizedKey = key.trim()
204
205 if (!isSupportedEnvKey(normalizedKey)) {
206 logError(`Unsupported env key: ${normalizedKey}`)
207 return 1
208 }
209
210 const values = readEnvValues()
211 const value = values[normalizedKey]
212
213 if (value === undefined) {
214 logError(`Env key not set: ${normalizedKey}`)
215 return 1
216 }
217
218 const displayValue = options.showSecrets || !isSecretEnvKey(normalizedKey) ? value : maskSecretValue(value)
219 logInfo(displayValue)
220 return 0
221}
222
223export const runConfigEnvSet = async (key: string, value: string): Promise<number> => {
224 const normalizedKey = key.trim()

Callers 1

index.tsFile · 0.90

Calls 6

isSupportedEnvKeyFunction · 0.90
logErrorFunction · 0.90
readEnvValuesFunction · 0.90
isSecretEnvKeyFunction · 0.90
maskSecretValueFunction · 0.90
logInfoFunction · 0.90

Tested by

no test coverage detected