1 min read

AI Guidelines from Spatie with Gemini CLI

If you’re a Laravel developer using AI to assist your coding sessions, it might be worth trying Spatie’s AI Guidelines. While they’re primarily designed for Claude Code, they also work seamlessly with the Gemini CLI.

Follow these steps:

# Navigate to your project directory
cd /path/to/your-awesome-project
 
# Download the guidelines file
curl -o ~/.claude/laravel-php-guidelines.md https://spatie.be/laravel-php-ai-guidelines.md
 
# Instruct Gemini to include the guidelines
echo -e '\n## Coding Standards\nWhen working with Laravel/PHP projects, first read the coding guidelines at @laravel-php-guidelines.md' >> GEMINI.md

Now when you run gemini, it will show Using: 1 GEMINI.md file and you can continue working as usual.

To make Gemini even smarter and more context-aware, check out how to integrate the MCP into Gemini CLI.