feat(cli): register connect/disconnect telegram commands
Some checks failed
CI / Lint (push) Has been cancelled
CI / Typecheck (push) Has been cancelled
CI / Broker tests (Postgres) (push) Has been cancelled
CI / Docker build (linux/amd64) (push) Has been cancelled

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Alejandro Gutiérrez
2026-04-09 12:44:32 +01:00
parent 17066b4f6c
commit e3fa6e6a5e

View File

@@ -31,6 +31,8 @@ import { runRemind } from "./commands/remind";
import { runCreate } from "./commands/create"; import { runCreate } from "./commands/create";
import { runSync } from "./commands/sync"; import { runSync } from "./commands/sync";
import { runProfile, type ProfileFlags } from "./commands/profile"; import { runProfile, type ProfileFlags } from "./commands/profile";
import { connectTelegram } from "./commands/connect-telegram";
import { disconnectTelegram } from "./commands/disconnect-telegram";
import { VERSION } from "./version"; import { VERSION } from "./version";
const launch = defineCommand({ const launch = defineCommand({
@@ -312,6 +314,22 @@ const main = defineCommand({
meta: { name: "hook", description: "Internal: handle Claude Code hook events" }, meta: { name: "hook", description: "Internal: handle Claude Code hook events" },
async run({ rawArgs }) { await runHook(rawArgs); }, 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() { run() {
runWelcome(); runWelcome();