create-daftarai-plugin
v0.1.2
Published
Scaffold a Daftarai plugin (capability-injected, sandboxed, sign-pipeline-ready) from an interactive CLI. Used via `npm create daftarai-plugin@latest <id>` or `pnpm create daftarai-plugin <id>`.
Downloads
293
Maintainers
Readme
create-daftarai-plugin
Scaffold a Daftarai plugin from an interactive CLI.
# pnpm
pnpm create daftarai-plugin my-plugin
# npm
npm create daftarai-plugin@latest my-plugin
# Or via npx directly
npx create-daftarai-plugin@latest my-pluginThe scaffold prompts for:
- Plugin id (kebab-case)
- Display name (bilingual ar+en)
- Description (bilingual ar+en)
- Cultural category (
zakat/hijri/prayer-times/fasting/halal/ none) - Required capabilities (from the v1.0 closed vocabulary)
- Agency mode (yes/no)
- MCP exposure (yes/no)
Output is a working plugin folder. pnpm install && pnpm test passes immediately on the generated skeleton.
What you get
my-plugin/
manifest.json v3 schema; auto-validates through pluginManifestV3Schema
handler.ts capability-injected handler with the 3-branch rejection pattern
portal/page.tsx SSR React component (renders inside an iframe sandbox)
i18n/{ar,en}.json bilingual strings (greeting + 3 error keys + disclaimer)
tests/handler.spec.ts unit-test skeleton with capability mocks pre-stubbed
tests/integration.spec.ts integration-test skeleton (Postgres-backed; describe.skip)
tests/dialect-fixtures.ts MSA + Gulf + Levantine + Egyptian + Maghrebi seed inputs
README.md bilingual; covers build/sign/submit
package.json workspace-style deps + type-check + test scriptsWhen you select a cultural category, the scaffold adds:
my-plugin/
methodology-import.ts wires @daftarai/methodology + applyDisclaimer helper
conformance-checklist.md per-category author checklist for cultural-review submissionWhen you opt into agency mode, the scaffold adds:
my-plugin/
tenant-helpers.ts buildTenantContext + assertTenantId runtime guard
portal-tenant-context.tsx agency-view banner when userId ≠ tenantIdDeveloper docs
Full Daftarai Plugin SDK v3 docs (bilingual ar+en) live in the Daftarai monorepo at docs/sdk/:
- Overview — mental model, scaffold, manifest, handler, portal, cultural-tier, sign pipeline
- Capability vocabulary reference — all 20 v1.0 capabilities + audit log + freeze semantics
- Methodology authoring guide — required reading for cultural-tier plugins
- Sign-pipeline operator guide — 5 sign-pipeline stages + closed-set rejection codes
License
MIT — see LICENSE.
Issues + support
File issues at github.com/mjaberster/daftarai/issues.
