laracrew 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md ADDED
@@ -0,0 +1,94 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project are documented here.
4
+
5
+ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project
6
+ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). While the version is
7
+ below `1.0.0`, minor versions may contain breaking config changes; those are always listed
8
+ under **Changed** with a migration note.
9
+
10
+ ## [Unreleased]
11
+
12
+ Planned, in order — see `.claude/PLAN.md`:
13
+
14
+ - `laracrew scan` to discover Laravel projects and scaffold a stack
15
+ - Live queue depth and Redis stream consumer lag in the process tree
16
+ - File watching with graceful `queue:restart`
17
+ - `laracrew run <task>` for one-shot cross-project sequences
18
+ - Background daemon: `up --detach`, `attach`, `status`, `logs -f`
19
+
20
+ ## [0.1.0] — 2026-09-19
21
+
22
+ First release. Boots and supervises the long-running processes of several Laravel projects at
23
+ once, from one command.
24
+
25
+ ### Added
26
+
27
+ **Supervision**
28
+
29
+ - Dependency-ordered boot (`needs:`), with independent services started in parallel.
30
+ - Readiness gates before a dependent service starts: `tcp`, `http`, `logMatch`, `delayMs`.
31
+ - Restart policies (`never`, `on-failure`, `always`) with exponential backoff, a restart
32
+ ceiling, and an attempt counter that resets after a service has been stable.
33
+ - A Laravel-aware stop ladder: `php artisan queue:restart` (or `horizon:terminate`) first, wait
34
+ for the worker to finish the job it is holding, then terminate — and always as a process
35
+ tree, so `artisan serve`'s child PHP server and `npm run dev`'s Vite are never orphaned.
36
+ - Rollback on a failed boot: a readiness gate that never opens stops everything that had
37
+ already started, instead of leaving a half-booted stack behind.
38
+ - `external: true` for services laracrew health-checks but never starts, such as Redis.
39
+ - `autostart: false` for services defined but not launched, started later on demand.
40
+
41
+ **Interface**
42
+
43
+ - A full-screen process tree as the default view, which renders no log output at all; logs are
44
+ opened one process at a time. Built on plain ANSI — no TUI framework.
45
+ - Per-process log inspection, a merged log across all services, restart/stop/start, and help.
46
+ - `external: true` dependencies are listed above the tree under their own heading rather than
47
+ numbered among the managed processes, so a digit key always selects something startable.
48
+ - `--plain` prefixed interleaved logs, selected automatically when stdout is not a TTY.
49
+ - `--json` newline-delimited events for scripting.
50
+ - A broken pipe (`laracrew up --json | head`) shuts the stack down cleanly instead of crashing.
51
+
52
+ **Logs**
53
+
54
+ - Every line is written to `~/.laracrew/logs/<stack>/<service>.log`, on by default, rotated by
55
+ size. Plain text with a sortable local timestamp and no colour codes, so `grep` works.
56
+ - `laracrew logs [service]` reads them back after the fact, with `-n`, `-f`, `--since 10m`,
57
+ `--all` to merge every service in time order, and `--list`.
58
+ - Writes go through a held file descriptor rather than a stream, so a line reaches disk before
59
+ a crashing process can lose it, and rotation can close the handle deterministically — a
60
+ rename with an open handle fails outright on Windows.
61
+
62
+ **Configuration**
63
+
64
+ - `~/.laracrew/` home: `config.yaml`, `projects.yaml`, one folder per stack, tasks, fragments.
65
+ - YAML stacks validated against a schema, with errors that name the file, the field, and a
66
+ spelling suggestion.
67
+ - Interpolation: `${env:VAR}`, `${env:VAR:fallback}`, `${project.path}`, `${project.env:VAR}`,
68
+ `${stack.dir}`, `${port:N}`.
69
+ - Groups, profiles, `--only` / `--except` filtering, and `services/*.yaml` fragments.
70
+
71
+ **Commands**
72
+
73
+ - `laracrew init [--examples]`, `ls`, `up`, `doctor`, `link`, `unlink`.
74
+ - `laracrew link <stack>` installs a global command that boots one stack, so a project set is
75
+ one word to launch. Generated shims are marked, and laracrew refuses to overwrite files it
76
+ did not write or to shadow names like `npm` and `git`.
77
+
78
+ **Checks (`laracrew doctor`)**
79
+
80
+ - Two projects sharing a Redis database *and* a queue or stream name, computing the effective
81
+ prefix the way Laravel does (`REDIS_PREFIX`, else a slug of `APP_NAME`) so it does not report
82
+ a collision that isn't one.
83
+ - `QUEUE_CONNECTION=sync` in a project that runs a queue worker.
84
+ - Port clashes, missing project paths, an unreachable Redis, and a PHP binary that will not run.
85
+
86
+ ### Notes
87
+
88
+ - Requires Node 20 or newer. Windows, macOS and Linux.
89
+ - Runtime dependencies: `commander`, `yaml`, `zod`.
90
+ - Accepted by the schema but not yet acted on: `watch`, `metrics` (read by `doctor` only), and
91
+ `hooks`. Stack files written today stay valid.
92
+
93
+ [Unreleased]: https://github.com/OWNER/laracrew/compare/v0.1.0...HEAD
94
+ [0.1.0]: https://github.com/OWNER/laracrew/releases/tag/v0.1.0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Viduranga <https://github.com/vidux>
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.