chirpie 1.0.7 → 1.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +65 -1
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -286,7 +286,7 @@ postsCommand.command("delete <id>").description("Delete a post").action(async (i
286
286
 
287
287
  // src/commands/accounts.ts
288
288
  import { Command as Command6 } from "commander";
289
- var accountsCommand = new Command6("accounts").description("List connected social accounts (X, Bluesky, LinkedIn, Threads, Mastodon, Instagram, and Facebook)").option("--json", "Output raw JSON").action(async (opts) => {
289
+ var accountsCommand = new Command6("accounts").description("List connected social accounts (X, Bluesky, LinkedIn, Threads, Mastodon, Instagram, Facebook, Telegram, Reddit, Pinterest, TikTok, YouTube, Google Business Profile, and Snapchat)").option("--json", "Output raw JSON").action(async (opts) => {
290
290
  const client = getClient();
291
291
  try {
292
292
  const accounts = await client.listAccounts();
@@ -419,6 +419,70 @@ accountsCommand.command("connect-facebook").description("Connect a Facebook Page
419
419
  process.exit(1);
420
420
  }
421
421
  });
422
+ accountsCommand.command("connect-telegram").description("Connect a Telegram bot to a channel or group").option("--bot-token <token>", "Telegram bot token (omit to enter securely via prompt)").option("--chat-id <id>", "Telegram chat ID (omit to enter via prompt)").action(async (opts) => {
423
+ const client = getClient();
424
+ try {
425
+ let botToken = opts.botToken;
426
+ let chatId = opts.chatId;
427
+ if (!botToken) {
428
+ const readline = await import("readline");
429
+ const rl = readline.createInterface({ input: process.stdin, output: process.stderr });
430
+ botToken = await new Promise((resolve) => {
431
+ process.stderr.write("Bot Token: ");
432
+ rl.question("", (answer) => {
433
+ rl.close();
434
+ resolve(answer.trim());
435
+ });
436
+ });
437
+ if (!botToken) {
438
+ error("Bot token is required");
439
+ process.exit(1);
440
+ }
441
+ }
442
+ if (!chatId) {
443
+ const readline = await import("readline");
444
+ const rl = readline.createInterface({ input: process.stdin, output: process.stderr });
445
+ chatId = await new Promise((resolve) => {
446
+ process.stderr.write("Chat ID: ");
447
+ rl.question("", (answer) => {
448
+ rl.close();
449
+ resolve(answer.trim());
450
+ });
451
+ });
452
+ if (!chatId) {
453
+ error("Chat ID is required");
454
+ process.exit(1);
455
+ }
456
+ }
457
+ const result = await client.connectTelegramAccount({
458
+ platform: "telegram",
459
+ bot_token: botToken,
460
+ chat_id: chatId
461
+ });
462
+ info(`Connected Telegram bot: ${result.username} (${result.platform_user_id})`);
463
+ } catch (err) {
464
+ error(err instanceof Error ? err.message : "Failed to connect Telegram bot");
465
+ process.exit(1);
466
+ }
467
+ });
468
+ accountsCommand.command("connect-reddit").description("Connect a Reddit account via OAuth").action(async () => {
469
+ info("Reddit integration is coming soon. Check chirpie.ai for updates.");
470
+ });
471
+ accountsCommand.command("connect-pinterest").description("Connect a Pinterest account via OAuth").action(async () => {
472
+ info("Pinterest integration is coming soon. Check chirpie.ai for updates.");
473
+ });
474
+ accountsCommand.command("connect-tiktok").description("Connect a TikTok account via OAuth").action(async () => {
475
+ info("TikTok integration is coming soon. Check chirpie.ai for updates.");
476
+ });
477
+ accountsCommand.command("connect-youtube").description("Connect a YouTube channel via Google OAuth").action(async () => {
478
+ info("YouTube integration is coming soon. Check chirpie.ai for updates.");
479
+ });
480
+ accountsCommand.command("connect-google-business").description("Connect a Google Business Profile via Google OAuth").action(async () => {
481
+ info("Google Business Profile integration is coming soon. Check chirpie.ai for updates.");
482
+ });
483
+ accountsCommand.command("connect-snapchat").description("Connect a Snapchat account via OAuth").action(async () => {
484
+ info("Snapchat integration is coming soon. Check chirpie.ai for updates.");
485
+ });
422
486
 
423
487
  // src/commands/analytics.ts
424
488
  import { Command as Command7 } from "commander";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chirpie",
3
- "version": "1.0.7",
3
+ "version": "1.0.9",
4
4
  "description": "Chirpie CLI — post to social media from the command line",
5
5
  "repository": {
6
6
  "type": "git",
@@ -31,7 +31,7 @@
31
31
  ],
32
32
  "license": "MIT",
33
33
  "dependencies": {
34
- "@chirpie/sdk": "^1.0.6",
34
+ "@chirpie/sdk": "^1.0.7",
35
35
  "commander": "^13"
36
36
  },
37
37
  "devDependencies": {