PHPackages                             mccomaschris/parkour - 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. mccomaschris/parkour

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

mccomaschris/parkour
====================

A WP-CLI command to quickly scaffold ACF blocks for Timber themes. PARKOUR!

1.1.1(3mo ago)066MITPHPPHP &gt;=8.3

Since Oct 8Pushed 2mo agoCompare

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

READMEChangelogDependencies (5)Versions (6)Used By (0)

🏃 Parkour
=========

[](#-parkour)

**PARKOUR!** A WP-CLI command to quickly scaffold ACF blocks for Timber themes.

Named after the iconic Office scene where Andy, Michael, and Dwight leap around the office yelling "PARKOUR!" - because creating blocks should be just as quick and fun.

Features
--------

[](#features)

- 🚀 Interactive block creation with beautiful Laravel Prompts
- 📦 Generates all necessary files (block.json, callback.php, Twig template)
- 🎨 Optional JavaScript and CSS file generation
- ✅ Follows best practices for Timber + ACF blocks
- 🔧 Customizable templates based on your theme patterns

Requirements
------------

[](#requirements)

- PHP 8.3+
- Timber
- ACF Pro
- WordPress with WP-CLI (optional - for WP-CLI mode)

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

[](#installation)

From your theme directory, run:

```
cd wp-content/themes/your-theme
composer require mccomaschris/parkour --dev
```

Then use the standalone binary:

```
vendor/bin/parkour create hero-section
```

### WP-CLI Setup (Optional)

[](#wp-cli-setup-optional)

If you prefer using WP-CLI instead of the standalone binary, create a `wp-cli.yml` file in your theme or project root:

```
require:
  - vendor/mccomaschris/parkour/src/class-blockcommand.php
```

For Bedrock/project-level installations, add the WordPress path:

```
require:
  - vendor/mccomaschris/parkour/src/class-blockcommand.php

path: web/wp  # Adjust based on your WordPress installation path
```

Usage
-----

[](#usage)

### Standalone Mode (Recommended)

[](#standalone-mode-recommended)

Run from your theme directory:

```
# Interactive mode
vendor/bin/parkour create

# With block name
vendor/bin/parkour create hero-section

# Skip all prompts (use defaults)
vendor/bin/parkour create hero-section --skip-prompts

# Override theme slug detection
vendor/bin/parkour create hero-section --theme=my-theme
```

The standalone binary:

- Detects your theme slug from `style.css` "Text Domain:" header (or uses directory name)
- Creates blocks in the current working directory
- Works without WordPress being loaded

### WP-CLI Mode

[](#wp-cli-mode)

If you set up the `wp-cli.yml` file, you can use WP-CLI commands:

```
# Interactive mode
wp parkour create

# With block name
wp parkour create hero-section

# Skip all prompts
wp parkour create hero-section --skip-prompts

# Specify theme (for project-level installs)
wp parkour create hero-section --theme=your-theme-slug
```

### Interactive Prompts

[](#interactive-prompts)

When running without `--skip-prompts`, you'll be prompted for:

- Block name
- Title
- Description
- Category
- Icon
- Keywords
- Whether to include JS/CSS files

What Gets Created
-----------------

[](#what-gets-created)

When you create a block named `hero-section`, Parkour generates:

```
your-theme/
├── blocks/
│   └── hero-section/
│       ├── block.json
│       ├── callback.php
│       ├── hero-section.js (optional)
│       └── hero-section.css (optional)
└── views/
    └── blocks/
        └── hero-section.twig

```

File Structure
--------------

[](#file-structure)

### block.json

[](#blockjson)

Standard WordPress block metadata following ACF block conventions.

### callback.php

[](#callbackphp)

Render callback with:

- Timber context setup
- Block and field data
- CSS class management
- Background color support
- Anchor support
- Optional JS/CSS enqueuing

### {block-name}.twig

[](#block-nametwig)

Twig template with:

- Block wrapper with classes
- Anchor ID support
- Preview mode detection
- Field usage examples

### {block-name}.js (optional)

[](#block-namejs-optional)

JavaScript with:

- Block initialization
- DOM ready handling
- Scoped to avoid conflicts

### {block-name}.css (optional)

[](#block-namecss-optional)

Styles with:

- Block-specific selectors
- Preview mode styles

Customization
-------------

[](#customization)

### Modify Templates

[](#modify-templates)

Templates are located in `templates/` and use Mustache syntax. You can fork and customize:

- `block.json.mustache`
- `callback.php.mustache`
- `block.twig.mustache`
- `block.js.mustache`
- `block.css.mustache`

### Block Patterns

[](#block-patterns)

The generated blocks follow this pattern:

- Theme prefix for all classes and functions
- Support for background colors via ACF field
- Automatic anchor and className support
- Filemtime-based cache busting for assets
- Preview mode detection in Twig

Examples
--------

[](#examples)

### Creating an Accordion Block

[](#creating-an-accordion-block)

```
wp parkour create
```

```
What is the block name? › accordion
Block title › Accordion
Block description › An accessible accordion block for organizing content
Block category › your-theme
Choose an icon › editor-justify
Keywords › accordion, faq, toggle
Include JavaScript file? › Yes
Include CSS file? › Yes

```

### Creating Multiple Blocks

[](#creating-multiple-blocks)

```
wp parkour create hero
wp parkour create cta-banner
wp parkour create testimonials
```

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance82

Actively maintained with recent releases

Popularity12

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 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

Every ~30 days

Total

5

Last Release

102d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/34515c639712e2e66d9e7e60f2d3eb4cebc1a048b645b82458d553964f125c26?d=identicon)[mccomaschris](/maintainers/mccomaschris)

---

Top Contributors

[![mccomaschris](https://avatars.githubusercontent.com/u/26128?v=4)](https://github.com/mccomaschris "mccomaschris (10 commits)")

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/mccomaschris-parkour/health.svg)

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

###  Alternatives

[drush/drush

Drush is a command line shell and scripting interface for Drupal, a veritable Swiss Army knife designed to make life easier for those of us who spend some of our working hours hacking away at the command prompt.

2.4k57.4M685](/packages/drush-drush)[illuminate/console

The Illuminate Console package.

12944.1M5.1k](/packages/illuminate-console)[soloterm/solo

A Laravel package to run multiple commands at once, to aid in local development.

1.2k303.2k4](/packages/soloterm-solo)[crazywhalecc/static-php-cli

Build single static PHP binary, with PHP project together, with popular extensions included.

1.8k13.9k](/packages/crazywhalecc-static-php-cli)[tightenco/takeout

Manage your dev dependencies with simple one-off Docker containers.

1.6k20.9k](/packages/tightenco-takeout)[statamic/cli

Statamic CLI Tool

7587.7k](/packages/statamic-cli)

PHPackages © 2026

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