๐ Forty-Five
December 10, 2025 ยท View on GitHub
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.
โจ Features
- ๐ค 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
๐ Quick Start
Installation
Install globally via npm:
npm install -g @moonshine-software/forty-five
Initialize in Your Project
Navigate to your MoonShine project and run:
cd your-moonshine-project
forty-five init
Note: 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
Project Structure After Init
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
๐ Usage
Available Commands
After initialization, you can use these slash commands in Claude:
/forty-five.components - Work with Components
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
/forty-five.layout - Create Layouts
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
/forty-five.palettes - Create Color Palettes
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
/forty-five.field - Create Custom Fields
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
/forty-five.component - Create Custom Components
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
๐ฏ What Gets Generated
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
๐ Guidelines
The guidelines provide comprehensive documentation for:
blade-components.md
- Complete component library
- Critical usage rules
- Required wrappers and attributes
- Slot-based vs array-based patterns
- Best practices and examples
palettes.md
- OKLCH color space format
- Complete palette structure
- Light and dark theme implementation
- Contrast requirements and best practices
fields-development.md
- 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)
components-development.md
- Custom component creation guide
- Components vs Fields comparison
- Fluent methods and viewData()
- Slots and nested components
- Complete examples (Alert, StatsCard, Breadcrumbs)
๐ง CLI Commands
forty-five init
Initialize Forty-Five in your project.
Options:
- Interactive agent selection
- Automatic directory creation
- Downloads latest commands and guidelines
forty-five update (Coming Soon)
Update commands and guidelines to the latest version.
forty-five status (Coming Soon)
Check initialization status and versions.
๐ค Supported AI Agents
- โ Claude Code - Full support
- ๐ง Cursor - Coming soon
- ๐ง GitHub Copilot - Coming soon
๐ Examples
Creating a User Management Interface
/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
Building a Custom Color Palette
/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)
Creating a Custom Field
/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
Creating a Custom Component
/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
๐๏ธ Architecture
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ 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 โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ Update Process
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
๐ Troubleshooting
"composer.json not found"
Make sure you're in your Laravel/MoonShine project root directory.
Commands not appearing in Claude
- Restart Claude Code
- Check that files were created in
.claude/commands/ - Verify slash commands with
/in Claude
Guidelines not being followed
Make sure the AI agent can access .guidelines/ directory. Commands are configured to read from this location.
๐ฆ Package Development
Building from Source
# 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 init
๐ค Contributing
Contributions are welcome! Please read our contributing guidelines before submitting PRs.
๐ License
MIT License - see LICENSE file for details.
๐ Acknowledgments
- Inspired by GitHub Speckit
- Built for the MoonShine Laravel admin panel
- Powered by AI agents like Claude
๐ Links
Made with ๐ by the MoonShine team