marko/devai
marko/devai is the integrator for Marko’s AI development tooling. A single marko devai:install writes per-agent guidelines, registers the marko/mcp server and marko/lsp language server, distributes Marko skills, and builds the docs search index — for whichever of the six supported agents you use: Claude Code, OpenAI Codex, Cursor, GitHub Copilot, Gemini CLI, and JetBrains Junie.
It is the one point at which “AI tooling is available in this project” becomes true. For the conceptual guide and per-agent walkthroughs, see AI-assisted Development.
Installation
Section titled “Installation”composer require --dev marko/devaiTo enable docs search (search_docs), also install a docs driver — marko/docs-fts is the recommended default:
composer require --dev marko/docs-fts# Detects installed agent CLIs and installs for themmarko devai:install
# Or target specific agents explicitlymarko devai:install --agents=claude-code,cursor
# Re-run after adding packages (reuses the prior agent selection)marko devai:updatedevai:install writes the marker file .marko/devai.json recording the selected agents and shipped skills. Re-running without --force is a no-op once a project is installed; use marko devai:update to refresh, or --force to re-run from scratch.
Commands
Section titled “Commands”| Command | Purpose |
|---|---|
devai:install | Install AI tooling for the selected agents (guidelines, MCP/LSP registration, skills, docs index) |
devai:update | Re-run the install using the previously recorded agent selection |
Options for devai:install
Section titled “Options for devai:install”| Option | Effect |
|---|---|
--agents=<a,b> | Install for an explicit comma-separated agent list instead of auto-detecting |
--force | Overwrite an existing install |
--update-gitignore | Append devai’s generated paths to .gitignore |
--skip-lsp-deps | Skip installing the intelephense LSP dependency (Claude Code) |
How agents are installed
Section titled “How agents are installed”Each supported agent implements a single AgentInterface::install() method. The orchestrator renders the shared install data once (guidelines, skills, MCP registration) and hands it to every selected agent through an InstallationContext — so adding a new agent means implementing one method, with no capability-flag plumbing.
Override model
Section titled “Override model”Every guideline file devai writes --- AGENTS.md, CLAUDE.md, GEMINI.md, .github/copilot-instructions.md, junie/guidelines.md, .cursor/rules/marko.mdc --- contains a single managed region delimited by HTML comments:
<!-- BEGIN marko:devai -->...generated content...<!-- END marko:devai -->On devai:update, devai rewrites only the content between these markers. Everything outside the markers belongs to you and is never modified.
Taking full ownership of a file
Section titled “Taking full ownership of a file”Remove the markers from any file to make devai stop managing that file entirely. On the next devai:update, devai detects the absent <!-- BEGIN marko:devai --> / <!-- END marko:devai --> pair, backs off, and surfaces a loud notice in the install log reminding you to either restore the markers or edit the file manually. This is the escape hatch for teams that want full ownership of a specific agent config.
Depth comes from the MCP server
Section titled “Depth comes from the MCP server”devai ships no static reference docs. Depth in the generated guidelines comes from the search_docs tool provided by the marko/mcp server, which is registered during install. Agents use search_docs at request time to retrieve accurate, up-to-date documentation from your installed packages.
Dependencies
Section titled “Dependencies”marko/devai requires:
marko/mcp— the MCP server it registers with each agent, so agents can introspect the codebase (search_docs,validate_module,find_event_observers, …).marko/lsp— the language server it wires up for real-time, Marko-aware editor diagnostics.marko/docs— the docs-search contract. devai depends on the interface, not a specific driver; installmarko/docs-fts(SQLite FTS5 lexical search) to bind it and enablesearch_docs.marko/claude-plugins— the skills/plugins marketplace devai distributes into each agent (e.g./marko-skills:create-module).
marko/cli and marko/core are pulled in transitively as the command/runtime foundation.
Related Packages
Section titled “Related Packages”marko/mcp— codebase introspection over MCPmarko/lsp— Marko-aware language servermarko/docs— docs search contractmarko/docs-fts— docs search driver