A powerful CLI tool for managing Laravel package development workflows. Streamline your local package development with automated symlink management, development server orchestration, and convenient shortcuts.
- ๐ Symlink Management: Automatically link/unlink local packages to Laravel projects
- ๐ Development Server Management: Start Laravel and npm dev servers with tmux integration
- ๐ฆ Project Organization: Manage multiple Laravel projects and packages
- โก Quick Commands: Shortcuts for common artisan and npm commands
- ๐ Context Switching: Easily switch between different projects
npm install -g lpdevOr with yarn:
yarn global add lpdevgit clone https://github.com/yourusername/lpdev.git
cd lpdev
npm install -g .lpdev add
# Follow the prompts to configure your projectlpdev link
# This creates a symlink from your Laravel app to your local packagelpdev start
# Starts both Laravel and npm dev servers in tmux panes| Command | Description |
|---|---|
lpdev add |
Add a new Laravel project configuration |
lpdev list |
List all configured projects |
lpdev use <project> |
Switch to a different project |
lpdev remove <project> |
Remove a project configuration |
lpdev current |
Show current active project |
| Command | Description |
|---|---|
lpdev link |
Create symlink to local package |
lpdev unlink |
Remove package symlink |
lpdev status |
Show link status |
| Command | Description |
|---|---|
lpdev dev |
Start full development environment (server, queue, logs, vite) |
lpdev dev --exclude=service1,service2 |
Start dev environment excluding specified services |
lpdev start laravel |
Start only Laravel server |
lpdev start npm |
Start only npm dev server |
lpdev stop |
Stop all servers |
| Command | Alias | Description |
|---|---|---|
lpdev artisan <command> |
lpdev a |
Run artisan command in Laravel app |
lpdev app <command> |
- | Run command in app directory |
lpdev pkg <command> |
- | Run command in package directory |
lpdev composer <command> |
lpdev c |
Run composer in app directory |
Configuration files are stored in ~/.lpdev/:
projects.json- Project configurationscurrent_project- Current active project
{
"my-project": {
"app_path": "/path/to/laravel/app",
"package_path": "/path/to/local/package",
"vendor_name": "vendor-name",
"package_name": "package-name",
"app_url": "http://localhost:8000",
"npm_dev_port": 5173
}
}LPDEV supports project-specific environment variables stored in your project configuration:
Manage lpdev project configuration with these commands:
lpdev env-set <key> <value>- Set project environment variablelpdev env-remove <key>- Remove project environment variablelpdev env-list- List all project environment variables
| Variable | Description | Default |
|---|---|---|
QUEUE_NAME |
Specific queue name to listen to (only for queue:listen) | Uses default queue |
EXCLUDE |
Default services to exclude from lpdev dev |
None excluded |
# Exclude specific services by default for this project
lpdev env-set EXCLUDE "logs,vite"
# Set custom queue name
lpdev env-set QUEUE_NAME "high-priority"
# List current project environment variables
lpdev env-list
# Remove environment variable
lpdev env-remove EXCLUDEThe lpdev dev command supports excluding specific services with the --exclude flag:
Available Services:
server- Laravel development server (php artisan serve)queue- Queue worker (Horizon or queue:listen)logs- Log tailing (php artisan pail) - Laravel 11+ onlyreverb- Laravel Reverb WebSocket server (php artisan reverb:start)vite- Vite dev server from package (npm run dev)
Command Line Examples:
lpdev dev --exclude=queue # Skip queue worker
lpdev dev --exclude=queue,logs # Skip queue and logsSetting Default Exclusions: You can set default exclusions via lpdev project configuration:
# Set via lpdev project configuration
lpdev env-set EXCLUDE "queue,logs" # Always exclude queue and logs by defaultWith EXCLUDE set, running lpdev dev will automatically exclude those services. You can still override with the --exclude flag:
lpdev dev # Uses EXCLUDE from project config
lpdev dev --exclude=queue # Overrides config, excludes only queueUse Cases:
- Set
EXCLUDE=queueif you prefer runninglpdev horizon-watchseparately - Set
EXCLUDE=logsif you prefer using external log viewers
The lpdev dev command automatically detects and uses the best queue management tool available:
- Laravel Horizon with Watcher (if available): Runs
lpdev horizon-watch. When using Horizon Watcher, make sure to exclude the horizon service fromlpdev devusing--exclude=queueor settingEXCLUDE=queuein project config. - Laravel Horizon Runs
php artisan horizon - Standard Queue: Falls back to
php artisan queue:listen --tries=1
Horizon Watcher Benefits:
- Automatically restarts Horizon when configuration files change
- Perfect for development when tweaking queue settings
- No manual restarts needed when modifying
config/horizon.php
If using standard queue:listen, you can specify a custom queue name:
# Set via lpdev project configuration
lpdev env-set QUEUE_NAME high-priority # Will run: php artisan queue:listen --queue=high-priority --tries=1Note: QUEUE_NAME is ignored when Horizon is detected, as Horizon manages its own queue configuration.
lpdev supports a powerful plugin system for extending functionality. Plugins can hook into various lpdev operations and add custom commands.
๐ Plugin Documentation - Complete guide to creating and using plugins
- Bash 4.0+
- Node.js 14.0+
- Python3 (for JSON parsing)
- tmux (optional, for server management)
- Laravel application
- Composer installed globally
- โ macOS
- โ Linux
โ ๏ธ Windows (via WSL/Git Bash - limited support)
# Add and configure a new project
lpdev add
# Link package for development
lpdev link
# Start full development environment (server, queue, logs, vite)
lpdev dev
# Run database migrations
lpdev artisan migrate
# Clear application cache
lpdev a cache:clear
# Build package assets
lpdev pkg npm run build
# Run tests in package
lpdev pkg composer test
# Stop servers and unlink when done
lpdev stop
lpdev unlink# List all projects
lpdev list
# Switch to different project
lpdev use my-other-project
# Show current project
lpdev currentAfter installation, source your shell configuration:
source ~/.bashrc # or ~/.zshrc for zshMake sure the global npm directory is in your PATH:
echo 'export PATH="$(npm config get prefix)/bin:$PATH"' >> ~/.bashrc
source ~/.bashrcIf you encounter symlink problems:
- Check package exists:
lpdev status - Unlink and relink:
lpdev unlink && lpdev link - Verify composer autoload:
lpdev composer dump-autoload
Contributions are welcome! Please feel free to submit a Pull Request.
LPDEV is licensed under the MIT License, sponsored and supported by Inovector.