PHPackages                             itsahappymedium/ttc - 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. [CLI &amp; Console](/categories/cli)
4. /
5. itsahappymedium/ttc

ActiveLibrary[CLI &amp; Console](/categories/cli)

itsahappymedium/ttc
===================

A PHP Command Line tool for compiling Twig template files.

0.0.1(2y ago)18MITPHPPHP ^7.3|^8.0

Since Feb 9Pushed 2y ago1 watchersCompare

[ Source](https://github.com/itsahappymedium/ttc)[ Packagist](https://packagist.org/packages/itsahappymedium/ttc)[ Docs](https://github.com/itsahappymedium/ttc)[ RSS](/packages/itsahappymedium-ttc/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (3)Versions (3)Used By (0)

Twig Template Compiler
======================

[](#twig-template-compiler)

[![packagist package version](https://camo.githubusercontent.com/1963704ea3d2a966f5155026ca2af4ccc687e656204c1aa94f18dd60d1a91fb1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6974736168617070796d656469756d2f7474632e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/itsahappymedium/ttc)[![packagist package downloads](https://camo.githubusercontent.com/b5bd639122fdb60f3975822f3ef021f9d1066167523411333d94107eb7ea5b09/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6974736168617070796d656469756d2f7474632e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/itsahappymedium/ttc)[![license](https://camo.githubusercontent.com/56d159f1b1549620d2172cee232df8cc87a5916edb01e4bd1eec2fd6054d7329/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6974736168617070796d656469756d2f7474632e7376673f7374796c653d666c61742d737175617265)](license.md)

A PHP Command Line tool for compiling Twig template files.

Installation
------------

[](#installation)

### To a package (local)

[](#to-a-package-local)

```
composer require-dev itsahappymedium/ttc
./vendor/bin/ttc help

```

### To your system (global)

[](#to-your-system-global)

```
composer global require itsahappymedium/ttc
ttc help

```

Usage
-----

[](#usage)

### Example

[](#example)

```
# Compiles all .twig files in the `templates` directory recursively
# Using variables from the `staging-server` object in `config.yml`
# Placing all generated files in the `public` directory
ttc -r -s templates -d public -f config.yml -b staging-server
```

At the very least, one of `input` or `source` options are required.

### Options

[](#options)

- `--arguments-file` / `-f` - A file to load twig arguments/variables from.
- `--arguments-file-type` / `-t` - The type of file `arguments-file` is. (Possible values: `env`,`json`,`yml`) (If omitted, the file type will be automatically determined based on the file extension.)
- `--arguments-file-base` / `-b` - A dot-notation path inside of `arguments-file` where the arguments/variables should be loaded from.
- `--destination` / `-d` - The directory to place the generated files in. (If omitted, the files will be placed in the same directory as the twig files)
- `--input` / `-i` - An individual twig file to compile.
- `--output` / `-o` - The path where the individual compiled file should go. (Used in combination with `input`) (If omitted, the compiled file will be placed in the same directory as the twig file)
- `--source` / `-s` - The directory where the twig files are.

### Flags

[](#flags)

- `--recursive` / `-r` - Sets whether or not the `source` directory should be searched recursively. (Only used when the `source` option is used)

Related
-------

[](#related)

- [FEC](https://github.com/itsahappymedium/fec) - A PHP Command Line tool that makes it easy to compile, concat, and minify front-end Javascript and CSS/SCSS dependencies.
- [GPM](https://github.com/itsahappymedium/gpm) - A PHP Command Line tool that makes it easy to download dependencies from GitHub.

License
-------

[](#license)

MIT. See the [license.md file](license.md) for more info.

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

828d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/717c2c26c5b50d96ff21e5c0d14591b74c01a0f6d7541e4598a8ef938c18b2af?d=identicon)[itsahappymedium](/maintainers/itsahappymedium)

---

Top Contributors

[![kodie](https://avatars.githubusercontent.com/u/603949?v=4)](https://github.com/kodie "kodie (1 commits)")

---

Tags

clitwigtemplates

### Embed Badge

![Health badge](/badges/itsahappymedium-ttc/health.svg)

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

###  Alternatives

[n98/magerun

Tools for managing Magento projects and installations

1.4k264.7k7](/packages/n98-magerun)[n98/magerun2

Tools for managing Magento projects and installations

928244.3k6](/packages/n98-magerun2)[pantheon-systems/terminus

A command line interface for Pantheon

3391.5M13](/packages/pantheon-systems-terminus)[acmephp/acmephp

Let's Encrypt client written in PHP

649155.1k](/packages/acmephp-acmephp)[j13k/yaml-lint

A compact command line utility for checking YAML file syntax

161.1M19](/packages/j13k-yaml-lint)[symfony/ux-toolkit

A tool to easily create a design system in your Symfony app with customizable, well-crafted Twig components

1432.0k](/packages/symfony-ux-toolkit)

PHPackages © 2026

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