The best way to control Claude Code, Codex and more from any computer or phone
| 1 | /** @jsxRuntime automatic */ |
| 2 | /** @jsxImportSource @alchemy.run/sigil */ |
| 3 | import { Box } from "@alchemy.run/sigil"; |
| 4 | import { runMain } from "alchemy/Util/PlatformServices"; |
| 5 | import * as Effect from "effect/Effect"; |
| 6 | import { Status } from "../../../src/Cli/components/ui/Feedback"; |
| 7 | import { makeNonInteractive } from "../../../src/Interaction"; |
| 8 | |
| 9 | Effect.gen(function* () { |
| 10 | const service = makeNonInteractive({ colors: false, unicode: false }); |
| 11 | // Printing a view renders through Sigil, so the JSX runtime check below |
| 12 | // covers the components the CLI actually draws with. |
| 13 | yield* service.output.print(<Status variant="info">Starting deployment</Status>); |
| 14 | yield* service.output.success("Deployment complete"); |
| 15 | yield* Effect.sync(() => { |
| 16 | const element = <Box />; |
| 17 | if (process.env.NODE_ENV !== "production" || "_store" in element) { |
| 18 | throw new Error("The CLI must use the production JSX runtime"); |
| 19 | } |
| 20 | console.log(JSON.stringify({ cwd: process.cwd(), args: process.argv.slice(2) })); |
| 21 | }); |
| 22 | }).pipe(runMain); |