Download the PHP package codechap/yii2-ai-boost without Composer

On this page you can find all versions of the php package codechap/yii2-ai-boost. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package yii2-ai-boost

Yii2 AI Boost - MCP Server for Yii2 Applications

Version License Yii2

Yii2 AI Boost is a Model Context Protocol (MCP) server that provides AI assistants (like Claude Code) with comprehensive tools and guidelines for faster Yii2 application development.


Features


Quick Start

For experienced developers:

That's it! Claude Code and other AI tools now have access to your application context.


Installation

Step 1: Require the Package

Step 2: Run Installation Wizard

The installation runs automatically and:

If installation fails, please open an issue or reach out on X.

Step 3: Connect Claude Code and or your IDE

Claude Code integration

After running php yii boost/install, a .mcp.json file will be generated in your project root. Claude Code will automatically detect and use this configuration to connect to the MCP server.

Codex CLI Configuration @todo

Gemini CLI Configuration @todo

Zed Configuration

For Zed create or open your settings file in .zed/settings.json

Generated Files

After installation, you'll have:


Usage

View Yii2 information

Displays:

Sync Editor Rules

Automatically generates:

These files contain the core Yii2 guidelines and structural references, giving your AI editor "X-Ray vision" into Yii2 best practices without manual prompting.

Start MCP Server (Manual Testing)

⚠️ Note: This command is invoked automatically by Cluade Code or your editor. You don't need to run it manually.

The server listens on STDIN for JSON-RPC requests and outputs responses to STDOUT.

Update Guidelines

Updates guidelines, downloads Yii2 guide from GitHub, and rebuilds the FTS5 search index.


Guidelines & Editor Integration

Yii2 AI Boost comes with a rich library of "Context Anchors" in .ai/guidelines/. These are Markdown files that define exact structures for Yii2 components (Controllers, Models, Migrations, etc.), preventing AI hallucinations.

1. Active Search (MCP Tool)

The MCP server includes a semantic_search tool powered by SQLite FTS5. AI agents (like Claude or Gemini) can use this to "look up" how to do things in Yii2.

2. Passive Context (Editor Rules)

Run php yii boost/sync-rules to bake these guidelines directly into your editor's context.

This means when you open a file in Zed or Cursor, the AI already knows it should use yii\web\Controller and not Illuminate\Routing\Controller.


What is MCP?

The Model Context Protocol (MCP) is an open standard that enables AI assistants to interact with tools and data sources. MCP allows Claude Code and other AI tools to securely access your application's context—database schemas, configuration, routes, and logs—without exposing sensitive data.

Yii2 AI Boost implements MCP v2025-11-25 using JSON-RPC 2.0 over STDIO transport. This means Claude Code communicates with your application through standard input/output, with no need for network configuration.

Learn more about MCP


Available Tools

1. application_info - Application Info

Get comprehensive information about your Yii2 application:

2. database_schema - Database Schema

Inspect your database structure:

3. database_query - Database Query

Execute SQL queries against your database:

4. config_access - Config Access

Access application configuration safely:

5. route_inspector - Route Inspector

Analyze your application routes:

6. component_inspector - Component Inspector

Introspect application components:

7. log_inspector - Log Inspector

Inspect application logs from all configured sources:

8. semantic_search - Semantic Search (FTS5)

Search Yii2 guidelines and documentation with full-text search:

9. model_inspector - Model Inspector

Inspect Active Record models at runtime:

10. validation_rules - Validation Rules

Inspect model validation rules and constraints:

11. console_command_inspector - Console Command Inspector

Discover and inspect Yii2 console commands (./yii commands):

12. migration_inspector - Migration Inspector

Inspect database migrations and their status:

13. widget_inspector - Widget Inspector

Discover and inspect Yii2 widgets:

14. performance_profiler - Performance Profiler

Analyze query performance and index coverage:

15. tinker - Tinker

Execute arbitrary PHP code in the Yii2 application context:

16. env_inspector - Environment Inspector

Inspect environment variables, PHP extensions, and system configuration:

Core Tools Architecture

All 16 tools provide deep introspection into your Yii2 application. They follow a consistent architecture based on the BaseTool abstract class, which provides:

How the Log Inspector Works

The Log Inspector features a multi-reader architecture supporting three log storage methods:

Reader Source Best For Features
InMemoryLogReader Current request logs (Yii::getLogger()->messages) Real-time debugging during development Full stack traces, microsecond timestamps
FileLogReader FileTarget text logs (@runtime/logs/app.log) Reviewing logs from previous requests/sessions Efficient file handling (5MB+ files), auto-detects rotation
DbLogReader DbTarget database table ({{%log}}) Production logging & log aggregation Fast indexed queries, precise time-range filtering

