AI-powered development toolkit for MoonShine - Inspired by GitHub Speckit
Forty-Five is a CLI tool that brings AI-powered development assistance to your MoonShine projects. Install guidelines and slash commands that help AI agents (like Claude) understand MoonShine components and generate production-ready code.
- π€ AI Agent Integration - Works with Claude Code (more agents coming soon)
- π Comprehensive Guidelines - Complete MoonShine component documentation
- β‘ Slash Commands - Easy-to-use commands for common tasks
- π― Production Ready - Generates code following best practices
- π Auto-sync - Keep guidelines and commands up-to-date
Install globally via npm:
npm install -g @moonshine-software/forty-fiveNavigate to your MoonShine project and run:
cd your-moonshine-project
forty-five initNote: The folder must be owned by the current user.
Follow the prompts to:
- Select your AI agent (Claude, Cursor, etc.)
- Download commands and guidelines
- Set up configuration
your-moonshine-project/
βββ .claude/ # Claude-specific files
β βββ commands/
β βββ forty-five.components.md
β βββ forty-five.layout.md
β βββ forty-five.palettes.md
β βββ forty-five.field.md
β βββ forty-five.component.md
βββ .guidelines/ # Shared guidelines
βββ blade-components.md
βββ palettes.md
βββ fields-development.md
βββ components-development.md
After initialization, you can use these slash commands in Claude:
Create any MoonShine component with proper structure:
/forty-five.components create a user table with name, email, status badges, and action buttons
/forty-five.components create a modal form for adding new products
Generate complete layouts with navigation:
/forty-five.layout create a sidebar layout with logo, menu, and theme switcher
/forty-five.layout create a top navigation bar with horizontal menu
Create and modify custom color palettes using OKLCH color space:
/forty-five.palettes create a blue ocean theme with hue 240
/forty-five.palettes create a purple palette for dark and light themes
Create custom MoonShine fields with proper structure and methods:
/forty-five.field create a rating field with stars from 1 to 5
/forty-five.field create a color picker field with preview
Create custom MoonShine components for UI decoration:
/forty-five.component create an alert component with different types
/forty-five.component create a stats card with icon and value
Forty-Five ensures AI agents generate code that follows MoonShine best practices:
β Correct HTML Structure - No duplicate HTML tags, proper component nesting β Required Wrappers - All CSS classes and wrappers in place β Assets Included - Vite assets properly configured β Responsive Design - Mobile-friendly with proper burger menus β Production Ready - Following all MoonShine conventions
The guidelines provide comprehensive documentation for:
- Complete component library
- Critical usage rules
- Required wrappers and attributes
- Slot-based vs array-based patterns
- Best practices and examples
- OKLCH color space format
- Complete palette structure
- Light and dark theme implementation
- Contrast requirements and best practices
- Custom field creation guide
- Field class anatomy and methods
- View templates with Alpine.js
- Fluent methods and field modes
- Relationship fields handling
- Complete examples (Rating, JSON, File Upload)
- Custom component creation guide
- Components vs Fields comparison
- Fluent methods and viewData()
- Slots and nested components
- Complete examples (Alert, StatsCard, Breadcrumbs)
Initialize Forty-Five in your project.
Options:
- Interactive agent selection
- Automatic directory creation
- Downloads latest commands and guidelines
Update commands and guidelines to the latest version.
Check initialization status and versions.
- β Claude Code - Full support
- π§ Cursor - Coming soon
- π§ GitHub Copilot - Coming soon
/forty-five.components create a users table with:
- Avatars and name columns
- Status badges (active/inactive)
- Role badges with different colors
- Action buttons (view, edit, delete)
The AI will generate a complete, working table with:
- Proper slot-based structure
- MoonShine badge components
- Icon buttons with proper wrappers
- All required CSS classes
/forty-five.palettes create a professional teal palette with:
- Hue angle 180 (teal/cyan)
- Both light and dark themes
- Proper contrast ratios
- All semantic colors (success, warning, error, info)
/forty-five.field create a JSON editor field that:
- Displays formatted JSON in a textarea
- Has syntax highlighting
- Validates JSON on input
- Saves as JSON string to database
The AI will generate:
- PHP class in
app/MoonShine/Fields/JsonEditor.php - Blade view in
resources/views/admin/fields/json-editor.blade.php - Proper
viewData()method - Correct
resolveValue()andresolveOnApply()methods - Alpine.js integration for interactivity
/forty-five.component create a stats card component that:
- Shows an icon, value, and label
- Supports different colors
- Value can be dynamic (closure)
- Used for dashboard widgets
The AI will generate:
- PHP class in
app/MoonShine/Components/StatsCard.php - Blade view in
resources/views/admin/components/stats-card.blade.php - Fluent methods for configuration
- Support for closures in values
- Proper attribute handling
βββββββββββββββββββββββββββββββββββββββββββ
β User's MoonShine Project β
βββββββββββββββββββββββββββββββββββββββββββ€
β .claude/commands/ β
β βββ forty-five.components.md β
β β β Reads .guidelines/ β
β βββ forty-five.layout.md β
β β β Reads .guidelines/ β
β βββ forty-five.palettes.md β
β β β Reads .guidelines/ β
β βββ forty-five.field.md β
β β β Reads .guidelines/ β
β βββ forty-five.component.md β
β β Reads .guidelines/ β
β β
β .guidelines/ β
β βββ blade-components.md β
β βββ palettes.md β
β βββ fields-development.md β
β βββ components-development.md β
βββββββββββββββββββββββββββββββββββββββββββ
Guidelines and commands are downloaded from the official repository:
https://github.com/moonshine-software/forty-five
When you run forty-five init, it fetches:
- Latest command files for your selected agent
- Latest guideline files
- Ensures you have the most up-to-date documentation
Make sure you're in your Laravel/MoonShine project root directory.
- Restart Claude Code
- Check that files were created in
.claude/commands/ - Verify slash commands with
/in Claude
Make sure the AI agent can access .guidelines/ directory. Commands are configured to read from this location.
# Clone repository
git clone https://github.com/moonshine-software/forty-five.git
cd forty-five
# Install dependencies
npm install
# Build
npm run build
# Test locally
npm link
cd /path/to/your-project
forty-five initContributions are welcome! Please read our contributing guidelines before submitting PRs.
MIT License - see LICENSE file for details.
- Inspired by GitHub Speckit
- Built for the MoonShine Laravel admin panel
- Powered by AI agents like Claude
Made with π by the MoonShine team