create-pipedrive-app CLI
Scaffold a Pipedrive app with create-pipedrive-app
Every app that talks to Pipedrive starts with the same setup before you write any business logic. You need an OAuth 2.0 flow, a database, an ORM, environment configuration, a TypeScript project, and a Pipedrive API client that hands you the right token for each company. It's the same boilerplate every time.
create-pipedrive-app generates all of it for you, so you can spend your first hour building features instead of plumbing:
npx create-pipedrive-app my-appWhat you get
The CLI asks three questions:
- Project name — the name or path for your new project.
- Database — PostgreSQL, MySQL, or SQLite.
- App extensions — custom panels, custom modals, both, or none.
From your answers it generates a production-ready Node.js and TypeScript project. Here's what's included.
OAuth 2.0 flow
The generated app ships with a complete OAuth 2.0 flow:
- redirect to Pipedrive,
- callback handling,
- token exchange,
- token refresh.
The OAuth
stateparameter is HMAC-signed with a short TTL to protect against replay and forgery, so you don't have to build that protection yourself.
Database and Drizzle ORM
The project comes with schema definitions, migrations, driver configuration, and environment setup — all preconfigured for the database you chose.
Because the scaffold uses Drizzle ORM, your application code stays the same across PostgreSQL, MySQL, and SQLite. Drizzle exposes one TypeScript API regardless of the underlying database.
Pipedrive API client
The scaffold wraps the official Pipedrive Node.js SDK in a small helper:
getClient(companyId)Given a company ID, getClient automatically:
- loads the correct OAuth token,
- configures token refresh,
- updates the stored credentials whenever tokens change.
When you call the SDK through this helper, you never manage OAuth tokens by hand.
Resilient server startup
In Docker-based development, the API server sometimes starts before the database is ready. The generated src/index.ts retries the database connection during startup instead of crashing.
App extensions
If you opt in to app extensions, the CLI generates a React and Vite frontend under:
frontend/app-extension-ui/
The frontend already wires up:
@pipedrive/app-extensions-sdk,- theme synchronization,
- resize handling,
- snackbars,
- confirmation dialogs.
The Express backend serves the built frontend automatically at /extensions/panel and /extensions/modal, so there's no separate frontend hosting to set up. If you select only one extension type, only that route is generated.
Docker Compose with live reloading
The generated project runs with one command:
docker-compose up --watchThis starts the backend, the Vite dev server, and live file synchronization for both — no manual rebuilds or container restarts.
Getting started
Creating a new app takes only a few commands:
npx create-pipedrive-app my-app
cd my-app
cp .env.example .env
docker-compose up --watchThen add your credentials to .env:
PIPEDRIVE_CLIENT_IDPIPEDRIVE_CLIENT_SECRET
Your service is now running.
If you chose app extensions, expose the Vite dev server through an HTTPS tunnel — for example ngrok or Cloudflare Tunnel — and paste that URL into your app in the Developer Hub. The generated frontend already handles SDK initialization, resizing, theme switching, and extension-specific actions.
App extensions must be served over HTTPS. During development, always point the Developer Hub at your tunnel URL, not at
localhost.
For a production build, run:
npm run buildThis compiles both the backend and the Vite frontend bundle into a single deployable project — no separate frontend deployment required.
AI assistant support
The package also ships with skills for Claude Code and Codex that let AI assistants scaffold apps, add extensions, review Marketplace readiness, and answer Pipedrive API questions — all routed through the same CLI.
Try it
- NPM: https://www.npmjs.com/package/create-pipedrive-app
- GitHub: https://github.com/pipedrive/create-pipedrive-app
- Discussion thread: https://devcommunity.pipedrive.com/t/introducing-create-pipedrive-app-scaffold-a-production-ready-pipedrive-integration-in-one-command/20348
If you've built a Pipedrive app before, we'd love your feedback. The whole point of create-pipedrive-app is to make the first hour of building genuinely fast — tell us where it still isn't.
Updated about 7 hours ago
