From e3fa6e6a5eca64467656f4a77b5b42232e744e1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Guti=C3=A9rrez?= <35082514+alezmad@users.noreply.github.com> Date: Thu, 9 Apr 2026 12:44:32 +0100 Subject: [PATCH] feat(cli): register connect/disconnect telegram commands Co-Authored-By: Claude Opus 4.6 (1M context) --- apps/cli/src/index.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/apps/cli/src/index.ts b/apps/cli/src/index.ts index 9bd2f7f..5718fa0 100644 --- a/apps/cli/src/index.ts +++ b/apps/cli/src/index.ts @@ -31,6 +31,8 @@ import { runRemind } from "./commands/remind"; import { runCreate } from "./commands/create"; import { runSync } from "./commands/sync"; import { runProfile, type ProfileFlags } from "./commands/profile"; +import { connectTelegram } from "./commands/connect-telegram"; +import { disconnectTelegram } from "./commands/disconnect-telegram"; import { VERSION } from "./version"; const launch = defineCommand({ @@ -312,6 +314,22 @@ const main = defineCommand({ meta: { name: "hook", description: "Internal: handle Claude Code hook events" }, async run({ rawArgs }) { await runHook(rawArgs); }, }), + connect: defineCommand({ + meta: { name: "connect", description: "Connect an integration (e.g. telegram)" }, + args: { target: { type: "positional", description: "Integration target (telegram)", required: true } }, + async run({ args }) { + if (args.target === "telegram") await connectTelegram(process.argv.slice(process.argv.indexOf("telegram") + 1)); + else { console.error(`Unknown target: ${args.target}`); process.exit(1); } + }, + }), + disconnect: defineCommand({ + meta: { name: "disconnect", description: "Disconnect an integration (e.g. telegram)" }, + args: { target: { type: "positional", description: "Integration target (telegram)", required: true } }, + async run({ args }) { + if (args.target === "telegram") await disconnectTelegram(); + else { console.error(`Unknown target: ${args.target}`); process.exit(1); } + }, + }), }, run() { runWelcome();