create-principles-disciple
v1.94.0
Published
Interactive CLI installer for Principles Disciple OpenClaw plugin
Maintainers
Readme
create-principles-disciple
MVP-First Prerequisite Installer for Principles Disciple.
What This Installer Delivers
| Component | Status | Description |
|-----------|--------|-------------|
| Runtime integration | Installed & verified | OpenClaw plugin with MVP activation channels |
| Operator CLI (pd) | Installed & verified | Command-line tool for diagnostics and demo |
| Review console | Installed & configured | Local web UI for principle review (loopback only) |
MVP Activation Channels
Three MVP-Core channels are always enabled and cannot be disabled:
prompt— soft principle injectioncode_tool_hook— RuleHost hard enforcementdefer_archive— graceful deferral
Quiet and gone capabilities (gfi, nocturnal, idle_trigger) are not surfaced to users.
Usage
Interactive
npx create-principles-discipleNon-interactive / JSON
npx create-principles-disciple --yes --workspace "/path/to/workspace" --json--json implies non-interactive. Output is exactly one parseable JSON object on stdout.
Options
--lang <en|zh> Language preference (default: zh)
--force Force overwrite existing installation
--smart Smart merge mode (generate .update files)
--yes Non-interactive mode with defaults
--non-interactive Skip prompts
--workspace <path> Workspace directory
--json Output result as JSON (implies non-interactive)Post-Install Verification
The installer automatically verifies the installation during setup:
- Feature flags —
.pd/feature-flags.yamlis generated and validated - Story A demo —
pd demo story-ais executed to confirm runtime integration - Console health —
/api/healthis checked on the local console instance
After a successful install, you can re-verify at any time:
pd runtime canary --workspace "<path>" --jsonConsole
The installer delivers a local pd-console web UI for principle review.
Starting the Console
pd console --workspace "/path/to/workspace" --no-authThe console listens on 127.0.0.1 only (loopback) — it is not accessible from other machines on the network. When using --no-auth, loopback binding is enforced; the server will refuse to start if --no-auth is combined with a non-loopback host.
Open http://127.0.0.1:3100 in your browser to access the console.
Console Security
- Default binding:
127.0.0.1(loopback only) --no-authis only permitted with loopback binding- For network access, use
--host <ip>with--token <secret>or setPD_CONSOLE_TOKENenvironment variable
Rerun / Reinstall
Re-running the installer updates the feature-flags.yaml. All three MVP-Core channels are always enabled — the installer does not allow partial disabling of core channels. The installer reads actual enabled channels from disk and reports them in the output.
Update Failure Recovery
If an update fails, the installer automatically restores the previous working installation from backup. No manual recovery steps are needed.
If the installer cannot restore the backup (rare), re-run the installer with --force.
Updating
PD supports updating through the Web UI:
- Open PD Console (http://localhost:3100)
- Navigate to Settings → Update
- Check for updates and review version info
- Click "Update Now" to apply
Update Options
- Merge Strategy: How to handle workspace file changes
smart: Generate .update files for manual mergeoverwrite: Force overwrite workspace fileskeep: Keep existing workspace files unchanged
- Backup: Create backup before update (recommended for rollback support)
API Endpoints
GET /api/update/check— Check for available updatesPOST /api/update/apply— Apply an updateGET /api/update/status— Get current update statusPOST /api/update/rollback— Rollback to previous version
Commands
install— Install PD (default command)uninstall— Remove PD (preserves user data)status— Show installation status
Requirements
- Node.js >= 18.0.0
License
MIT
