PHPackages                             nodilabs/nodishell - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [CLI &amp; Console](/categories/cli)
4. /
5. nodilabs/nodishell

ActiveLibrary[CLI &amp; Console](/categories/cli)

nodilabs/nodishell
==================

Laravel Interactive Shell with Script Repository and Tinker integration

v0.0.4(10mo ago)114771[2 PRs](https://github.com/nodilabs/nodishell/pulls)MITPHPPHP ^8.2CI passing

Since Jul 5Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/nodilabs/nodishell)[ Packagist](https://packagist.org/packages/nodilabs/nodishell)[ Docs](https://github.com/nodilabs/nodishell)[ GitHub Sponsors](https://github.com/NodiLabs)[ RSS](/packages/nodilabs-nodishell/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (12)Versions (7)Used By (0)

🚀 NodiShell
===========

[](#-nodishell)

[![Tests](https://github.com/nodilabs/nodishell/actions/workflows/run-tests.yml/badge.svg)](https://github.com/nodilabs/nodishell/actions/workflows/run-tests.yml)[![PHPStan](https://github.com/nodilabs/nodishell/actions/workflows/phpstan.yml/badge.svg)](https://github.com/nodilabs/nodishell/actions/workflows/phpstan.yml)[![Code Style](https://github.com/nodilabs/nodishell/actions/workflows/fix-php-code-style-issues.yml/badge.svg)](https://github.com/nodilabs/nodishell/actions/workflows/fix-php-code-style-issues.yml)[![Latest Stable Version](https://camo.githubusercontent.com/751665212417224d178f2186d79a7e56b8791f6782aa7493b9cdba5135746530/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e6f64696c6162732f6e6f64697368656c6c3f6c6162656c3d76657273696f6e)](https://packagist.org/packages/nodilabs/nodishell)[![php](https://camo.githubusercontent.com/e054cd055e14cd875a5aacd08062166df31e25ac07554583fe1ad5d7aa2a2852/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6e6f64696c6162732f6e6f64697368656c6c)](https://packagist.org/packages/nodilabs/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
-------------------

[](#-table-of-contents)

- [🚀 NodiShell](#-nodishell)
    - [📚 Table of Contents](#-table-of-contents)
    - [✨ Features](#-features)
        - [🎯 Core Features](#-core-features)
        - [🔧 Development Tools](#-development-tools)
        - [🎨 User Experience](#-user-experience)
    - [📦 Installation](#-installation)
        - [1. Install the Package](#1-install-the-package)
        - [2. Publish Configuration](#2-publish-configuration)
        - [3. Set Up Directory Structure](#3-set-up-directory-structure)
        - [4. Configure Your Environment](#4-configure-your-environment)
    - [🚀 Usage](#-usage)
        - [Basic Usage](#basic-usage)
        - [Command Line Options](#command-line-options)
        - [Navigation](#navigation)
    - [⚡ Code Generation](#-code-generation)
        - [Generator Commands](#generator-commands)
        - [Creating Categories with Generators](#creating-categories-with-generators)
        - [Creating Scripts with Generators](#creating-scripts-with-generators)
        - [Creating System Checks with Generators](#creating-system-checks-with-generators)
    - [🛠️ Development Guide](#%EF%B8%8F-development-guide)
        - [Creating a Script](#creating-a-script)
            - [1. Create Script Class](#1-create-script-class)
            - [2. Script Interface Methods](#2-script-interface-methods)
        - [Creating a Category](#creating-a-category)
            - [1. Create Category Class](#1-create-category-class)
            - [2. Category Interface Methods](#2-category-interface-methods)
        - [Creating System Checks](#creating-system-checks)
            - [1. Create System Check Class](#1-create-system-check-class)
            - [2. Register System Checks](#2-register-system-checks)
            - [3. System Check Interface Methods](#3-system-check-interface-methods)
    - [🎛️ Configuration](#%EF%B8%8F-configuration)
        - [Configuration File Structure](#configuration-file-structure)
        - [Environment Variables](#environment-variables)
    - [🔧 Advanced Usage](#-advanced-usage)
        - [Variable Management](#variable-management)
        - [Production Safety](#production-safety)
        - [Integration with Laravel Tinker](#integration-with-laravel-tinker)
    - [📋 Built-in Categories](#-built-in-categories)
        - [Database Category](#database-category)
        - [Model Category](#model-category)
        - [Testing Category](#testing-category)
        - [Maintenance Category](#maintenance-category)
    - [🤝 Contributing](#-contributing)
        - [Adding Features](#adding-features)
        - [Coding Standards](#coding-standards)
    - [📝 Examples](#-examples)
        - [Example: User Management Script](#example-user-management-script)
    - [🐛 Troubleshooting](#-troubleshooting)
        - [Common Issues](#common-issues)
    - [📸 Screenshots](#-screenshots)
        - [Main menu](#main-menu)
        - [Search scripts and operations](#search-scripts-and-operations)
        - [Script execution](#script-execution)
        - [Laravel Tinker](#laravel-tinker)
        - [Tinker variable access](#tinker-variable-access)
    - [📄 License](#-license)
    - [🙋‍♂️ Support](#%EF%B8%8F-support)

---

✨ Features
----------

[](#-features)

### 🎯 Core 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

[](#-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

[](#-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
--------------

[](#-installation)

### 1. Install the Package

[](#1-install-the-package)

Add NodiShell to your Laravel project:

```
composer require nodilabs/nodishell
```

### 2. Publish Configuration

[](#2-publish-configuration)

Publish the configuration file to customize NodiShell:

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

### 3. Set Up Directory Structure

[](#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

[](#4-configure-your-environment)

Edit `config/nodishell.php` to customize settings:

```
