Download packages/cli/src/commands/handlers/service/status.ts from SaylorTwift/opencode: direct link, hf CLI and curl.
- Browser
- Download file 470 Bytes
-
https://huggingface.co/SaylorTwift/opencode/resolve/main/packages/cli/src/commands/handlers/service/status.ts
- Command line
-
hf download hf://SaylorTwift/opencode/packages/cli/src/commands/handlers/service/status.ts
-
curl -L -o status.ts https://huggingface.co/SaylorTwift/opencode/resolve/main/packages/cli/src/commands/handlers/service/status.ts
470 Bytes
| import { EOL } from "os" | |
| import * as Effect from "effect/Effect" | |
| import { Commands } from "../../commands" | |
| import { Runtime } from "../../../framework/runtime" | |
| import { Daemon } from "../../../services/daemon" | |
| export default Runtime.handler( | |
| Commands.commands.service.commands.status, | |
| Effect.fn("cli.service.status")(function* () { | |
| const url = yield* (yield* Daemon.Service).status() | |
| process.stdout.write((url ? `running ${url}` : "stopped") + EOL) | |
| }), | |
| ) | |