Tools Roadmap

Phase Tool Status Description
1 application_info ✓ Complete Yii2 version, environment, modules, extensions
1 database_schema ✓ Complete Tables, columns, indexes, models, foreign keys
1 config_access ✓ Complete Component, module, and parameter configurations
1 route_inspector ✓ Complete URL rules, routes, REST endpoints
1 component_inspector ✓ Complete Component listing, classes, configurations
1 log_inspector ✓ Complete File, database, and in-memory logs with filtering
1 semantic_search ✓ Complete FTS5-powered search over guidelines + Yii2 guide
1 database_query ✓ Complete Execute database queries (limited rows)
2 model_inspector ✓ Complete Active Record model analysis, properties, relations
2 validation_rules ✓ Complete Model validation rules, error messages, constraints
2 console_command_inspector ✓ Complete Console command discovery, actions, options, arguments
3 migration_inspector ✓ Complete Migration status, history, pending, source viewing
3 widget_inspector ✓ Complete Available widgets, properties, methods, events, hierarchy
3 performance_profiler ✓ Complete EXPLAIN plans, index analysis, missing index detection
4 tinker ✓ Complete Execute arbitrary PHP code in Yii2 application context
4 env_inspector ✓ Complete Environment variables, PHP extensions, system configuration
5 semantic_search ✓ Complete SQLite FTS5 search over Yii2 guide + guidelines sourced from GitHub

MCP Protocol

Yii2 AI Boost implements the Model Context Protocol (MCP) v2025-11-25:

Example JSON-RPC Request

Example Response

Response Structure:

Error Responses use error instead of result:


Guidelines

The package downloads comprehensive Yii2 development guidelines to .ai/guidelines/core/yii2-2.0.45.md. These cover application structure, controllers, models, views, components, security, performance, and console commands.

Including Guidelines in Your AI Workflow

To use these guidelines with Claude Code or other AI tools, add the following lines to your project's CLAUDE.md file:

Your AI assistant can also search additional guidelines on-demand via the semantic_search MCP tool (database, cache, auth, validation, etc.).

This ensures AI assistants have access to framework best practices and patterns when working in your project.


Troubleshooting

Getting Help

If you encounter issues:

  1. Check the log files listed below for error details
  2. Open an issue: https://github.com/codechap/yii2-ai-boost/issues
  3. Reach out on X: https://x.com/codechap

Log Files

When debugging, check these log files:

FAQ

This section will be expanded as common questions arise. For now, please reach out with issues or questions.


Requirements

Component Version Status
PHP 7.4, 8.0, 8.1, 8.2, 8.3 ✓ Tested
Yii2 2.0.45+ ✓ Compatible

Why PHP 7.4? While PHP 7.4 is EOL, Yii2 itself still supports it. As a Yii2 extension, we maintain the same baseline to ensure developers on older Yii2 installations aren't locked out. If your Yii2 app runs, this tool should too.

Why no caching? All introspection data is fetched fresh on every request. This is intentional - as a development tool, you need to see the current state of your application, not stale cached data. When you change a route, schema, or component, the tools should reflect that immediately.

Note: PHP 8.4 support pending. Report any compatibility issues on GitHub.

Development Timeline

Phase Goal Status Tools
1 Core MVP ✓ Complete 8 tools + guidelines + installer
2 Model & Command Introspection ✓ Complete +3 tools (model inspector, validation rules, console commands)
3 Extended Tools ✓ Complete +3 tools (migration inspector, widget inspector, performance profiler)
4 Advanced Tools ✓ Complete +2 tools (tinker, env inspector)
5 Semantic Search ✓ Complete SQLite FTS5 index, GitHub content pipeline, BM25-ranked search

Track progress and contribute at GitHub.

License

BSD 3-Clause License. See LICENSE file for details.

Contributing

Contributions are welcome! Here's how to get started:

  1. Fork the repository
  2. Clone your fork and create a branch (git checkout -b feature/my-feature)
  3. Install dependencies (composer install)
  4. Make your changes
  5. Test your changes (composer test)
  6. Check code style (composer cs-check) and fix if needed (composer cs-fix)
  7. Run static analysis (composer analyze)
  8. Commit with a clear message and push to your fork
  9. Open a Pull Request against master

Guidelines

Areas Where Help is Appreciated

Support & Feedback


Yii2 AI Boost - Making Yii2 development smarter and faster with AI assistants.


All versions of yii2-ai-boost with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
yiisoft/yii2 Version ~2.0.45
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package codechap/yii2-ai-boost contains the following files

Loading the files please wait ...