The go-to PHP IDE with extensive out-of-the-box support for Laravel and its ecosystem.

Skeletor

Skeletor stats

Downloads
510
Stars
30
Open Issues
6
Forks
1

View on GitHub →

Summon Skeletor's minion: a Composer companion to unleash extra functionality with every `create-project` command.

Skeletor

Summon Skeletor's minion: a Composer companion to unleash extra functionality with every create-project command.

Installation

composer install --dev aniftyco/skeletor

Usage

Make sure the following is set in the scripts section of composer.json:

"post-create-project-cmd": [
"NiftyCo\\Skeletor\\Runner::execute"
],

Then just create a Skeletorfile.php in the root with this:

<?php
 
use NiftyCo\Skeletor\Skeletor;
 
return function (Skeletor $skeletor) {
// ...
};

Available Methods

Gathering User Input

Text Input

$skeletor->text('Enter your name:', 'John Doe');

Textarea Input

$skeletor->textarea('Enter a description:');

Password Input

$skeletor->password('Enter your password:');

Confirm

$skeletor->confirm('Do you agree?', true);

Select

$skeletor->select('Choose an option:', ['Option 1', 'Option 2', 'Option 3']);

Multiselect

$skeletor->multiselect('Choose multiple options:', ['Option 1', 'Option 2', 'Option 3']);

Suggest

$skeletor->suggest('Start typing:', ['Suggestion 1', 'Suggestion 2', 'Suggestion 3']);

Search

$skeletor->search('Search for an option:', function ($query) {
return ['Result 1', 'Result 2', 'Result 3'];
});

Multisearch

$skeletor->multisearch('Search for multiple options:', function ($query) {
return ['Result 1', 'Result 2', 'Result 3'];
});

Displaying Information

Spinner

$skeletor->spin('Processing...', function () {
// long running task
return true;
});

Progress Bar

$skeletor->progress('Processing items...', 100, function ($progress) {
for ($i = 0; $i < 100; $i++) {
$progress->advance();
}
});

Messages

$skeletor->info('This is an info message.');
 
$skeletor->alert('This is an alert message.');
 
$skeletor->warning('This is a warning message.');
 
$skeletor->error('This is an error message.');
 
$skeletor->intro('Welcome to the setup wizard.');
 
$skeletor->outro('Setup complete.');

File Operations

Reading a File

$skeletor->readFile('path/to/file.txt');

Writing to a File

$skeletor->writeFile('path/to/file.txt', 'New content');

Removing a File

$skeletor->removeFile('path/to/file.txt');

Removing a Directory

$skeletor->removeDirectory('path/to/directory');

Checking if a File Exists

$skeletor->exists('path/to/file.txt');

Updating composer.json

$skeletor->updateComposerJson(['require' => ['new/package' => '^1.0']]);

Executing a Command

$skeletor->exec(['ls', '-la']);

Table

$skeletor->table(['Header 1', 'Header 2'], [['Row 1 Col 1', 'Row 1 Col 2'], ['Row 2 Col 1', 'Row 2 Col 2']]);

Pause

$skeletor->pause(5);

Replace In File

$skeletor->replaceInFile( 'search string', 'replace string', 'path/to/file.txt')

Preg Replace In File

$skeletor->pregReplaceInFile('/pattern/', 'replace string', 'path/to/file.txt');
aniftyco photo

We design and develop simple solutions to complex problems.

Cube

Laravel Newsletter

Join 40k+ other developers and never miss out on new tips, tutorials, and more.


Aniftyco Skeletor Related Articles

Harpoon: Next generation time tracking and invoicing logo

Harpoon: Next generation time tracking and invoicing

The next generation time-tracking and billing software that helps your agency plan and forecast a profitable future.

Harpoon: Next generation time tracking and invoicing
Acquaint Softtech logo

Acquaint Softtech

Acquaint Softtech offers AI-ready Laravel developers who onboard in 48 hours at $3000/Month with no lengthy sales process and a 100 percent money-back guarantee.

Acquaint Softtech
Curotec logo

Curotec

World class Laravel experts with GenAI dev skills. LATAM-based, embedded engineers that ship fast, communicate clearly, and elevate your product. No bloat, no BS.

Curotec
SaaSykit: Laravel SaaS Starter Kit logo

SaaSykit: Laravel SaaS Starter Kit

SaaSykit is a Multi-tenant Laravel SaaS Starter Kit that comes with all features required to run a modern SaaS. Payments, Beautiful Checkout, Admin Panel, User dashboard, Auth, Ready Components, Stats, Blog, Docs and more.

SaaSykit: Laravel SaaS Starter Kit
Shift logo

Shift

Running an old Laravel version? Instant, automated Laravel upgrades and code modernization to keep your applications fresh.

Shift
The Certification of Competence for Laravel logo

The Certification of Competence for Laravel

A community-driven, proctored assessment across 4 levels designed to validate real-world Laravel knowledge, from Junior to mastery-level Artisan. Official Vue.js, Official Nuxt, Angular, React, JS certifications also available.

The Certification of Competence for Laravel