Nodishell
Laravel Interactive Shell with Script Repository and Tinker integration
Install / Use
/learn @nodilabs/NodishellREADME
🚀 NodiShell
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
- 🚀 NodiShell
✨ 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
node-connect
348.5kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.1kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
348.5kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
348.5kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
