kauffinger / statamic-context-cli
Let LLMs get context on the statamic docs
Fund package maintenance!
Konstantin Auffinger
Requires
- php: ^8.3
- guzzlehttp/guzzle: ^7.0
- illuminate/contracts: ^11.0||^12.0
- laravel/prompts: ^0.3.0
- spatie/laravel-package-tools: ^1.16
Requires (Dev)
- driftingly/rector-laravel: ^2.0
- larastan/larastan: ^2.9||^3.0
- laravel/pint: ^1.14
- nunomaduro/collision: ^8.1.1||^7.10.0
- orchestra/testbench: ^10.0.0||^9.0.0||^8.22.0
- pestphp/pest: ^3.0
- pestphp/pest-plugin-arch: ^3.0
- pestphp/pest-plugin-laravel: ^3.0
- phpstan/extension-installer: ^1.3||^2.0
- phpstan/phpstan-deprecation-rules: ^1.1||^2.0
- phpstan/phpstan-phpunit: ^1.3||^2.0
README
A Laravel package that provides fast, searchable access to Statamic and Statamic Peak documentation directly from your command line. Designed to work seamlessly with AI assistants like Claude Code for enhanced Statamic development workflows.
Installation
You can install the package via composer:
composer require kauffinger/statamic-context-cli --dev
You can publish the config file with:
php artisan vendor:publish --tag="statamic-context-cli-config"
Usage
Available Commands
View all available commands:
php artisan statamic-context
Statamic Documentation
Search Documentation:
# Interactive search php artisan statamic-context:docs:search --interactive # Direct search php artisan statamic-context:docs:search collections php artisan statamic-context:docs:search blueprints
Get Specific Documentation:
php artisan statamic-context:docs:get core:collections
Update Documentation Database:
php artisan statamic-context:docs:update
Statamic Peak Documentation
Search Peak Documentation:
# Interactive search php artisan statamic-context:peak:search --interactive # Direct search php artisan statamic-context:peak:search page-builder php artisan statamic-context:peak:search seo
Get Specific Peak Documentation:
php artisan statamic-context:peak:get features:page-builder
Update Peak Documentation Database:
php artisan statamic-context:peak:update
Interactive Mode
Use the --interactive
flag for a guided experience with:
- Search through documentation with real-time filtering
- Browse search results with pagination
- View full documentation content
- Seamless navigation between different actions
Integration with Claude Code
This tool is designed to work with Claude Code:
- Search for relevant documentation using the CLI commands
- Copy the documentation content from search results
- Provide context to Claude Code for more informed assistance
Example workflow:
# Search for information about collections php artisan statamic-context:docs:search collections --interactive # Use the documentation content to inform Claude Code about: # - Collection configuration # - Available field types # - Templating patterns # - Best practices
Benefits
- Fast Documentation Access: Search thousands of docs instantly from your terminal
- Offline-Ready: Documentation is cached locally after initial update
- Context for AI: Provide accurate, up-to-date Statamic context to AI assistants
- Dual Coverage: Both core Statamic and Peak documentation included
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.