Search by

phramecms / config

TLyngeJ

Configuration Management (CMI) for PhrameCMS — pluggable storage, canonical JSON/YAML export, schema validation, dry-run diff, and atomic rollback.

Package info

github.com/PhrameCMS/config

pkg:composer/phramecms/config

Statistics

Installs: 42

Dependents: 6

Suggesters: 1

Stars: 0

Open Issues: 0

v0.1.0 2026-12-04 21:07 UTC

This package is auto-updated.

Last update: 2026-12-04 21:34:34 UTC


README

Drupal-inspired Configuration Management (CMI) module for PhrameCMS, built for deterministic GitOps and safe AI-agent configuration mutations.

Responsibilities

  • Active Config Store: Pluggable backend (DatabaseConfigStorage via phramecms/database or FileConfigStorage) for storing named configuration objects (e.g., entity.type.content, entity.bundle.content.article, field.storage.content.field_summary).
  • Deterministic Export & Import: Export active configuration to canonical, sorted JSON/YAML sync files and import from sync directories with stable diffs.
  • JSON Schema Validation: Every configuration namespace registers a JSON Schema via service tags (phrame.config_schema); invalid config is rejected before persisting.
  • Dry-Run & Diff Preview: Inspect exact additions, modifications, and deletions before mutating active configuration.
  • Atomic Apply with Snapshots & Rollback: Every mutation creates an immutable snapshot ID so human operators or AI agents can roll back cleanly (config.rollback).
  • Registered Operations: config.list, config.get, config.set, config.delete, config.diff, config.export, config.import, config.snapshots, config.rollback.

AI-First Design Role

Configuration defines the structure of a PhrameCMS site (entity types, bundles, fields, roles, API exposure). By enforcing JSON Schema validation, dry_run diffs, and automatic snapshots, AI agents can safely evolve site architecture without risking unrecoverable state corruption.

Explicitly Out of Scope

  • Storing editorial content records (see phramecms/entity)
  • Secret/credential storage (secrets belong in environment variables or dedicated secret providers)

Dependencies

  • PHP ^8.5
  • phramecms/core
  • phramecms/database (optional when using filesystem-only storage)

Ecosystem

Part of the PhrameCMS multi-repo suite. See PhrameCMS/cms for the starter distribution and architecture docs.