Skip to content
A client package for Bear CMS
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Bear CMS Universal

A client package for Bear CMS. It's a perfect choice for developers who want to provide content editing functionality while taking full ownership of the output code. Also suitable for building websites from HTML templates.


Install via Composer

composer require bearcms/universal

The library's autoloader will be automatically run when including vendor/autoload.php.

You can quick start a new project by running

composer create-project bearcms/universal-app [my-app-name]

Download a ZIP file

Download the latest release ZIP file from from the releases page. Then unzip and include the library's autoloader.

include 'path-to-bearcms-universal-client/autoload.php';

Download a PHAR file

Download the latest release PHAR file from from the releases page. Then include itclude it in your project.

include 'path-to-bearcms-universal-client.phar';


The first step is to create and configure the BearCMS\Universal instance.

$bearCMS = new BearCMS\Universal([
    'dataDir' => __DIR__ . '/../bearcms/data', // The directory where the website data will be stored
    'logsDir' => __DIR__ . '/../bearcms/logs', // The directory for logs
    'appSecretKey' => 'TODO' // Get your app secret key from

Then use captureStart() and captureSend() to automatically capture the output HTML and send it to the Bear CMS client.

// Place the HTML code of your page here (or include it from other file)

Alternatively you can use ...

$response = $bearCMS->makeResponse('SOME HTML CODE');

Any <bearcms...> HTML tags will be automatically updated for preview or editing (if there is a logged in administrator).

A full list of the supported HTML tags is available at


This project is licensed under the MIT License. See the license file for more information.


This package is created and maintained by the Bear CMS team. Feel free to contact us at or

You can’t perform that action at this time.