العودة إلى الكتالوج
npm i connectkit · TypeScript · Node 18+

أرسل مخرجات الذكاء الاصطناعي
إلى كل خدماتك

مكتبة TypeScript ترسل نص AI إلى Slack وNotion وAirtable وWebhook وEmail بسطر واحد. API موحّد، معالجات متوازية، بلا تبعيات خارجية.

$89 $179
pipeline.ts
import { connect } from 'connectkit'

// مخرجات AI من أي مزود
const aiText = await myModel.generate(prompt)

// إرسال متوازي لجميع الوجهات
const results = await connect(aiText, [
  {
    type: 'slack',
    config: { token, channel: '#ai-content' }
  },
  {
    type: 'notion',
    config: {
      token,
      action: 'create_page',
      databaseId
    }
  },
  {
    type: 'airtable',
    config: { token, baseId, tableId }
  },
  {
    type: 'webhook',
    config: { url: 'https://hooks.example.com' }
  },
])

// [{ handler:'slack', success:true },...]

AI → ConnectKit → خدماتك

ConnectKit يستقبل نص AI ويرسله بالتوازي لكل الوجهات التي تحددها.

🤖
مخرجات AI
Claude / GPT / Gemini
→
⚡
ConnectKit
connect(text, handlers)
→
💬 Slack
📝 Notion
📊 Airtable
🔗 Webhook
📧 Email


المعالجات

5 معالجات جاهزة للإنتاج

كل معالج يدعم TypeScript types كاملة وإعادة محاولة ذكية عند الخطأ.

💬
Slack Handler
sendToSlack(text, config)
أرسل رسالة إلى أي channel. يدعم thread replies وcustom username وicon emoji.
📝
Notion Handler
sendToNotion(text, config)
إنشاء صفحة جديدة، إضافة كتلة لصفحة موجودة، أو تحديث صفحة. يدعم custom properties.
📊
Airtable Handler
sendToAirtable(text, config)
إضافة سجل جديد بحقل Content + CreatedAt تلقائي. يدعم حقول إضافية مخصصة.
🔗
Webhook Handler
sendToWebhook(text, config)
POST/GET لأي URL. headers مخصصة، body key قابل للتغيير، extra data مدمجة في الـ payload.
📧
Email Handler
sendEmail(text, config)
Resend وSendGrid. نص أو HTML. إلى عنوان واحد أو مصفوفة عناوين.

أمثلة الكود

كل معالج بسطرين

index.ts
import { connect } from './connectkit/src/index.js'

const results = await connect(aiText, [
  { type: 'slack',    config: { token, channel: '#ai' } },
  { type: 'notion',   config: { token, action: 'create_page', databaseId } },
  { type: 'airtable', config: { token, baseId, tableId } },
  { type: 'webhook',  config: { url: 'https://hooks.example.com' } },
  { type: 'email',    config: { provider: 'resend', apiKey, from, to, subject } },
])

console.log(results)
// [
//   { handler: 'slack',    success: true },
//   { handler: 'notion',   success: true, data: {...} },
//   { handler: 'airtable', success: true, data: {...} },
//   { handler: 'webhook',  success: true, data: {...} },
//   { handler: 'email',    success: true },
// ]
slack-example.ts
import { sendToSlack } from './connectkit/src/index.js'

const result = await sendToSlack(aiText, {
  token:      'xoxb-your-bot-token',
  channel:    '#ai-content',
  username:   'AI Bot',
  icon_emoji: ':robot_face:',
  // thread_ts: '1234567890.123' // رد في thread
})

if (!result.success) console.error(result.error)
notion-example.ts
import { sendToNotion } from './connectkit/src/index.js'

// إنشاء صفحة جديدة
await sendToNotion(aiText, {
  token:      'ntn_your-token',
  action:     'create_page',
  databaseId: 'abc123',
  title:      'محتوى مولّد بـ AI',
})

// إضافة كتلة لصفحة موجودة
await sendToNotion(aiText, {
  token:  'ntn_your-token',
  action: 'append_block',
  pageId: 'page-id-here',
})
airtable-example.ts
import { sendToAirtable } from './connectkit/src/index.js'

