ClaudeMods
☰
KO
● 0 명 접속 중 · 조회 0 회
후원프로젝트 제출
GitHub 저장소 · 작성자 cjmellor

artisan-dev

패널에서 Laravel 앱의 `php artisan dev` 프로세스를 실행하고 관리하는 Claude Code 플러그인입니다. 프로세스별 로그, 재시작/중지 제어, 포트 재정의와 터널 감지를 제공합니다.

cjmellor@cjmellor

cjmellor/mella-marketplace/tree/main/plugins/artisan-dev

번역 완료

이 mod 소개

artisan-dev는 Laravel 프로젝트용 Claude Code 플러그인입니다. /dev는 php artisan dev가 실행할 모든 프로세스를 시작하고 프로세스별 로그와 제어 기능이 있는 패널을 열며, 실행 중에는 프롬프트 위에 한 줄 상태 표시를 보여 줍니다. 하위 명령으로 start/stop/restart/status, 사이트 열기, 서버 상태를 프롬프트에 붙이기(/dev ask), 로그 지우기 또는 복사, 오류만 필터링하기, 감지된 공개 터널 URL 복사를 처리합니다. 포트는 실행 중인 서버 줄, --port 재정의, .env의 SERVER_PORT, Laravel 기본값 순서로 결정되며 재정의는 세션에서만 유지됩니다. 패널은 프로세스 선택, 도구 모음 작업(stop/start/restart/open/copy tunnel/copy log/ask Claude), 색상 및 줄바꿈 로그, 오류/경고 필터를 지원하고, 오류 수는 엄격한 심각도 표식을 사용합니다. 플러그인은 worktree에 들어오고 나가는 동안 기본 체크아웃을 감시하며 브랜치나 worktree 집합이 바뀌면 서버를 재시작합니다. 각 프로세스를 자체 프로세스 그룹과 재시도 제한으로 실행하고 Cloudflare, ngrok, Expose, Herd share, localtunnel, localhost.run, Serveo, Pinggy, Tailscale funnel, Dev Tunnels의 출력에서 터널을 감지합니다. 설정에는 projectDir과 추가 tunnelHosts가 있습니다. 플러그인 모듈을 로드하는 Claude Code 빌드와 Artisan에 dev 및 dev:list가 있는 Laravel 앱이 필요합니다. macOS에서는 perl로 프로세스를 시작하고 open으로 사이트를 엽니다. MIT 라이선스입니다.

설치

먼저 작성자의 README에서 marketplace와 플러그인 이름을 확인하세요. 저장소 구조에 따라 명령어가 달라질 수 있습니다.

claude plugin marketplace add cjmellor/mella-marketplace
claude plugin install artisan-dev
원문 / README

artisan-dev

Run a Laravel app's php artisan dev from inside Claude Code and manage it without leaving the session.

artisan-dev is a Claude Code mod. /dev starts every process php artisan dev would, opens a pane with their logs and controls, and keeps a one-line status band above the prompt while they run.

Requirements

  • A Claude Code build that loads plugin modules (mods).
  • A Laravel app whose Artisan has dev and dev:list.
  • macOS: processes are launched through perl (preinstalled) and the site is opened with open.

Usage

/dev starts the processes and opens the pane. Add a subcommand to do one thing:

| Command | What it does | |---------|--------------| | /dev | Start everything and open the pane | | /dev start | Start everything, no pane | | /dev stop | Stop everything and clear the log | | /dev restart [name] | Restart everything, or one process by name or number | | /dev status | Show what is running | | /dev site | Open the site | | /dev ask [name] | Attach the server state and recent output to your next prompt | | /dev clear | Clear the log | | /dev errors | Toggle showing only errors and warnings | | /dev copy [name] | Copy a process log (or the all view) to the clipboard | | /dev tunnel | Show and copy the public tunnel URL | | /dev help | List the commands |

Port

The port comes from, in order: a live Server running on [http://host:PORT] line from the app, a --port override, SERVER_PORT in the project's .env, then Laravel's default.

Override it for the session with --port=8111, -p 8111 or port=8111 on /dev, /dev start or /dev restart. If the servers are running, they restart on the new port. port=default (or port=reset) drops the override. A port can't be combined with restarting a single process, because it applies to every process.

The override lives in the session only. It is never written to .env, and it stays in place until you reset it or the session ends.

The site opens at APP_URL from the .env of the checkout the session is in, so inside a worktree it is that worktree's site. A loopback APP_URL (localhost or 127.0.0.1) gets the real port; any other host is used as written. The band link is labelled with that host (kandu.test ↗), or :port ↗ for a loopback APP_URL. In a worktree with a hosted APP_URL, the worktree name in the band is the link instead.

The pane

  • Processes — 0 shows the combined log in arrival order; 1–9 pick a process. The up and down arrows move between process names only.
  • Toolbar — x Stop all (or s Start all), r Restart all, t Restart one (the selected process), o Open site, u Copy tunnel (shown once a tunnel URL is known), c Copy log, a Ask Claude (attaches the state and recent output to your next prompt; the button then reads asked ✓ and drops it).
  • Log — keeps each process's own colours, wraps long lines, and scrolls with the wheel, page keys, Home and End. e (or the button in the Log divider) shows only errors and warnings.
  • Band above the prompt — status dot, a clickable site link (see Port above), how many processes are up, an error count, the git branch (⎇) and, inside a linked git worktree, its name (⌂). + and − open and close the pane.

Errors

A line counts as an error only when it carries a severity marker where its tool puts one: a log level such as Laravel's local.ERROR: or a Pail ERROR badge, an exception class at the start of the message, or a phrase such as Fatal error, Uncaught or Vite's Internal server error:. A word like error inside a file name, path or ordinary sentence doesn't count. Matching lines raise the band's error count, turn red in the log and show a toast.

Crashes and restarts

While the servers run, the mod checks the project's main checkout right after Claude enters or exits a worktree, and every few seconds otherwise. If its branch changes, or a git worktree is added or removed, it restarts everything and shows a toast naming the cause. The servers always run from the main checkout, even when the session itself has moved into a worktree.

Each process runs in its own process group, so stopping or restarting one kills everything it started. A process that exits with a non-zero code or is killed from outside is restarted up to five times; a process that dies within a second of starting is not retried. The budget resets after a minute of healthy running or when you press Start all. Toasts report starts, crashes, restarts and giving up.

Reloading the mod or ending the session stops the servers. Anything left over from an earlier load is cleaned up when the session starts, but only if its process group still carries this mod's marker.

Tunnels

When a process prints a public tunnel URL (Cloudflare, ngrok, Expose and Herd share, localtunnel, localhost.run, Serveo, Pinggy, Tailscale funnel, Dev Tunnels and similar), the mod shows a toast and offers Copy tunnel. Detection reads process output, so a tunnel started outside the dev processes, such as from Herd's own Share button, isn't seen.

Settings

| Setting | Default | Purpose | |---------|---------|---------| | projectDir | empty | Absolute path of the Laravel app. Empty uses the session's folder; when the session starts inside a worktree, the same folder in the main checkout. | | tunnelHosts | empty | Extra comma-separated domains to treat as a tunnel, for providers not built in. |

Development

The pure logic (argument parsing, .env reading, ANSI handling, layout, exit policy) is covered by hooks/register.test.ts:

claude plugin validate plugins/artisan-dev
claude plugin test plugins/artisan-dev

The process lifecycle (starting, stopping, restarting) isn't covered by tests, because the test kit can't mock process spawning.

License

MIT

비슷한 프로젝트