Skip to content

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.

  • PHP 8.5+ with the following extensions:
    • mbstring
    • openssl
    • pdo
    • json
  • Composer 2.x
Terminal window
composer create-project marko/skeleton my-app
cd my-app

Marko’s marko/framework metapackage bundles the most common packages. You can also install only what you need:

Terminal window
composer require marko/framework

Includes routing, database, caching, sessions, authentication, views, mail, queues, and more.

Terminal window
composer require marko/core marko/routing marko/config marko/env

Just the essentials for a lightweight JSON API.

Terminal window
composer require marko/core marko/cli marko/config marko/env

For command-line tools and background workers without HTTP overhead.

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
└── .env

Install the marko command globally so you can run it from anywhere:

Terminal window
composer global require marko/cli

Make sure Composer’s global bin directory is in your PATH. Add this to your shell profile (~/.bashrc, ~/.zshrc, etc.) if it isn’t already:

Terminal window
export PATH="$HOME/.composer/vendor/bin:$PATH"

Verify it works:

Terminal window
marko list

This 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/marko or php marko if you prefer not to install globally.