@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 30 lines 1.07 KB
Raw
1 import * as Alchemy from "alchemy";
2 import { Interaction } from "alchemy/Interaction";
3 import * as Effect from "effect/Effect";
4 import * as Layer from "effect/Layer";
5
6 export default Alchemy.Stack(
7 "CliPackageCanary",
8 { providers: Layer.empty, state: Alchemy.localState() },
9 Effect.gen(function* () {
10 const interaction = yield* Interaction;
11 yield* interaction.task({ label: "Packed CLI progress" }, Effect.void);
12 yield* Effect.sync(() => {
13 process.stdout.write(
14 `CLI_PACKAGE_PROBE=${JSON.stringify({
15 runtime: process.versions.bun ? "bun" : "node",
16 nodeEnv: process.env.NODE_ENV,
17 home: process.env.HOME,
18 credentialVariables: Object.keys(process.env).filter((name) =>
19 /TOKEN|SECRET|PASSWORD|CREDENTIAL|API_KEY|ACCESS_KEY|AWS_PROFILE/i.test(name),
20 ),
21 cwd: process.cwd(),
22 entry: process.argv[1],
23 alchemy: import.meta.resolve("alchemy"),
24 args: process.argv.slice(2),
25 })}\n`,
26 );
27 });
28 return { message: "Packed CLI deployment complete" };
29 }),
30 );