kauffinger/statamic-context-cli

Let LLMs get context on the statamic docs

v0.0.7 2025-07-18 07:47 UTC

This package is auto-updated.

Last update: 2025-07-18 07:50:57 UTC


README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

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:

  1. Search for relevant documentation using the CLI commands
  2. Copy the documentation content from search results
  3. 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.