The best way to control Claude Code, Codex and more from any computer or phone
| 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 currentProject = GcpEnvironment.current.pipe(Effect.map((env) => env.project)); |
| 11 | export const location = "us-central1"; |
| 12 | |
| 13 | export const serviceAccountOf = (project: string) => |
| 14 | process.env.GCP_TEST_FIREBASE_APP_HOSTING_SA ?? |
| 15 | `alchemy-testing@${project}.iam.gserviceaccount.com`; |
| 16 | |
| 17 | export const missingBackendOf = |
| 18 | (project: string) => |
| 19 | (backendId = "alchemy-missing-backend") => |
| 20 | `projects/${project}/locations/${location}/backends/${backendId}`; |