PHPackages                             agents/templates - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. agents/templates

ActiveComposer-plugin[Templating &amp; Views](/categories/templating)

agents/templates
================

AgentsPHP templates

1114PHPCI passing

Since Jan 23Pushed 6mo agoCompare

[ Source](https://github.com/agentsphp/templates)[ Packagist](https://packagist.org/packages/agents/templates)[ RSS](/packages/agents-templates/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (1)Used By (0)

AgentsPHP / Templates
=====================

[](#agentsphp--templates)

AgentsPHP Templates is a Composer-based template distribution system for PHP projects. It enables developers to sync AI assistant configuration files (Claude, Cursor IDE rules), code scaffolding templates, and project boilerplate from packages directly into their projects.

**Key features:**

- Sync templates via `composer templates --template vendor/package/template`
- Automatic syncing on `composer update` via hooks
- Support for custom template packages
- Conflict detection for existing files

```
┌───────────────────────────┐     composer templates      ┌─────────────────────┐
│   Template Package        │    ─────────────────────►   │   Your Project      │
│                           │                             │                     │
│  vendor/package/          │                             │  project/           │
│  └── templates/           │                             │  ├── .cursor/       │
│      └── my-template/     │         %cwd%               │  │   └── rules/     │
│          ├── template.json│   ──────────────►           │  ├── .claude/       │
│          └── *.stub       │                             │  └── src/           │
└───────────────────────────┘                             └─────────────────────┘

```

Installation
============

[](#installation)

The recommended way to is via Composer:

```
composer require agents/templates
```

This library requires PHP 8.2 or higher.

Quick Start
-----------

[](#quick-start)

1. Install the package via Composer
2. Configure automatic syncing in your `composer.json`:

```
{
    "require": {
        "php": ">=8.2"
    },
    "require-dev": {
        "agents/templates": "^0.1.0"
    },
    "scripts": {
      "post-update-cmd": [
        "@composer agents:templates --template agents/templates/demo --override"
      ]
    },
    "config": {
      "allow-plugins": {
        "agents/templates": true
      }
    }
}
```

3. Run `composer update` to automatically sync template, or use the commands manually via `composer templates`.

Console
-------

[](#console)

You can call the command directly via Composer:

```
# Command
composer agents:templates --template {vendor}/{package}/{path}/{template}

# For example
composer agents:templates --template agents/templates/templates/fx
```

OptionShortDescription`--template``-t`Template name (`vendor/package/template`)`--override``-o`Skip confirmation for existing files`--target`Target directory (default: cwd)Templates
---------

[](#templates)

TemplateDescription`agents/templates/demo`Minimal example with AGENTS.md for PHP projects`agents/templates/fx`Full AgentsPHP stack: Claude/Cursor configs, CQRS patterns, API templates### Custom Template

[](#custom-template)

Templates are defined by a `template.json` file that specifies which files to sync.

**Template Structure**

Templates follow the composer package structure `vendor/package/template`:

```
acme/                           # vendor
└── ai-templates/               # package
    ├── composer.json
    └── templates/
        └── api-project/        # template name
            ├── template.json
            ├── rules.md.stub
            └── config/
                └── settings.json.stub

```

To use this template: `--template acme/ai-templates/api-project`

**Minimal template.json**

```
{
  "name": "my-template",
  "files": {
    "readme": {
      "input": "%cwd%/README.md.stub",
      "output": "README.md"
    }
  }
}
```

Example
-------

[](#example)

See the [playground](https://github.com/agentsphp/playground) for a working example using this template system.

###  Health Score

21

—

LowBetter than 17% of packages

Maintenance46

Moderate activity, may be stable

Popularity15

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity13

Early-stage or recently created project

 Bus Factor1

Top contributor holds 60% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/538058?v=4)[Milan Šulc](/maintainers/f3l1x)[@f3l1x](https://github.com/f3l1x)

---

Top Contributors

[![felixure](https://avatars.githubusercontent.com/u/23188301?v=4)](https://github.com/felixure "felixure (3 commits)")[![f3l1x](https://avatars.githubusercontent.com/u/538058?v=4)](https://github.com/f3l1x "f3l1x (2 commits)")

---

Tags

agentsaiphpskillstemplates

### Embed Badge

![Health badge](/badges/agents-templates/health.svg)

```
[![Health](https://phpackages.com/badges/agents-templates/health.svg)](https://phpackages.com/packages/agents-templates)
```

###  Alternatives

[limenius/react-bundle

Client and Server-side react rendering in a Symfony Bundle

3841.2M](/packages/limenius-react-bundle)[pdewit/nova-external-url

An external URL Laravel Nova field.

30383.2k](/packages/pdewit-nova-external-url)[wbrowar/guide

A CMS Guide for Craft CMS.

6154.7k1](/packages/wbrowar-guide)[localgovdrupal/localgov_base

The base theme for LocalGov Drupal websites.

13126.9k5](/packages/localgovdrupal-localgov-base)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
