Skip to content

Installation

This page covers the full installation flow for Marko’s AI-assisted development tooling: the marko/devai package and the devai:install command that configures each detected agent automatically.

  • PHP 8.5+
  • Composer 2.x
  • An existing Marko project (see Getting Started)
  • At least one supported AI agent installed (Claude Code, Codex, Cursor, Copilot, Gemini CLI, or Junie)

Install marko/devai as a dev dependency:

Terminal window
composer require --dev marko/devai

This also pulls in marko/mcp and marko/lsp as dependencies, so you do not need to require them separately.

Terminal window
marko devai:install

The installer does the following in order:

  1. Detects agents — Scans your environment and project directory for known agent configuration files and binaries.
  2. Writes agent files — For each detected agent, writes the appropriate configuration files (guidelines, MCP registration, skill files).
  3. Merges package guidelines — Reads every installed package’s resources/ai/guidelines.md and merges the content into the agent guidelines files.
  4. Distributes skills — Writes skill bundles from resources/ai/skills/ to the agent-specific skills directory for agents that support it.

The IndexCache used by marko/mcp and marko/lsp builds automatically on first read if no cache file exists, so an explicit indexer:rebuild step is not required. You can run it manually if you want to pre-warm the cache:

Terminal window
marko indexer:rebuild

devai:install is a no-op when .marko/devai.json already exists. It prints a message suggesting marko devai:update to refresh with the current agent selection, or --force to re-run from scratch.

Most agents that support MCP and LSP will start the servers automatically via the registered commands. If you need to start them manually for debugging:

Terminal window
# MCP server (stdio transport)
marko mcp:serve
# LSP server (stdio transport)
marko lsp:serve

Run through the Verification checklist to confirm every piece is working end-to-end.

When you add new Marko packages, re-run the installer to pick up any new skills and guidelines they ship:

Terminal window
marko devai:install

Each agent has its own page with agent-specific details: