The official skeleton for creating components for THE SHIT ecosystem - a rapidly expandable developer toolkit.
# From THE SHIT root directory
php 💩 component:scaffold my-component# Clone the skeleton
git clone https://github.com/conduit-ui/conduit-component.git my-component
cd my-component
# Install dependencies
composer install
# Test it works
./component listmy-component/
├── app/
│ └── Commands/ # Your component commands (App namespace)
├── tests/ # Pest tests
├── component # Executable (always named 'component')
├── composer.json # Dependencies and autoloading
└── 💩.json # Component manifest
- Namespace: Always use
App\namespace - Directory: Commands go in
app/Commands/ - Executable: Always named
component - No custom namespaces: Avoid
ConduitComponents\MyThing\
{
"name": "my-component",
"description": "What your component does",
"version": "1.0.0",
"shit_acronym": "My Yarn Component",
"commands": {
"my-component:do-thing": "Description of what this command does"
},
"requires": {
"php": "^8.2",
"laravel-zero/framework": "^12.0"
}
}Important: No executable field! THE SHIT knows to look for component.
All commands should extend the provided base classes:
namespace App\Commands;
class MyCommand extends BaseCommand
{
protected $signature = 'do-thing {argument} {--option}';
protected $description = 'Does an amazing thing';
public function handle()
{
// Your logic here
$this->info('Thing done!');
return self::SUCCESS;
}
}The skeleton includes a comprehensive test suite:
# Run tests
./vendor/bin/pest
# With coverage
./vendor/bin/pest --coverage
# Run specific test
./vendor/bin/pest tests/Feature/SkeletonTest.php# Format code
./vendor/bin/pint
# Check without fixing
./vendor/bin/pint --test
# Static analysis
./vendor/bin/phpstan analyse-
Create your component
php 💩 component:scaffold awesome-tool
-
Add your commands
cd 💩-components/awesome-tool php component make:command DoSomethingCommand -
Update manifest
- Edit
💩.jsonto list your commands - Use descriptive command names
- Edit
-
Test locally
./component list ./component do-something
-
Install in THE SHIT
- Component is auto-discovered if in
💩-components/folder - Run
php 💩 listto see your commands
- Component is auto-discovered if in
Solution: Ensure composer.json has:
"autoload": {
"psr-4": {
"App\\": "app/"
}
}Solution:
- File must be named
component(notmy-component) - Must be executable:
chmod +x component - Don't add
executablefield to💩.json
Solution:
- Check
💩.jsonlists your commands - Ensure component is in
💩-components/directory - Component folder name should match manifest name
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing) - Open a Pull Request
MIT License - see LICENSE file for details
Built with Laravel Zero by THE SHIT community.
Remember: THE SHIT components should do one thing perfectly. Keep it simple, keep it focused.