MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / readCliServerAuth

Function readCliServerAuth

apps/cli/src/server-connection.ts:13–18  ·  view source on GitHub ↗
(
  env: Record<string, string | undefined> = process.env,
)

Source from the content-addressed store, hash-verified

11// (`EXECUTOR_AUTH_TOKEN`). Local servers publish their token in the manifest, so
12// the env override is mainly for pointing the CLI at a remote instance.
13export const readCliServerAuth = (
14 env: Record<string, string | undefined> = process.env,
15): ExecutorServerAuth | undefined => {
16 const token = env.EXECUTOR_API_KEY ?? env.EXECUTOR_AUTH_TOKEN;
17 return token ? { kind: "bearer", token } : undefined;
18};
19
20export const parseCliExecutorServerConnection = (
21 baseUrl: string,

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected