The best way to control Claude Code, Codex and more from any computer or phone

main
ts 20 lines 846 Bytes
Raw
1 import { GcpEnvironment } from "@alchemy.run/gcp/Environment";
2 import * as Effect from "effect/Effect";
3 import { MinimumLogLevel } from "effect/References";
4
5 export const logLevel = Effect.provideService(
6 MinimumLogLevel,
7 process.env.DEBUG ? "Debug" : "Info",
8 );
9
10 export const enterpriseName = process.env.GCP_ANDROIDMANAGEMENT_ENTERPRISE?.trim() || undefined;
11
12 // Android Management needs credentials carrying the androidmanagement scope
13 // (plus an enterprise signup); the service account profile is rejected with
14 // InsufficientScopes. Set
15 // GCP_TEST_ANDROIDMANAGEMENT_OAUTH=1 with such credentials.
16 export const runLifecycle = !!process.env.GCP_TEST_ANDROIDMANAGEMENT_OAUTH;
17
18 export const runChildLifecycle = runLifecycle && !!enterpriseName;
19
20 export const currentProject = GcpEnvironment.current.pipe(Effect.map((env) => env.project));