DocumentationQuickstart

Quickstart

1. Start the emulator

The emulator runs locally and accepts any Bearer token — no credentials needed for development.

npx @cpod/emulator
# or: git clone https://github.com/cpod-ai/cpod-sdk && cd emulator && npm start

The emulator starts at http://localhost:4000 with 100+ seed records across all EDM domains.

Verify it’s running:

curl http://localhost:4000/v1/health
# {"status":"ok","version":"emulator-1.0.0","uptime":3,"entities":{...}}

2. Install the SDK

npm install @cpod/sdk

3. Set environment variables

export CPOD_API_URL=http://localhost:4000
export CPOD_CLIENT_ID=emulator-client
export CPOD_CLIENT_SECRET=emulator-secret

4. Make your first call

import { CpodClient } from '@cpod/sdk'
 
const sdk = CpodClient.fromEnv()
 
// List people from the EDM
const people = await sdk.people.list({ type: 'employee' })
console.log(`Found ${people.items.length} employees`)
 
// Store something
await sdk.storage.db.collection('my-app').set('config', { theme: 'dark' })
const config = await sdk.storage.db.collection('my-app').get('config')
console.log(config) // → { theme: 'dark' }

You’re connected. The emulator returns realistic seed data — iterate freely without touching production.

Next Steps