PHPackages                             alle80/artcompletion - 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. alle80/artcompletion

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

alle80/artcompletion
====================

Zsh completion for Laravel Artisan commands driven by a cacheable JSON manifest. Works with `artisan`, `php artisan`, and `art` aliases.

v0.1.0(today)01↑2900%MITPHPPHP ^8.1

Since Jul 2Pushed todayCompare

[ Source](https://github.com/alle80/artcompletion)[ Packagist](https://packagist.org/packages/alle80/artcompletion)[ Docs](https://github.com/alle80/artcompletion)[ RSS](/packages/alle80-artcompletion/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (3)Versions (2)Used By (0)

artcompletion
=============

[](#artcompletion)

Zsh completion for Laravel Artisan commands, driven by a cacheable JSON manifest.

An alternative to Symfony Console's `php artisan completion zsh`: instead of shelling out to PHP on every ``, a small zsh script reads a pre-built JSON manifest with `jq` — instant results, identical behaviour whether you type `artisan`, `php artisan`, or an `art` alias, and a single installed copy serves every Laravel project on your machine.

Requirements
------------

[](#requirements)

- PHP 8.1+, Laravel 10, 11, 12 or 13
- zsh
- [jq](https://jqlang.github.io/jq/)

Installation
------------

[](#installation)

```
composer require alle80/artcompletion
```

Generate the manifest and install the completion script:

```
php artisan completion:build
php artisan completion:install
```

`completion:install` copies the completion script to `~/.zsh/completions/_art-` and offers to append the required lines to your `~/.zshrc` (it always asks before touching it):

```
fpath=($HOME/.zsh/completions $fpath)
autoload -Uz compinit && compinit
compdef _art- php artisan art
```

Then restart your shell (`exec zsh`). If the completion does not show up, clear the compinit cache first: `rm -f ~/.zcompdump*`.

Usage
-----

[](#usage)

```
php artisan mig          # command names, with descriptions
php artisan migrate --   # options of the chosen command + global options
artisan make:mo          # works with aliases that expand to `php artisan`
art db:                  # and with an `art` alias or wrapper
```

The manifest is a cache: regenerate it whenever the available commands change (new packages, new `make:command` classes):

```
php artisan completion:build
```

Use `--path` to write it somewhere else than `bootstrap/cache/artisan-completion.json`:

```
php artisan completion:build --path=/tmp/artisan-completion.json
```

Uninstall
---------

[](#uninstall)

```
php artisan completion:uninstall
```

Removes the manifest and the installed completion script, then offers to clean up the related `~/.zshrc` lines (always asking before writing): the project's `compdef` binding is removed — or rebound to another project's script if one is still installed — while the `fpath`/`compinit` lines are only removed when nothing else uses `~/.zsh/completions`. Stale `~/.zcompdump*` caches are cleared so the old mapping does not survive, and empty directories are tidied up.

To remove the package itself afterwards:

```
composer remove alle80/artcompletion
```

How it works
------------

[](#how-it-works)

- `completion:build` introspects every registered Artisan command — built-in, application, and package commands (Filament, Livewire, ...) — and writes a JSON manifest with names, descriptions, arguments, and options.
- The zsh script resolves the manifest at completion time by walking up from `$PWD` to the nearest directory containing an `artisan` file, so one copy of the script works for all your projects and each project completes its own commands.
- Namespaced commands (`make:model`, `migrate:fresh`) get their colons escaped for zsh's `_describe`.
- `--option=` completes the value part as a path; non-option arguments fall back to file completion.

### oh-my-zsh and other frameworks that run compinit

[](#oh-my-zsh-and-other-frameworks-that-run-compinit)

compinit registers `#compdef` services with a "first definition wins" rule. When a framework runs compinit before the block above (oh-my-zsh does), the system `_php` or a plugin's `_artisan` keeps the `php`/`artisan` services. That is why the installed block ends with an explicit `compdef`, which always overrides. Stale mappings can also survive inside `~/.zcompdump*` caches — delete those files and restart zsh if something looks wrong.

License
-------

[](#license)

[MIT](LICENSE)

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance100

Actively maintained with recent releases

Popularity2

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity32

Early-stage or recently created project

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

0d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e476df54515d680baf72177c6205f790feb2b45c7722908fc0725fc519ef7db7?d=identicon)[alle80](/maintainers/alle80)

---

Tags

laravelautocompleteshellartisancompletionzsh

### Embed Badge

![Health badge](/badges/alle80-artcompletion/health.svg)

```
[![Health](https://phpackages.com/badges/alle80-artcompletion/health.svg)](https://phpackages.com/packages/alle80-artcompletion)
```

###  Alternatives

[laravel/sail

Docker files for running a basic Laravel application.

1.9k205.7M1.3k](/packages/laravel-sail)[spatie/laravel-medialibrary

Associate files with Eloquent models

6.1k43.2M619](/packages/spatie-laravel-medialibrary)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k15.1M129](/packages/laravel-pulse)[laravel/horizon

Dashboard and code-driven configuration for Laravel queues.

4.2k95.4M293](/packages/laravel-horizon)[livewire/flux

The official UI component library for Livewire.

9527.8M125](/packages/livewire-flux)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M345](/packages/psalm-plugin-laravel)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
