@pega/sdk
v0.0.3
Published
Scaffold a Pega SDK application project
Readme
@pega/sdk
Create a production-ready Pega SDK application in seconds. @pega/sdk scaffolds a
fully configured project — build tooling, authentication, runtime bootstrap, and
optional starter components — so you can connect to your Pega server and start
building right away.
Requirements
- Node.js 20 or later
- npm 9 or later
- Access to a Pega Infinity server (for running the generated app)
Quick Start
npx @pega/sdk initAnswer the prompts, then:
cd my-pega-app
npm install
npm run devYour app starts on a local dev server. Open the printed URL in your browser.
What the CLI Asks You
Running init walks you through an interactive setup:
- Project name — the directory to create for your new app.
- AI-assisted development — optionally add agent instructions and skill files
tailored to your AI coding tool:
- GitHub Copilot (
.github/copilot-instructions.md+ skills) - Cursor (
.cursor/rules/+ skills) - Claude Code (
AGENTS.md+ skills)
- GitHub Copilot (
- Framework — the UI framework for your app:
| Framework | Stack |
| --------- | ----- |
| React | Vite + React 18 +
@pega/sdk-react| | Angular | Angular 18 +@pega/sdk-angular| | Web Components | Vite + Lit +@pega/sdk-wc| | React Native | Expo +@pega/sdk-react(experimental) | - Starter components — optionally scaffold working component implementations
you can customize, grouped by category:
- Fields — TextInput, Dropdown, Checkbox, Date, and more
- Templates — OneColumn, TwoColumn, DefaultForm, CaseView, and more
- Widgets — ToDo, CaseHistory, Attachment, and more
- Infrastructure — ActionButtons, NavBar, Stages, and more
- Design System Extensions — AlertBanner, FieldGroup, Pulse, and more
What You Get
The generated project is ready to run and includes:
- Pre-configured build tooling for your chosen framework
- Pega SDK integration with authentication and runtime bootstrap
- A
sdk-config.jsonfile for your server connection - Optional starter UI components you can extend
- Optional AI coding-assistant configuration
Configure Your Pega Server
Before running the app, edit sdk-config.json in the project root with your
environment details:
{
"serverConfig": {
"infinityRestServerUrl": "https://<your-server>/prweb",
"appAlias": "<your-app-alias>",
"appPortal": "<your-portal>",
"appMashupCaseType": "<your-case-type>",
},
"authConfig": {
"authService": "pega",
"mashupClientId": "<your-oauth-client-id>",
"mashupUserIdentifier": "<user>",
"portalClientId": "<your-oauth-client-id>",
},
}infinityRestServerUrl— your Pega Infinity REST endpointappAlias— the application alias to loadmashupClientId/portalClientId— OAuth 2.0 client IDs registered in Pega
Available Scripts
Inside the generated project:
| Command | Description |
| ----------------- | ------------------------------------------------------ |
| npm run dev | Start the local development server |
| npm run build | Create a production build |
| npm run preview | Preview the production build locally (Vite frameworks) |
Troubleshooting
npm installfails resolving@pega/*packages — the SDK packages require access to the Pega npm registry. Configure an.npmrcwith the registry URL and auth token provided by your Pega administrator.- Blank page / auth errors on startup — double-check the values in
sdk-config.json, especiallyinfinityRestServerUrland the OAuth client IDs.
License
Apache-2.0
