integrateapi
v1.0.6
Published
Production-ready TypeScript integrations for Next.js apps
Downloads
717
Maintainers
Readme
IntegrateAPI CLI
Production-ready TypeScript integrations for Next.js apps. Install with one command.
Installation
# Install globally
npm install -g integrateapi
# Or use with npx
npx integrateapiCommands
integrateapi login
Authenticate with IntegrateAPI using magic link email.
$ integrateapi login
Enter your email: [email protected]
✓ Verification code sent to your email
Enter verification code: 123456
✓ Logged in as [email protected]integrateapi list
Show all available integrations.
$ integrateapi list
💳 Payments
✓ stripe
✓ lemon-squeezy
📧 Email
✓ resend
✓ sendgrid
🔐 Authentication
✓ clerk
🗄️ Database
✓ supabase
✓ planetscale
🤖 AI
✓ openai
✓ anthropic
...integrateapi add <integration>
Add an integration to your Next.js project.
$ integrateapi add stripe
✓ Found stripe integration
✓ Created 3 files
✓ Added 3 env vars to .env.local
Files created:
lib/integrations/stripe/client.ts
lib/integrations/stripe/types.ts
app/api/webhooks/stripe/route.ts
Next Steps:
1. Add your API keys to .env.local
2. Import: import { ... } from '@/lib/integrations/stripe'
3. Start: npm run devOptions:
-y, --yes- Skip confirmation prompts--no-deps- Skip dependency installation--no-env- Skip .env.local updates
integrateapi account
View your account details.
$ integrateapi account
Account Details
──────────────────────────────────────────────────
Email: [email protected]
Plan: free
Member since: 1/15/2024
Usage
Integrations used: 3
Installed: stripe, resend, clerkintegrateapi update
Check for template updates.
$ integrateapi update
Installed Integrations
──────────────────────────────────────────────────
✓ stripe
✓ resend
✓ All integrations are up to dateAvailable Integrations
| Category | Integrations | |----------|-------------| | Payments | Stripe, Lemon Squeezy | | Email | Resend, SendGrid | | Auth | Clerk | | Database | Supabase, PlanetScale | | AI | OpenAI, Anthropic | | Real-time | Liveblocks, Ably | | Storage | UploadThing | | Analytics | PostHog | | DevOps | Vercel, GitHub, GitLab |
Usage Example
After adding an integration:
// Stripe
import { stripe, createCheckoutSession } from '@/lib/integrations/stripe';
const session = await createCheckoutSession({
priceId: 'price_xxx',
successUrl: 'https://yourapp.com/success',
cancelUrl: 'https://yourapp.com/cancel',
});
// Resend
import { sendEmail } from '@/lib/integrations/resend';
await sendEmail({
to: '[email protected]',
subject: 'Welcome!',
html: '<h1>Welcome to our app!</h1>',
});
// OpenAI
import { chat } from '@/lib/integrations/openai';
const response = await chat({
messages: [{ role: 'user', content: 'Hello!' }],
});Configuration
The CLI stores configuration in ~/.integrateapi/config.json:
{
"token": "your-auth-token",
"email": "[email protected]",
"plan": "free",
"installedIntegrations": ["stripe", "resend"]
}Environment Variables
Set INTEGRATEAPI_URL to use a custom API server:
INTEGRATEAPI_URL=http://localhost:3001/api integrateapi listDevelopment
# Clone the repo
git clone https://github.com/integrateapi/cli
# Install dependencies
npm install
# Build
npm run build
# Test locally
npm link
integrateapi --versionLicense
MIT
