SkillAgentSearch skills...

Nodishell

Laravel Interactive Shell with Script Repository and Tinker integration

Install / Use

/learn @nodilabs/Nodishell
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

🚀 NodiShell

Tests PHPStan Code Style Latest Stable Version php


Laravel Interactive Shell with Script Repository, System Checks and Laravel Tinker connectivity

NodiShell is a extensible interactive shell for Laravel applications that provides organized script execution, variable management, system monitoring, and development tools in a beautiful terminal interface.

This project is aimed for projects that need to do maintenance on their apps, they can have all their maintenance or support scripts centralised in NodiShell, acting as a "Script Repository", making support and maintenance tasks easier, by also offering the possibility to interact with their outputs which are automatically loaded into Laravel Tinker whenever you open a session through the shell's interface.

📚 Table of Contents


✨ Features

🎯 Core Features

  • Category-based Script Organization - Organize scripts into logical categories
  • Interactive Menu System - Beautiful, intuitive navigation with arrow keys
  • Variable Management - Store and reuse variables across script executions
  • Search Functionality - Quickly find scripts across all categories
  • Command History - Track and review executed commands
  • Production Safety - Built-in safety checks for production environments

🔧 Development Tools

  • Raw PHP Execution - Execute PHP code directly with Laravel context
  • Laravel Tinker Integration - Enhanced Tinker with NodiShell variables
  • System Status Monitoring - Real-time system health checks
  • Custom System Checks - Extensible health check system
  • Session Persistence - Variables persist throughout your shell session

🎨 User Experience

  • Beautiful Interface - Colorful, organized display with emojis and borders
  • Autocomplete Support - Smart search and filtering
  • Error Handling - Graceful error handling with helpful messages
  • Multi-environment Support - Safe operation across development and production

📦 Installation

1. Install the Package

Add NodiShell to your Laravel project:

composer require nodilabs/nodishell

2. Publish Configuration

Publish the configuration file to customize NodiShell:

php artisan vendor:publish --provider="NodiLabs\NodiShell\NodiShellServiceProvider"

3. Set Up Directory Structure

Create the required directories in your Laravel application (You can update these directories in the configuration file config/nodishell.php):

mkdir -p app/Console/NodiShell/Categories
mkdir -p app/Console/NodiShell/Scripts
mkdir -p app/Console/NodiShell/Checks

4. Configure Your Environment

Edit config/nodishell.php to customize settings:

<?php

return [   
    'features' => [
        'search' => true,
        'raw_php' => true,
        'variable_manager' => true,
        'system_status' => true
    ],
    
    'production_safety' => [
        'safe_mode' => true
    ],
    
    'discovery' => [
        'categories_path' => app_path('Console/NodiShell/Categories'),
        'scripts_path' => app_path('Console/NodiShell/Scripts')
    ],
];

🚀 Usage

Basic Usage

Launch NodiShell in interactive mode:

php artisan nodishell

Command Line Options

# Interactive mode (default)
php artisan nodishell

# Execute a specific script directly
php artisan nodishell --script=script-name

# Start in a specific category
php artisan nodishell --category=database

# Enable production safety mode
php artisan nodishell --safe-mode

Navigation

  • Arrow Keys: Navigate through menus
  • Enter: Select an option
  • Type: Search and filter options
  • Ctrl+C: Exit at any time

⚡ Code Generation

NodiShell provides powerful generator commands to quickly create categories, scripts, and system checks with proper structure and boilerplate code.

Generator Commands

All generator commands follow Laravel's convention and include helpful options:

# Available generator commands
php artisan nodishell:category    # Create a new category
php artisan nodishell:script      # Create a new script
php artisan nodishell:check       # Create a new system check

Common Options:

  • --force - Overwrite existing files
  • --help - Show detailed command help

Creating Categories with Generators

Generate a new category with all the required structure:

# Basic category creation
php artisan nodishell:category UserManagement

# With options
php artisan nodishell:category UserManagement \
    --description="User management and administration" \
    --icon="👥" \
    --color="blue" \
    --sort-order=50

Available Options:

  • --description= - Category description
  • --icon= - Emoji icon for the category
  • --color= - Color theme (blue, green, red, yellow, purple, etc.)
  • --sort-order= - Display order (default: 100)

Generated Structure:

<?php



namespace App\Console\NodiShell\Categories;

use App\Console\NodiShell\Categories\BaseCategory;

final class UserManagementCategory extends BaseCategory
{
    protected int $sortOrder = 50;

    public function getName(): string
    {
        return 'User management and administration';
    }

    public function getIcon(): string
    {
        return '👥';
    }

    public function getColor(): string
    {
        return 'blue';
    }

    protected function loadScripts(): void
    {
        $this->scripts = [
            // Add your scripts here
        ];
    }
}

Creating Scripts with Generators

Generate a new script with proper structure and error handling:

# Basic script creation
php artisan nodishell:script ResetUserPassword

# With options
php artisan nodishell:script ResetUserPassword \
    --category="users" \
    --description="Reset a user's password and send notification" \
    --tags="users,password,security,notification" \
    --production-safe

Available Options:

  • --category= - Script category
  • --description= - Script description
  • --tags= - Comma-separated tags
  • --production-safe - Mark as safe for production

Generated Structure:

<?php



namespace App\Console\NodiShell\Scripts;

use App\Console\NodiShell\Scripts\BaseScript;

final class ResetUserPasswordScript extends BaseScript
{
    protected 

Related Skills

View on GitHub
GitHub Stars11
CategoryDevelopment
Updated5mo ago
Forks1

Languages

PHP

Security Score

87/100

Audited on Oct 29, 2025

No findings