Skip to content

Release v1.0.0#1

Draft
rafageist wants to merge 20 commits intomainfrom
develop
Draft

Release v1.0.0#1
rafageist wants to merge 20 commits intomainfrom
develop

Conversation

@rafageist
Copy link
Copy Markdown
Member

@rafageist rafageist commented Mar 28, 2026

Summary

Initial release of div CLI - Official runtime and package manager for the Divengine template ecosystem.

Commands

  • render - Render templates with input data
  • build - Build artifacts from templates
  • doctor - Run environment diagnostics
  • templates - List available templates
  • packages - List packages in vendor directory
  • resolve - Resolve template identifiers to physical paths
  • help - Show help for commands
  • version - Show CLI version

Input Formats

  • JSON - Standard JSON objects and arrays
  • YAML - Key-value pairs, nested objects, lists
  • XML - Elements as nested keys, @ prefix for attributes
  • PHP - Files that return arrays (dynamic data generation)

Features

  • Stdin support (pipe data without --input flag)
  • Auto-detection of input format
  • Cross-platform ANSI colored output
  • PHAR distribution for easy installation
  • Self-contained builds (no dependencies needed)

Infrastructure

  • PHAR Build - Optimized PHAR with ~1MB size, only production dependencies
  • CI/CD - PHPUnit tests + PHPStan static analysis on PRs
  • Release Pipeline - Automatic releases on merge to main with PDF documentation
  • Install Scripts - Unix (curl | php), Windows (PowerShell/CMD)
  • Local Development - php install --from-here builds and installs from local source

Checks

  • Tests pass
  • PHPStan passes
  • Ready for review

Installation

# Unix/macOS
curl -sSL https://raw.githubusercontent.com/divengine/cli/main/install | php

# Windows (PowerShell)
irm https://raw.githubusercontent.com/divengine/cli/main/install.ps1 | iex

Development Install

git clone https://github.com/divengine/cli.git
cd cli
php install --from-here

Requirements

  • PHP >= 8.1

Documentation

See the docs/ directory for detailed documentation. Template syntax is documented in divengine/div.

- Core architecture: Application, Command base class, ArgParser
- Commands: help, version, doctor, render, transform, build, templates, packages, resolve
- Core services: TemplateRunner, Filesystem, PackageInspector, DoctorService
- Console utilities: ANSI colors, segments, progress, helpers
- Multi-platform bin: div (Unix), div.bat (Windows)
- Install scripts: install.sh, install.bat
- Enhanced CLI output with colored segments and semantic messages
- composer.json: require divengine/div ^6.0
- DoctorService: detect divengine\div class correctly
- TemplateRunner: use fallback {{variable}} syntax as default
- Suppress deprecated warnings from div engine during rendering
- Add InputParser for JSON, YAML, XML, PHP input formats
- Add stdin support for all render commands
- Add PHAR build script with optimized vendor inclusion
- Add release workflow for GitHub Actions
- Add install scripts for Unix, Windows (PowerShell/CMD)
- Update help text with examples and format documentation
- Require PHP >= 8.1, divengine/div ^6.0
- Add PHPUnit workflow for running tests
- Add PHPStan workflow for static analysis (level 4)
- Configure branch protection on main:
  - Require Tests and PHPStan checks to pass
  - Require 1 approving review
  - Enforce for admins
- Add docs/ directory with:
  - README.md (overview)
  - 01. Installation.md
  - 02. Commands.md
  - 03. Input Formats.md
  - 04. Template Syntax.md

- Add releases/ directory with v1.0.0.md notes

- Add scripts/:
  - build_pdf.py: Generates PDF from markdown docs using pandoc
  - generate_release_notes.py: Template for release notes

- Update release.yml workflow to:
  - Install Python and pandoc
  - Install LaTeX (texlive)
  - Build PDF documentation
  - Attach PDF to release assets
@rafageist rafageist self-assigned this Mar 28, 2026
- Add --local flag to install scripts
- Detect local source and build PHAR if needed
- Update README with development install instructions

Usage:
  php install --local   # Build and install from local source
  php install           # Download from GitHub releases
Usage:
  php install --from-here  # Development (local)
  php install              # Production (download)
- Add LICENSE file (GPL-3.0)
- Add license header to all PHP source files:
  - src/cli/*.php
  - src/commands/*.php
  - src/core/*.php
  - src/utils/*.php
  - build/build-phar.php
- Headers include:
  - Program description
  - GPL license text
  - @Package, @author, @Version, @link annotations
- Delete TransformCommand.php (duplicate of render)
- Remove from Application.php registration
- Update README.md and docs/02.Commands.md
- Now only render command exists for template rendering
- Delete DoctorCommand.php and DoctorService.php
- Not needed: div CLI works standalone without divengine/div
- Update README.md and docs
- Delete ResolveCommand.php and PackageInspector.php
- Not needed: premature feature before package system exists
- Update README.md and docs
- Filesystem::listTemplates() now filters by both .tpl and .div
- Display extension in templates list output
- Update docs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant