Anchor provides two primary ways to set up your application: Managed Mode (using Composer) and Standalone Mode (portable/no-dependency).
Both methods start with the Anchor Skeleton, which serves as a clean starting point for your project.
Ensure your system meets the following requirements:
- PHP: >= 8.2
- Database: SQLite (default), MySQL 8.0+, or PostgreSQL 15+.
- Extensions: PDO, pdo_sqlite (required for default setup), pdo_mysql, pdo_pgsql, Mbstring, OpenSSL, Ctype, JSON, cURL, BCMath, ZipArchive, SimpleXML, Fileinfo, Tokenizer, Intl.
Anchor follows a SQLite first approach for rapid development and zero-config deployment. Ensure
pdo_sqliteis enabled for the best initial experience.
- Composer: Required for Managed Mode.
This is the standard installation method for modern development. It uses Composer to manage the framework as a dependency.
Run the following command to create a new project from the official skeleton:
composer create-project beniyke/anchor-skeleton my-appNavigate to your project directory and run the dock CLI tool:
cd my-app
php dockChoosing the "Managed" option will install the beniyke/framework package and set up your vendor directory.
Perfect for environments with restricted internet or for rapid prototyping without Composer.
You can either download the zip or clone the repository using Git:
Download the latest Anchor Skeleton Zip and extract it to your project folder.
git clone https://github.com/beniyke/anchor-skeleton.git my-app
cd my-appRun the dock tool to provision the framework core:
php dockSelect the Standalone option. The tool will download and extract the framework core directly into your project's System/ directory.
Once the framework is hydrated (either via Composer or Standalone), follow these steps to finalize your environment:
Copy the example environment file:
cp .env.example .envOpen .env and configure your database settings.
Initialize your database schema:
php dock migration:runInstall core system packages and functional modules to enable full framework capability:
# Core System
php dock package:install Queue --system
php dock package:install Notify --system
php dock package:install Debugger --system
# Essential Functional Modules
php dock package:install Permit --packages
php dock package:install Activity --packages
php dock package:install Notification --packagesLaunch your development server:
php dock devYour application is now ready at http://localhost:1010 (or your configured APP_URL).
Anchor makes it easy to keep your framework core updated, regardless of your installation mode.
Run the following command to intelligently update the framework:
php dock anchor:update- In Managed Mode: This executes
composer update beniyke/framework. - In Standalone Mode: This downloads and applies the latest core artifacts directly from GitHub.
-f, --force: Skip confirmation and overwrite files (Standalone only).-t, --tag[=TAG]: Pull a specific version tag instead of the latest (Standalone only).
- Learn about the Directory Structure
- Explore the Architecture
- Configure your Routing