@devries-cameron20 / t3code Mirror · read-only
Fork 0

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

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 06:00 UTC

main
ts 27 lines 805 Bytes
Raw
1 import * as GCP from "@alchemy.run/gcp";
2 import * as Alchemy from "alchemy";
3 import * as Effect from "effect/Effect";
4 import Api from "./src/Api.ts";
5 import { ApiKey, DataKey, Keys } from "./src/resources.ts";
6
7 export default Alchemy.Stack(
8 "GcpSecretsKmsExample",
9 { providers: GCP.providers(), state: Alchemy.localState() },
10 Effect.gen(function* () {
11 const keys = yield* Keys;
12 const dataKey = yield* DataKey;
13 const apiKey = yield* ApiKey;
14 const api = yield* Api;
15
16 return {
17 url: api.uri,
18 serviceName: api.name,
19 keyRingName: keys.name,
20 cryptoKeyName: dataKey.name,
21 // Seed the key with:
22 // printf 'my-key' | gcloud secrets versions add "$secretId" --data-file=-
23 secretId: apiKey.secretId,
24 secretName: apiKey.name,
25 };
26 }),
27 );