A modern WordPress framework powered by Tempest, featuring attribute-based auto-discovery for hooks, post types, blocks, and more.
Warning
AI-Generated Project β This project was primarily built by AI coding agents (Claude). While functional and tested, it may contain bugs, security issues, or unexpected behavior. Use at your own risk, especially in production environments.
This monorepo contains the following packages:
| Package | Description | Packagist |
|---|---|---|
studiometa/foehn |
Core framework β auto-discovery, DI, blocks, hooks | |
studiometa/foehn-acf |
ACF integration β blocks, field groups, options pages | |
studiometa/foehn-installer |
Composer plugin β generates web root, symlinks, wp-config | |
studiometa/foehn-starter |
Starter theme β the minimum a new project needs | |
studiometa/foehn-demo |
Demo theme β every feature, and the end-to-end tests |
composer create-project studiometa/foehn-starter my-projectcomposer require "nette/php-generator:4.2.3 as 4.2.1" studiometa/foehnThe nette/php-generator alias is necessary until Tempest fixes its requirement. See Installation.
<?php
// functions.php
use Studiometa\Foehn\Kernel;
Kernel::boot(__DIR__ . '/app');- π Zero configuration β Auto-discovery of components via PHP 8 attributes
- π― Modern DX β Type-safe, IDE-friendly, testable
- π WordPress native β Works with Timber, ACF, and Gutenberg blocks
- β‘ Minimal boilerplate β One line to boot your theme
- π¦ Project generator β Full web root generation via Composer plugin
- ποΈ Starter theme β Complete example with models, hooks, templates
- π³ Runtime image β
ghcr.io/studiometa/foehn-wordpress, NGINX and PHP with FΓΈhn's serving rules already installed
| Attribute | Description |
|---|---|
#[AsAction] |
Register a WordPress action hook |
#[AsFilter] |
Register a WordPress filter hook |
#[AsPostType] |
Register a custom post type |
#[AsTaxonomy] |
Register a custom taxonomy |
#[AsPostMeta] |
Register a meta key, with its REST schema |
#[AsTimberModel] |
Register a Timber class map |
#[AsBlock] |
Register a native Gutenberg block |
#[AsBlockCategory] |
Register a block category |
#[AsBlockBinding] |
Register a block bindings source |
#[AsBlockPattern] |
Register a block pattern |
#[AsContextProvider] |
Add data to specific views |
#[AsTemplateController] |
Handle template rendering |
#[AsTwigExtension] |
Register a Twig extension |
#[AsShortcode] |
Register a shortcode |
#[AsRestRoute] |
Register a REST API endpoint |
#[AsRewriteRule] |
Register a rewrite rule and the class that answers |
#[AsSettingsPage] |
Register an admin page with the Settings API |
#[AsCustomizerSection] |
Add a section with native fields to the Customizer |
#[AsMenu] |
Register a navigation menu |
#[AsImageSize] |
Register a custom image size |
#[AsCliCommand] |
Register a WP-CLI command |
#[AsCron] |
Run a class on a schedule |
#[AsJob] |
Handle a queued job |
#[AsSeeder] |
Write the sample content of a site |
#[AsDiscovery] |
Declare when a custom discovery applies |
#[AsAcfBlock] |
Register an ACF block (studiometa/foehn-acf) |
#[AsAcfFieldGroup] |
Register an ACF field group (studiometa/foehn-acf) |
#[AsAcfOptionsPage] |
Register an ACF options page (studiometa/foehn-acf) |
See the API Reference for each attribute.
my-project/ # What is VERSIONED
βββ theme/ # The WordPress theme
β βββ app/ # PHP classes (auto-discovered)
β βββ templates/ # Twig templates
β βββ functions.php # Single Kernel::boot() call
β βββ style.css # Theme header
βββ config/ # Configuration files
βββ mu-plugins/ # Custom mu-plugins (if needed)
βββ public/ # Copied into web/ (robots.txt, .well-known/)
βββ .env # Environment variables
βββ composer.json # Dependencies
web/ # GENERATED (100% gitignored)
βββ wp/ # WordPress core
βββ wp-content/
β βββ themes/my-theme β symlink to /theme
β βββ plugins/ # Composer-managed plugins
β βββ mu-plugins/ # Auto-loaded mu-plugins
βββ index.php # Generated front controller
βββ robots.txt # Copied from public/
βββ wp-config.php # Generated from config/
π Full Documentation
Each package ships an Agent Skill: foehn, foehn-acf and foehn-vite-plugin. Install them pinned to the studiometa/foehn version in your composer.lock with npx skills add studiometa/foehn-framework#<version>. See AI Agents.
# Install dependencies
composer install
npm install
# Run tests
composer test
# Lint & fix
composer lint
composer fix
# Format markdown
npm run fmtContributions are welcome! Please read our contributing guidelines before submitting a PR.
studiometa/foehn and studiometa/foehn-acf are released under the GNU General Public License v3.0 or later. See LICENSE.
studiometa/foehn-starter, studiometa/foehn-installer, @studiometa/foehn-vite-plugin and the demo are released under the MIT License, so the code that composer create-project copies into a project stays MIT.
- Tempest Framework by Brent Roose
- Timber by Upstatement
- Inspired by Acorn by Roots