Installation
Get Marko installed and running in under a minute. This guide covers requirements, project creation, and choosing the right package set for your use case.
Requirements
Section titled “Requirements”- PHP 8.5+ with the following extensions:
mbstringopensslpdojson
- Composer 2.x
Create a New Project
Section titled “Create a New Project”composer create-project marko/skeleton my-appcd my-appChoose Your Stack
Section titled “Choose Your Stack”Marko’s marko/framework metapackage bundles the most common packages. You can also install only what you need:
Full Web Application
Section titled “Full Web Application”composer require marko/frameworkIncludes routing, database, caching, sessions, authentication, views, mail, queues, and more.
Minimal API
Section titled “Minimal API”composer require marko/core marko/routing marko/config marko/envJust the essentials for a lightweight JSON API.
Headless / CLI
Section titled “Headless / CLI”composer require marko/core marko/cli marko/config marko/envFor command-line tools and background workers without HTTP overhead.
Directory Structure
Section titled “Directory Structure”After installation, your project looks like this:
my-app/├── app/ # Your application modules (highest priority)│ └── blog/│ └── module.php # Optional module configuration├── modules/ # Third-party modules (medium priority)├── vendor/ # Composer packages (lowest priority)├── public/│ └── index.php # Web entry point├── config/ # Application configuration├── composer.json└── .envInstall the CLI
Section titled “Install the CLI”Install the marko command globally so you can run it from anywhere:
composer global require marko/cliMake sure Composer’s global bin directory is in your PATH. Add this to your shell profile (~/.bashrc, ~/.zshrc, etc.) if it isn’t already:
export PATH="$HOME/.composer/vendor/bin:$PATH"Verify it works:
marko listThis shows all available commands. Each package registers its own commands — for example, installing marko/database adds db:migrate, db:seed, and other database commands. The more packages you install, the more commands become available.
You can also run commands locally with
./vendor/bin/markoorphp markoif you prefer not to install globally.