await sendToAirtable(aiText, {
  token:   'pat_your-personal-token',
  baseId:  'appXXXXXXXXXXXXXX',
  tableId: 'AI Content',
  fields:  { // حقول إضافية اختيارية
    Category: 'Marketing',
    Status:   'Draft',
    Source:   'Claude',
  }
})
webhook-example.ts
import { sendToWebhook } from './connectkit/src/index.js'

await sendToWebhook(aiText, {
  url:     'https://hooks.example.com/ai',
  method:  'POST',
  headers: { 'X-API-Key': 'secret' },
  bodyKey: 'content', // default: 'text'
  extra:   { source: 'pipeline', version: '1.0' }
})

// payload: { content: "...", timestamp: "...", source: "pipeline" }
email-example.ts
import { sendEmail } from './connectkit/src/index.js'

// Resend
await sendEmail(aiText, {
  provider: 'resend',
  apiKey:   're_your-key',
  from:     'ai@yourdomain.com',
  to:       ['user@example.com'],
  subject:  'محتوى AI جديد',
})

// SendGrid
await sendEmail(aiText, {
  provider: 'sendgrid',
  apiKey:   'SG.your-key',
  from:     'ai@yourdomain.com',
  to:       'user@example.com',
  subject:  'AI Content',
  bodyType: 'html',
})

الميزات

مصمّم للأنابيب الإنتاجية

⚡
إرسال متوازي
connect() يرسل لجميع الوجهات بالتوازي عبر Promise.all. لا انتظار تسلسلي.
🔷
TypeScript أولاً
كل config له interface واضح. IntelliSense كامل في VS Code. بلا any.
📦
بلا تبعيات
يستخدم fetch المدمجة في Node.js 18+. لا npm install لشيء آخر.
🛡️
معالجة أخطاء آمنة
كل معالج يُعيد ConnectResult. فشل معالج لا يوقف البقية.
🔌
named exports
استخدم connect() للكل أو sendToSlack() مباشرة. مرونة كاملة.
✂️
سهل التوسع
أضف معالجاً جديداً بملف واحد. البنية واضحة ومتسقة عبر كل المعالجات.


ملفات المشروع

ما تحصل عليه

7 ملفات TypeScript + README + LICENSE. ابدأ الاستخدام فور نسخ المجلد.

.tssrc/index.ts
.tssrc/types.ts
.tshandlers/slack.ts
.tshandlers/notion.ts
.tshandlers/airtable.ts
.tshandlers/webhook.ts
.tshandlers/email.ts
.mdREADME.md
.mdLICENSE.md

اربط AI بكل خدماتك اليوم

انسخ المجلد إلى مشروعك واستخدم connect() فوراً. بلا npm، بلا إعداد.

$89
السعر الأصلي $179
شراء عبر واتساب لديّ سؤال

ConnectKit - مكتبة TypeScript لربط الذكاء الاصطناعي بالخدمات الخارجية

ConnectKit مكتبة TypeScript مفردة ترسل نص مولّد بالذكاء الاصطناعي إلى Slack وNotion وAirtable وWebhook وEmail بسطر واحد. مصمّمة لأنابيب AI الإنتاجية التي تحتاج للتوجيه الفوري لمخرجات LLM إلى خدمات متعددة في آنٍ واحد.

لماذا ConnectKit؟

بعد توليد المحتوى بـ Claude أو GPT أو Gemini، تحتاج لإرساله للفريق على Slack، حفظه في Notion، تسجيله في Airtable، وإطلاق webhook لتحريك workflow. ConnectKit يفعل هذا كله بـ Promise.all — بلا تبعيات خارجية، بلا npm install.

المعالجات المتاحة

متطلبات التشغيل

Node.js 18+ (fetch مدمجة) وTypeScript 5+. لا توجد حزم npm مطلوبة. انسخ مجلد src/ إلى مشروعك واستخدمه مباشرة. يعمل مع أي بيئة تدعم native fetch: Node.js، Deno، Bun، Cloudflare Workers، Edge Functions.