Template repository for creating custom Magic Scripts collections with example implementations and best practices.
- 🎯 Complete Template: Ready-to-use project structure for Magic Scripts
- ⚡ Example Command: Fully implemented
msworldcommand showing best practices - 🔧 Installer Scripts: Example install, uninstall, and update scripts with migration patterns
- 📋 Registry System: 2-tier registry configuration with versioning support
# Install Magic Scripts system
curl -fsSL https://raw.githubusercontent.com/magic-scripts/ms/main/setup.sh | sh
# Install example command from template
ms reg add template https://raw.githubusercontent.com/magic-scripts/ms-template/main/example.msreg
ms upgrade
ms install msworld# Fork this repository and clone
git clone git@github.com:your-username/my-scripts.git
cd my-scripts# Use default world from configuration
msworld
# Display specific world information
msworld mars
# Show current configuration
msworld --configSee CREATE_YOUR_SCRIPTS.md for complete customization guide.
# 1. Edit registry file
nano example.msreg
# 2. Create your command scripts
cp scripts/msworld.sh scripts/mycommand.sh
# 3. Update version information
nano registry/mycommand.msver
# 4. Test locally
./scripts/mycommand.sh --help| Option | Description | Default |
|---|---|---|
-h, --help |
Show help message | - |
-v, --version |
Show version information | - |
--config |
Show current configuration | - |
msworld uses the Magic Scripts configuration system:
# View configuration
ms config list | grep msworld
# Set configuration
ms config set MAGICSCRIPT_WORLD "hello"| Key | Description | Default | Category |
|---|---|---|---|
MAGICSCRIPT_WORLD |
Default word for world greeting | sup |
environment |
This template demonstrates:
- Script structure and best practices
- Configuration system integration
- Registry and versioning setup
- Installer script patterns
# Study the example implementation
cat scripts/msworld.sh
cat installer/install.sh
cat registry/msworld.msverUse this template to build your own automation tools:
# Example: Database management scripts
# Example: Deployment automation
# Example: Development environment setupms-template integrates seamlessly with:
- Magic Scripts Core: Registry and configuration system
- Other Commands: Can reference shared configuration
- CI/CD Systems: Installable in automated environments
# Local development and testing
ms reg add local file:///path/to/your/example.msreg
ms install mycommand
mycommand testgit clone https://github.com/your-username/my-scripts.git
cd my-scripts
# Edit scripts in scripts/ directory
# Update registry files in registry/ directory
# Test with Magic Scripts systemms-template/
├── README.md # This file
├── CREATE_YOUR_SCRIPTS.md # Detailed customization guide
├── example.msreg # Registry configuration
├── registry/ # Version definitions
├── scripts/ # Executable scripts
├── installer/ # Install/uninstall/update hooks
└── man/ # Documentation
# Test example command
msworld --version
msworld mars
# Test registry system
ms reg list
ms search msworldMIT License - see LICENSE file for details.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- magic-scripts/ms - Magic Scripts core system
- magic-scripts/licgen - License generator
- magic-scripts/projinit - Project initializer
Part of the Magic Scripts ecosystem.