@aippt/dev-ps (0.1.0)
Installation
@aippt:registry=npm install @aippt/dev-ps@0.1.0"@aippt/dev-ps": "0.1.0"About this package
dev-ps
Lists and stops the development processes of each Git worktree.
A worktree's development processes are the processes Vite+ started inside it
(vp run, vp exec, vpr, …), those listening on its ports, and their child processes, wherever
they run. The ports are the variables the worktree's Varlock env schema tags
with @tag(port). The shells, editors, and agent sessions that launched them never count, nor does
the session running dev-ps.
Installation
Route the @aippt scope to its registry in pnpm-workspace.yaml and install the package next to
Vite+ and Varlock, its peer dependencies:
registries:
https://git.productteams.ai/api/packages/aippt/npm/:
scopes: ['@aippt']
pnpm add --save-dev @aippt/dev-ps
Tasks in vite.config.ts keep the commands at hand, as vp run ps:status and
vp run ps:stop [<worktree> | --all]:
run: {
tasks: {
'ps:status': { command: 'dev-ps status', cache: false },
'ps:stop': { command: 'dev-ps stop', cache: false },
},
},
Command line
dev-ps status # list the development processes of every worktree
dev-ps stop # stop those of the current worktree
dev-ps stop <worktree> # stop those of the worktree with this directory or branch name
dev-ps stop --all # stop those of every worktree
status also warns about worktree ports held by another worktree's or an unrelated process. stop
sends SIGTERM, follows each process until it exits, and sends SIGKILL to those still running
after 12 seconds.
dev-ps runs Varlock from PATH, so run it through vp run or vp exec, which put the project's
node_modules/.bin there. It reads Linux's /proc and sees the current user's processes only.
Development
Open the repository in its dev container, then:
vp install
vp check
vp test
vp run package
vp exec node src/cli.ts status
The tests start real servers on free ports in temporary Git repositories. See publishing for package and version commands.
Dependencies
Development dependencies
| ID | Version |
|---|---|
| @types/node | 26.6.2 |
| @vitest/coverage-v8 | 4.1.11 |
| publint | 0.3.23 |
| typescript | 7.0.2 |
| varlock | 1.20.0 |
| vite | npm:@voidzero-dev/vite-plus-core@0.3.3 |
| vite-plus | 0.3.3 |
Peer dependencies
| ID | Version |
|---|---|
| varlock | ^1.20.0 |
| vite-plus | ^0.3.3 |