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.
Requirements
Section titled “Requirements”- 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)
Step 1: Require the package
Section titled “Step 1: Require the package”Install marko/devai as a dev dependency:
composer require --dev marko/devaiThis also pulls in marko/mcp and marko/lsp as dependencies, so you do not need to require them separately.
Step 2: Run the installer
Section titled “Step 2: Run the installer”marko devai:installThe installer does the following in order:
- Detects agents — Scans your environment and project directory for known agent configuration files and binaries.
- Writes agent files — For each detected agent, writes the appropriate configuration files (guidelines, MCP registration, skill files).
- Merges package guidelines — Reads every installed package’s
resources/ai/guidelines.mdand merges the content into the agent guidelines files. - 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:
marko indexer:rebuildNon-destructive by default
Section titled “Non-destructive by default”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.
Step 3: Start the servers (optional)
Section titled “Step 3: Start the servers (optional)”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:
# MCP server (stdio transport)marko mcp:serve
# LSP server (stdio transport)marko lsp:serveStep 4: Verify
Section titled “Step 4: Verify”Run through the Verification checklist to confirm every piece is working end-to-end.
Updating
Section titled “Updating”When you add new Marko packages, re-run the installer to pick up any new skills and guidelines they ship:
marko devai:installPer-agent setup
Section titled “Per-agent setup”Each agent has its own page with agent-specific details: