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
| 1 | import * as NodeServices from "@effect/platform-node/NodeServices"; |
| 2 | import * as Effect from "effect/Effect"; |
| 3 | import { withLock } from "@/Auth/Lock.ts"; |
| 4 | |
| 5 | const key = process.argv[2]; |
| 6 | if (!key) throw new Error("Missing lock key"); |
| 7 | |
| 8 | await Effect.runPromise( |
| 9 | withLock( |
| 10 | key, |
| 11 | Effect.sync(() => process.stdout.write("ready\n")).pipe(Effect.andThen(Effect.never)), |
| 12 | ).pipe(Effect.provide(NodeServices.layer)), |
| 13 | ); |