Back to Projects
LaraLink — Local-First Package Manager for Laravel

LaraLink — Local-First Package Manager for Laravel

LaraLink solves the most painful part of Laravel package development: testing your packages in real projects before publishing to Packagist. It creates live, symlinked connections between local package directories and Laravel applications — replacing the `composer path` manual workflow with a clean Artisan CLI.

AI Summary

A local-first package manager CLI for Laravel that replaces the tedious `composer path` repository workflow with a single Artisan command — linking local package directories into projects as live, auto-loaded dependencies during active development.

Overview

Developing multiple interconnected Laravel packages is painful with Composer's default workflow. Every iteration of your package requires either publishing a new version to Packagist, or manually editing composer.json to add a path repository — then running composer update and hoping the cache cooperates. LaraLink fixes this with a purpose-built local-first package manager designed specifically for Laravel's development ecosystem.

The Problem It Solves

The standard Laravel package development cycle for a private or in-progress package looks like this:

  1. Make a change in the package source directory
  2. Edit composer.json in your application to add or update the path repository entry
  3. Run composer update vendor/package-name and wait
  4. Deal with Composer's PSR-4 autoloading cache not reflecting your changes
  5. Repeat dozens of times per development session

In a monorepo with five or more packages, this process becomes a serious productivity drain. LaraLink eliminates all of it.

Key Features

  • One-command package linkingphp artisan laralink:link path/to/package creates a live symlinked dependency in seconds
  • Monorepo support — manage multiple in-house packages across multiple applications from a central registry
  • Auto-discovery — reads the target package's composer.json to auto-configure namespace, autoloading, and service provider registration
  • Clean unlinkphp artisan laralink:unlink package-name removes the link and restores the composer.json to its previous state
  • Status overviewphp artisan laralink:status lists all currently linked packages with their source paths
  • Git-agnostic — works with any local directory regardless of version control status or branch

Installation

composer require amjadiqbal/laralink --dev
php artisan laralink:install

Typical Workflow

# Link a local package under development
php artisan laralink:link ../packages/my-filament-widget

# Work on the package — changes are reflected immediately, no composer update needed

# When done, unlink and add the real Packagist requirement
php artisan laralink:unlink my-filament-widget
composer require vendor/my-filament-widget

Technology Stack

PHP 8.2+, Laravel 11/12, Composer API integration. The package operates entirely as a local developer tool — no server, network service, or external service required. All state is stored in a .laralink registry file in the project root, which should be added to .gitignore.

Architecture Highlights

LaraLink stores link state in a local .laralink JSON registry. Links are created as Composer path repository entries with symlink resolution enabled. The package hooks into Composer's post-autoload-dump event to ensure the autoloader always reflects the current linked package state without manual intervention.

Practical Use Cases

  • Teams developing proprietary Laravel packages shared across multiple client applications
  • Agency workflows where client-specific packages need to be developed and tested privately before release
  • Monorepo setups with co-developed packages that reference each other
  • Open-source package authors who want to test against multiple Laravel versions locally before tagging a release
  • Solo developers building a personal suite of Laravel utilities

Source & License

Source code and CLI documentation on GitHub. MIT Licensed.

Need something like this built?

Let's discuss your project requirements.

Get in Touch