Setup a PURISTA project
In this quickstart step, you create a new project with the PURISTA CLI blueprint engine. The generator resolves a local project blueprint based on your runtime, event bridge, HTTP server, linting, and module-format choices, then writes a coherent project skeleton for that setup.
Create a new project
Run one of the following commands:
npm create purista@latestbun create purista@latestyarn create purista@latestpnpm create purista@latestYou can also run the same flow directly through the main CLI:
purista init my-appFor CI, scripts, or agentic tooling, the same command also supports deterministic non-interactive usage:
purista init my-app \
--runtime node \
--event-bridge default \
--webserver \
--linter biome \
--formatter biome \
--type module \
--package-manager npm \
--non-interactive \
--defaults \
--no-installThe create wrapper and the main CLI use the same underlying command engine, so both entry points generate the same project shape.
Choose the options that fit your runtime and deployment setup:
runtime:nodeorbunevent bridge:default,amqp,mqtt,nats, ordaprwebserver: add the bundled Hono-based HTTP surface when neededlinter:biome,eslint, ornonemodule type:moduleorcommonjs
After setup, generate services and business artifacts with the CLI:
purista add servicepurista add commandpurista add subscriptionpurista add streampurista add queuepurista add queue-workerpurista add agent
Recommended scaffold order for new projects:
purista add serviceand firstpurista add commandpurista add streamif you need push/live updatespurista add queue+purista add queue-workerfor background jobspurista add agentwhen a capability is model-driven, conversational, or tool-loop oriented
Rule of thumb:
- commands = request/response entrypoints
- streams = live outbound updates
- queues/workers = durable async processing
- agents = core PURISTA primitives backed by
@purista/harness
See also:
Agents are available from @purista/core. Core stays provider-neutral; install a provider package only in applications that bind live models at runtime:
npm install @purista/harness-openaipnpm add @purista/harness-openaibun add @purista/harness-openaiyarn add @purista/harness-openaiProject structure
The generated app shape is intentionally minimal. The initializer creates the runtime/bootstrap files, the project config, and an example ping service with starter commands plus the queue and worker artifacts used by the base template. Follow-up CLI commands then extend that structure.
|-public/ # only when --webserver is enabled
|-src/
| |-config/ # bridge/http config files when required by the selected blueprints
| |-agents/
| |-service/
| | |- serviceEvent.enum.ts
| | |- ping/
| | |- generalPingServiceInfo.ts
| | |- v1/
| | |- pingServiceConfig.ts
| | |- pingV1ServiceBuilder.ts
| | |- pingV1Service.ts
| | |- pingV1Service.test.ts
| | |- command/
| | |- ping/
| | |- schema.ts
| | |- types.ts
| | |- pingCommandBuilder.ts
| | |- pingCommandBuilder.test.ts
| |-eventbridge.ts
| |-http.ts # only when --webserver is enabled
| |-index.ts
|- package.json
|- package-lock.json / bun.lockb / pnpm-lock.yaml / yarn.lock
|- tsconfig.json
|- purista.json
|- README.md
|- .gitignoreNotes:
src/serviceandsrc/agentsare the default CLI-managed roots.- The exact filenames follow the
fileConventionandeventConventionfrompurista.json. src/eventbridge.tsis generated from the chosen bridge blueprint.src/http.tsandpublic/are only created for the HTTP-enabled project variants.- Additional commands, subscriptions, streams, queues, queue workers, and agents are generated into this structure by
purista add ....
The CLI expects this structure for automated updates and type-safe wiring, so avoid moving the generated roots unless you also update purista.json.
