@visulima/vis 1.0.0-alpha.3 → 1.0.0-alpha.30
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 +1117 -24
- package/LICENSE.md +11958 -0
- package/README.md +344 -20
- package/dashboard/dist/index.html +152 -0
- package/dist/bin.js +1 -146
- package/dist/binx.js +3 -0
- package/dist/config/index.d.ts +3154 -0
- package/dist/config/index.js +1 -0
- package/dist/generate/index.d.ts +157 -0
- package/dist/generate/index.js +1 -0
- package/dist/packem_chunks/bin.js +1415 -0
- package/dist/packem_chunks/bloom-status.js +2 -0
- package/dist/packem_chunks/bloom-sync.js +2 -0
- package/dist/packem_chunks/cache-attestation.js +1 -0
- package/dist/packem_chunks/config.js +19 -0
- package/dist/packem_chunks/devtools.js +82 -0
- package/dist/packem_chunks/doctor-probe.js +2 -0
- package/dist/packem_chunks/fix.js +11 -0
- package/dist/packem_chunks/handler.js +1 -0
- package/dist/packem_chunks/handler10.js +1 -0
- package/dist/packem_chunks/handler11.js +5 -0
- package/dist/packem_chunks/handler12.js +1 -0
- package/dist/packem_chunks/handler13.js +27 -0
- package/dist/packem_chunks/handler14.js +5 -0
- package/dist/packem_chunks/handler15.js +1 -0
- package/dist/packem_chunks/handler16.js +1 -0
- package/dist/packem_chunks/handler17.js +1 -0
- package/dist/packem_chunks/handler18.js +1 -0
- package/dist/packem_chunks/handler19.js +1 -0
- package/dist/packem_chunks/handler2.js +4 -0
- package/dist/packem_chunks/handler20.js +5 -0
- package/dist/packem_chunks/handler21.js +2 -0
- package/dist/packem_chunks/handler22.js +2 -0
- package/dist/packem_chunks/handler23.js +1 -0
- package/dist/packem_chunks/handler24.js +1 -0
- package/dist/packem_chunks/handler25.js +5 -0
- package/dist/packem_chunks/handler26.js +1 -0
- package/dist/packem_chunks/handler27.js +3 -0
- package/dist/packem_chunks/handler28.js +1 -0
- package/dist/packem_chunks/handler29.js +7 -0
- package/dist/packem_chunks/handler3.js +4 -0
- package/dist/packem_chunks/handler30.js +33 -0
- package/dist/packem_chunks/handler31.js +3 -0
- package/dist/packem_chunks/handler32.js +8 -0
- package/dist/packem_chunks/handler33.js +1 -0
- package/dist/packem_chunks/handler34.js +5 -0
- package/dist/packem_chunks/handler35.js +11 -0
- package/dist/packem_chunks/handler36.js +3 -0
- package/dist/packem_chunks/handler37.js +22 -0
- package/dist/packem_chunks/handler38.js +61 -0
- package/dist/packem_chunks/handler39.js +3 -0
- package/dist/packem_chunks/handler4.js +6 -0
- package/dist/packem_chunks/handler40.js +6 -0
- package/dist/packem_chunks/handler41.js +24 -0
- package/dist/packem_chunks/handler42.js +153 -0
- package/dist/packem_chunks/handler43.js +25 -0
- package/dist/packem_chunks/handler44.js +10 -0
- package/dist/packem_chunks/handler45.js +708 -0
- package/dist/packem_chunks/handler46.js +24 -0
- package/dist/packem_chunks/handler47.js +322 -0
- package/dist/packem_chunks/handler48.js +48 -0
- package/dist/packem_chunks/handler49.js +3 -0
- package/dist/packem_chunks/handler5.js +8 -0
- package/dist/packem_chunks/handler50.js +27 -0
- package/dist/packem_chunks/handler51.js +195 -0
- package/dist/packem_chunks/handler52.js +34 -0
- package/dist/packem_chunks/handler6.js +1 -0
- package/dist/packem_chunks/handler7.js +1 -0
- package/dist/packem_chunks/handler8.js +1 -0
- package/dist/packem_chunks/handler9.js +1 -0
- package/dist/packem_chunks/heal-accept.js +10 -0
- package/dist/packem_chunks/heal.js +14 -0
- package/dist/packem_chunks/help-command.js +8 -0
- package/dist/packem_chunks/index.js +7 -0
- package/dist/packem_chunks/keys-refresh.js +4 -0
- package/dist/packem_chunks/list.js +3 -0
- package/dist/packem_chunks/loader.js +4 -0
- package/dist/packem_chunks/loader2.js +1 -0
- package/dist/packem_chunks/prune.js +3 -0
- package/dist/packem_chunks/run.js +1 -0
- package/dist/packem_chunks/status.js +2 -0
- package/dist/packem_chunks/sync.js +2 -0
- package/dist/packem_chunks/sync2.js +2 -0
- package/dist/packem_chunks/tar.js +3 -0
- package/dist/packem_chunks/tripwire.js +2 -0
- package/dist/packem_chunks/verify-lockfile.js +2 -0
- package/dist/packem_shared/Table-DoSoazT6-DwnyTUsA.js +12 -0
- package/dist/packem_shared/_commonjsHelpers-CLblCigl.js +1 -0
- package/dist/packem_shared/advisories-BxXiKFbL.js +1 -0
- package/dist/packem_shared/affected-shas-BdnlfiV1.js +1 -0
- package/dist/packem_shared/ai-analysis-KP8b5lc0.js +68 -0
- package/dist/packem_shared/ai-fix-BkPUHA0z.js +43 -0
- package/dist/packem_shared/anolilab-text-CAM_E6uK.js +13 -0
- package/dist/packem_shared/applyDefaults-BogleaFi.js +1 -0
- package/dist/packem_shared/build-scripts-DE6U8jVq.js +1 -0
- package/dist/packem_shared/cyclonedx-BpGVHqSW.js +4 -0
- package/dist/packem_shared/definePlugin-CWm4Dv_t.js +1 -0
- package/dist/packem_shared/dependency-scan-BUbOcMwX.js +1 -0
- package/dist/packem_shared/docker-CTE3s4LW.js +60 -0
- package/dist/packem_shared/failure-log-34Wl3npC.js +2 -0
- package/dist/packem_shared/giget-CcEy_Elm.js +2 -0
- package/dist/packem_shared/glob-D_7bct6p-D8itOHsr.js +1 -0
- package/dist/packem_shared/index-D1xC1Y_R.js +1 -0
- package/dist/packem_shared/index-DH-5hsrC.js +1 -0
- package/dist/packem_shared/index-hoWfZmNo.js +30 -0
- package/dist/packem_shared/license-zZU7aavK.js +1 -0
- package/dist/packem_shared/lifecycle-CXaqPGAQ.js +2 -0
- package/dist/packem_shared/lockfile-CrT86D6d.js +1 -0
- package/dist/packem_shared/lockfile-Cu2BH6bl.js +1 -0
- package/dist/packem_shared/manifests-BzWpKW8F.js +1 -0
- package/dist/packem_shared/min-release-age-BPVXwPUg.js +34 -0
- package/dist/packem_shared/native-config-sync-BRZZetn3.js +21 -0
- package/dist/packem_shared/osv-bloom-DSZcHLsM.js +2 -0
- package/dist/packem_shared/otelPlugin-CJR2T_lk.js +1 -0
- package/dist/packem_shared/peer-warnings-EvSJ18gE.js +1 -0
- package/dist/packem_shared/pm-runner-DmKT2FqF.js +1 -0
- package/dist/packem_shared/provenance-DkCA8BrN.js +1 -0
- package/dist/packem_shared/readFileSync-DseCu8sg-DEq4Fn3a.js +1 -0
- package/dist/packem_shared/registry-keys-Mixm4eAY.js +1 -0
- package/dist/packem_shared/resolve-explicit-D5E72FfN.js +5 -0
- package/dist/packem_shared/runtime-check-CilFOqUU.js +1 -0
- package/dist/packem_shared/s1ngularity-Qxc6tRRI.js +1 -0
- package/dist/packem_shared/scan-progress-DVtCtI2z.js +2 -0
- package/dist/packem_shared/selectors-DkgYFzdq.js +3 -0
- package/dist/packem_shared/signatures-byuFrtAH.js +2 -0
- package/dist/packem_shared/spinner-C8xs6QZv.js +1 -0
- package/dist/packem_shared/spinners-f91Rbo99-Bjf3NcO0.js +1 -0
- package/dist/packem_shared/symbols-CQmER5MT.js +1 -0
- package/dist/packem_shared/tabs-xZkm6Y_J.js +1 -0
- package/dist/packem_shared/toolchain-DoG6b_G_.js +5 -0
- package/dist/packem_shared/typosquats-BiDxQj7R.js +1 -0
- package/dist/packem_shared/use-measured-height-Lea6TCVD.js +1 -0
- package/dist/packem_shared/utils-DrNg0XTR.js +1 -0
- package/dist/packem_shared/verify-cLcZwKqe.js +1 -0
- package/dist/packem_shared/vis-update-app-BCKzlqj8.js +1 -0
- package/dist/packem_shared/watch-DEL0yol9.js +1 -0
- package/dist/packem_shared/watch-loop-C31Ar7BX.js +11 -0
- package/index.d.ts +436 -0
- package/index.js +613 -0
- package/package.json +71 -26
- package/schemas/project.schema.json +991 -0
- package/schemas/vis-config.schema.json +4958 -0
- package/skills/vis/SKILL.md +96 -0
- package/templates/buildkite-ci/.buildkite/pipeline.yml.tera +85 -0
- package/templates/buildkite-ci/template.yml +20 -0
- package/dist/ai-analysis.d.ts +0 -40
- package/dist/ai-cache.d.ts +0 -21
- package/dist/bin.d.ts +0 -1
- package/dist/catalog.d.ts +0 -110
- package/dist/commands/affected.d.ts +0 -3
- package/dist/commands/ai.d.ts +0 -3
- package/dist/commands/analyze.d.ts +0 -3
- package/dist/commands/check.d.ts +0 -3
- package/dist/commands/graph.d.ts +0 -3
- package/dist/commands/hook/constants.d.ts +0 -8
- package/dist/commands/hook/index.d.ts +0 -3
- package/dist/commands/hook/install.d.ts +0 -7
- package/dist/commands/hook/migrate.d.ts +0 -27
- package/dist/commands/hook/uninstall.d.ts +0 -3
- package/dist/commands/migrate/constants.d.ts +0 -12
- package/dist/commands/migrate/deps.d.ts +0 -32
- package/dist/commands/migrate/index.d.ts +0 -3
- package/dist/commands/migrate/json.d.ts +0 -20
- package/dist/commands/migrate/lint-staged.d.ts +0 -62
- package/dist/commands/migrate/types.d.ts +0 -20
- package/dist/commands/run.d.ts +0 -3
- package/dist/commands/staged.d.ts +0 -3
- package/dist/commands/update.d.ts +0 -3
- package/dist/config.d.ts +0 -40
- package/dist/config.js +0 -1
- package/dist/package-manager.d.ts +0 -23
- package/dist/workspace.d.ts +0 -58
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
</a>
|
|
8
8
|
|
|
9
|
-
<h3 align="center">A
|
|
9
|
+
<h3 align="center">A monorepo dev toolkit — task runner, remote caching, security scanning, git hooks, and AI agent integrations — powered by @visulima/task-runner</h3>
|
|
10
10
|
|
|
11
11
|
<!-- END_PACKAGE_OG_IMAGE_PLACEHOLDER -->
|
|
12
12
|
|
|
@@ -36,16 +36,59 @@
|
|
|
36
36
|
|
|
37
37
|
## Features
|
|
38
38
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
- **
|
|
42
|
-
-
|
|
43
|
-
- **
|
|
44
|
-
|
|
45
|
-
-
|
|
46
|
-
|
|
47
|
-
- **
|
|
48
|
-
-
|
|
39
|
+
### Built for AI agents
|
|
40
|
+
|
|
41
|
+
- **MCP server** — `@visulima/vis-mcp` exposes 8 read-only introspection tools to Claude / Cursor / Copilot (project graph, target list, run logs, cache-why, template schema), plus a paired Claude Skill that documents optimal usage
|
|
42
|
+
- **`vis ai heal`** — reads failing tasks, asks the configured AI provider for a structured patch, validates by re-running, posts a markdown comment to the PR/MR. `/vis heal accept` from an allow-listed maintainer lands the fix as a signed commit (GitHub Actions, GitLab CI, Buildkite)
|
|
43
|
+
- **Worktree-aware shared cache** — N parallel agents in N sibling git worktrees automatically share one cache instead of rebuilding the same hash N times
|
|
44
|
+
|
|
45
|
+
### Production-grade caching
|
|
46
|
+
|
|
47
|
+
- **REAPI gRPC + HTTP backends** — drop-in support for [bazel-remote](https://github.com/buchgr/bazel-remote), BuildBuddy, BuildBarn, EngFlow alongside Turbo-compatible HTTP. `vis cache doctor` probes reachability, capabilities, and latency for CI gating
|
|
48
|
+
- **`vis cache why <task>`** — diff hash buckets (`command`, `nodes`, `runtime`, `implicitDeps`) against the previous run to pinpoint exactly what rotated the hash
|
|
49
|
+
- **HMAC-SHA256 signed artifacts** — `verifyOnDownload` locks production caches against tampering with constant-time comparison
|
|
50
|
+
- **Cache restoration fidelity** — preserves mtime + permission bits + colorized output; `vis cache verify <task>` flags drift between cached archive and live workspace
|
|
51
|
+
- **Retention controls** — `vis cache prune --keep-last/--max-age-days/--max-size`
|
|
52
|
+
|
|
53
|
+
### Cross-invocation devloop
|
|
54
|
+
|
|
55
|
+
- **`vis service start|stop|list`** — long-lived DB / mock / devserver lifecycle that survives across `vis run` calls within a shell session; auto-attached when targets declare `service:` in their config (no more "I keep restarting Postgres between every test run")
|
|
56
|
+
- **`vis run --watch`** — Vitest-style keybinds (`r/Enter/a/p/q/Ctrl+C/h/?`), Windows-clean SIGINT
|
|
57
|
+
- **`vis run --output-style=quiet`** — swallow stdout from successful and cached tasks, keep failures fully visible
|
|
58
|
+
|
|
59
|
+
### Workspace orchestration
|
|
60
|
+
|
|
61
|
+
- **Workspace-aware** — discovers projects from `pnpm-workspace.yaml`, `package.json` workspaces, and bun
|
|
62
|
+
- **Topological scheduling** with configurable parallelism and runner-tag filtering
|
|
63
|
+
- **Affected detection** — `vis affected <target>`, plus `${affected.files}` / `$AFFECTED_FILES` token forwarding to the underlying script
|
|
64
|
+
- **Conditional + finally tasks** — `when:` (os/env/branch/ci) and top-level `always: true`
|
|
65
|
+
- **Per-package overlay + extends chain** — root `vis-config.ts` + per-project `vis.task.ts`, with bare-specifier preset resolution
|
|
66
|
+
- **Inferred targets** (Project Crystal-style) — optional synthesis of `build`/`test`/`dev`/`lint`/`format` from 36 tools (Vite, Vitest, Next, Nuxt, packem, ESLint, Biome, Prisma, …). Opt in with `inferTargets: true`; explicit scripts and `project.json`/`vis.task.ts` overrides always win
|
|
67
|
+
- **URI-based input format** — `inputs` accepts `file://`, `glob://`, `env://`, `func://`, `dep://` strings as forward-compat sugar
|
|
68
|
+
- **Plugin / fingerprint hooks** — 14 typed hooks via `definePlugin` (lifecycle, streaming, retry, fingerprint, services), built on `hookable`
|
|
69
|
+
- **Strict env mode** — `--strict-env` extracts `${VAR}` references from each command and fails the task if any are unset
|
|
70
|
+
- **Lockfile preflight** — warns in TTY, hard-fails in CI when the lockfile is newer than the install marker
|
|
71
|
+
- **Project graph** — view dependencies in ASCII, DOT, JSON, or HTML
|
|
72
|
+
|
|
73
|
+
### Adjacent tooling that ships in-box
|
|
74
|
+
|
|
75
|
+
- **`vis catalog check / update`** — pnpm + bun workspace catalog management
|
|
76
|
+
- **`vis secrets`** — Rust-native secret scanning (gitleaks detection engine)
|
|
77
|
+
- **`vis audit`** — OSV.dev vulnerability scanning with pluggable supply-chain providers ([Socket.dev](https://socket.dev) and [Google deps.dev](https://deps.dev), merged when both are enabled). `--explain` adds a plain-English AI explanation per finding (auto-detects an installed AI CLI, cached, no API key) in the terminal, JSON, and HTML report
|
|
78
|
+
- **`vis docker scaffold`** — lockfile pruning for pnpm / npm / yarn classic + berry / bun, matching turbo's killer Docker-cache feature
|
|
79
|
+
- **`vis hook install / migrate`** — git hooks (husky migration supported)
|
|
80
|
+
- **`vis staged`** — built-in `lint-staged` replacement, no peer dependency
|
|
81
|
+
- **`vis migrate gitleaks|secretlint`** — incremental migration paths
|
|
82
|
+
- **`vis replay <runId>`** — re-render any past run summary without re-execution
|
|
83
|
+
|
|
84
|
+
### Toolchain & runtime
|
|
85
|
+
|
|
86
|
+
- **Pluggable installer** — defaults to the lockfile-detected PM (pnpm/npm/yarn/bun); auto-uses [aube](https://github.com/endevco/aube) when on `PATH`, with a single switch (`install.backend` / `--installer` / `--no-aube`) to pin or bypass it
|
|
87
|
+
- **Cold-start one-liner** — `curl -fsSL https://visulima.com/install.sh | bash` (Linux/macOS/WSL) or PowerShell equivalent installs the latest Node LTS (or a version manager on request) and `vis`
|
|
88
|
+
- **`vis toolchain`** — delegates to proto / mise / fnm / volta
|
|
89
|
+
- **Built on Cerebro** — robust CLI with built-in help, version, and shell completion
|
|
90
|
+
|
|
91
|
+
> **New to vis?** See [Why vis vs. Vite Task / Turbo / Nx / moon](./docs/guides/why-vis.mdx) for the side-by-side capability matrix.
|
|
49
92
|
|
|
50
93
|
## Install
|
|
51
94
|
|
|
@@ -61,6 +104,24 @@ yarn add @visulima/vis
|
|
|
61
104
|
pnpm add @visulima/vis
|
|
62
105
|
```
|
|
63
106
|
|
|
107
|
+
### Cold start (no Node? no manager?)
|
|
108
|
+
|
|
109
|
+
One-liner bootstrap that installs Node and `vis` in one go. When no Node is found it installs the latest Node LTS directly by default (OS package manager, falling back to the official nodejs.org build); a version manager (proto / fnm / mise / volta) is offered as an opt-in alternative. Pin a specific major with `VIS_NODE_MAJOR`.
|
|
110
|
+
|
|
111
|
+
**Linux / macOS / WSL** (bash):
|
|
112
|
+
|
|
113
|
+
```sh
|
|
114
|
+
curl -fsSL https://visulima.com/install.sh | bash
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
**Windows** (PowerShell 5.1+):
|
|
118
|
+
|
|
119
|
+
```powershell
|
|
120
|
+
irm https://visulima.com/install.ps1 | iex
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
Pass `--yes --manager=proto` (POSIX) or `-Yes -Manager proto` (PowerShell) for non-interactive / CI usage. See [`vis toolchain` docs](./docs/commands/toolchain.mdx#cold-start--no-node-no-manager) for details.
|
|
124
|
+
|
|
64
125
|
## Quick Start
|
|
65
126
|
|
|
66
127
|
```bash
|
|
@@ -79,23 +140,266 @@ vis check
|
|
|
79
140
|
# Check with security vulnerability scanning
|
|
80
141
|
vis check --security
|
|
81
142
|
|
|
82
|
-
# Update catalog dependencies interactively
|
|
143
|
+
# Update catalog dependencies interactively, plus any
|
|
144
|
+
# GitHub Actions, Dockerfile, docker-compose, or GitLab CI
|
|
145
|
+
# references in the workspace (auto-detected).
|
|
83
146
|
vis update --interactive
|
|
84
147
|
|
|
85
148
|
# Install git hooks
|
|
86
149
|
vis hook install
|
|
87
150
|
```
|
|
88
151
|
|
|
152
|
+
## Installer backend (aube)
|
|
153
|
+
|
|
154
|
+
`vis install`, `vis add`, `vis remove`, `vis update`, `vis dlx`, `vis exec`, `vis link`, `vis unlink`, `vis dedupe`, `vis why`, `vis outdated`, `vis info`, and `vis pm` honor [aube](https://github.com/endevco/aube) — a Rust-native package manager that reads and writes pnpm/npm/yarn/bun lockfiles in place — as a drop-in installer. Aube also supports the pnpm `catalog:` and `catalog:<name>` protocol from `pnpm-workspace.yaml`, including walk-up resolution from subpackages.
|
|
155
|
+
|
|
156
|
+
`vis` does not bundle aube. Install it once via your tool of choice and `vis` will auto-detect it on `PATH`:
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
npm install -g @endevco/aube # or
|
|
160
|
+
mise use -g aube # or
|
|
161
|
+
brew install endevco/tap/aube
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
Resolution precedence (highest first):
|
|
165
|
+
|
|
166
|
+
1. `--installer <name>` CLI flag — `auto`, `aube`, `pnpm`, `npm`, `yarn`, or `bun` (or `--no-aube` to force the lockfile-detected PM for a single run; `--no-aube` wins over every other source).
|
|
167
|
+
2. `VIS_INSTALLER` environment variable — same accepted values as the flag.
|
|
168
|
+
3. `install.backend` in `vis.config.ts` — same accepted values; the team-wide pin.
|
|
169
|
+
4. Auto-detect — `aube` when it's on `PATH` or `aube-lock.yaml` is present, otherwise the lockfile-detected PM (`pnpm-lock.yaml` → pnpm, `package-lock.json` → npm, `yarn.lock` → yarn, `bun.lockb` → bun).
|
|
170
|
+
|
|
171
|
+
Each step is consulted in order; the first one that resolves to a concrete backend wins. Picking an explicit value (`pnpm`, `npm`, …) at any level always beats the auto-detect step below it, so you can override the team default for a single shell session via `VIS_INSTALLER=pnpm vis install` without touching the config file.
|
|
172
|
+
|
|
173
|
+
```ts
|
|
174
|
+
// vis.config.ts — pin the installer for the team
|
|
175
|
+
import { defineConfig } from "@visulima/vis/config";
|
|
176
|
+
|
|
177
|
+
export default defineConfig({
|
|
178
|
+
install: { backend: "aube" }, // "auto" | "aube" | "pnpm" | "npm" | "yarn" | "bun"
|
|
179
|
+
});
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
### Lockfile drift
|
|
183
|
+
|
|
184
|
+
Aube reuses pnpm/npm/yarn/bun lockfile formats but its serialized output isn't byte-identical to the original tool's. The first install on a workspace whose lockfile was written by another PM produces a one-time churn diff; teams that mix tools on the same lockfile see ongoing drift. `vis install` warns when this is about to happen — pin `install.backend` to keep the team consistent.
|
|
185
|
+
|
|
186
|
+
### Lifecycle scripts
|
|
187
|
+
|
|
188
|
+
Aube already skips dependency lifecycle scripts by default. `--ignore-scripts` is a no-op under aube (`vis install` warns when you pass it). To opt specific packages back in, run `aube approve-builds` — the inverse direction from the pnpm/npm `--ignore-scripts` model.
|
|
189
|
+
|
|
190
|
+
### Audit delegation
|
|
191
|
+
|
|
192
|
+
When aube is the active installer, `vis audit` delegates to `aube audit` so a single, consistent vulnerability scan runs regardless of entry point. Resolution mirrors the installer chain:
|
|
193
|
+
|
|
194
|
+
1. `--backend <name>` CLI flag — `auto`, `aube`, or `vis`.
|
|
195
|
+
2. `VIS_AUDIT_BACKEND` env var.
|
|
196
|
+
3. `security.audit.backend` in `vis.config.ts`.
|
|
197
|
+
4. Defaults to `auto` — delegates only when `install.backend` (or `VIS_INSTALLER`) resolves to aube AND `aube` is on `PATH`.
|
|
198
|
+
|
|
199
|
+
Vis-only features (`--report`, `--fix-transitive`, `--usage`, `--policies`, `--format sarif|csaf|cyclonedx-vex|gitlab|junit`, `--ecosystem` beyond npm) print a warning and are dropped when delegating; pass `--backend vis` to force the built-in OSV/Socket scanner.
|
|
200
|
+
|
|
201
|
+
### Doctor visibility
|
|
202
|
+
|
|
203
|
+
When aube is the installer, `vis doctor` surfaces aube's effective hardening posture (`paranoid`, `trustPolicy`, `blockExoticSubdeps`, `jailBuilds`, `strictDepBuilds`, `minimumReleaseAge`, `allowBuilds`) alongside the existing vis `security.policies.*` findings, reading from `aube-workspace.yaml` (or falling back to `pnpm-workspace.yaml`). Aube's defaults are already hardened, so most entries render as `ok` — the section turns into a positive confirmation rather than a wall of warnings.
|
|
204
|
+
|
|
89
205
|
## Commands
|
|
90
206
|
|
|
91
|
-
| Command | Alias
|
|
92
|
-
| ----------------------- |
|
|
93
|
-
| `vis
|
|
94
|
-
| `vis
|
|
95
|
-
| `vis
|
|
96
|
-
| `vis
|
|
97
|
-
| `vis
|
|
98
|
-
| `vis
|
|
207
|
+
| Command | Alias | Description |
|
|
208
|
+
| ----------------------- | ------ | -------------------------------------------------------------------------------------- |
|
|
209
|
+
| `vis create [template]` | | Scaffold a new project from templates, npm packages, or git repos |
|
|
210
|
+
| `vis generate [name]` | | Scaffold files from an in-repo template (native TS or moon-format) |
|
|
211
|
+
| `vis init` | | Initialize vis.config.ts with security defaults |
|
|
212
|
+
| `vis run <target>` | | Run a target across workspace projects with caching |
|
|
213
|
+
| `vis affected <target>` | | Run tasks only on projects affected by git changes |
|
|
214
|
+
| `vis ignore <project>` | | CI build gating for Vercel / Netlify "Ignored Build Step" |
|
|
215
|
+
| `vis graph` | | Visualize the project dependency graph |
|
|
216
|
+
| `vis check [packages]` | `c` | Check for outdated dependencies in workspace catalogs |
|
|
217
|
+
| `vis update [packages]` | `up` | Update packages, GitHub Actions, Dockerfiles, and GitLab CI refs |
|
|
218
|
+
| `vis install` | `i` | Install dependencies via the detected package manager |
|
|
219
|
+
| `vis info <package>` | `view` | Show npm registry metadata for a package (wraps `npm view` et al.) |
|
|
220
|
+
| `vis dlx <package>` | | Execute a remote package without permanent installation |
|
|
221
|
+
| `vis audit` | | Audit dependencies for security vulnerabilities |
|
|
222
|
+
| `vis clean` | | Remove build artifacts, caches, and node_modules |
|
|
223
|
+
| `vis cache <action>` | | Inspect cache (`list`, `size`, `hash`, `why`), or `prune` / `clean` |
|
|
224
|
+
| `vis hook <action>` | | Manage git hooks (install, uninstall, migrate) |
|
|
225
|
+
| `vis secrets [paths]` | | Scan for hardcoded secrets / credentials (Rust-native) |
|
|
226
|
+
| `vis toolchain <cmd>` | | Inspect / delegate to the version manager (proto, mise, fnm, volta…) |
|
|
227
|
+
| `vis lint [files]` | | Orchestrate detected source-code linters (oxlint, biome, eslint, stylelint, deno-lint) |
|
|
228
|
+
| `vis fmt [files]` | | Orchestrate detected formatters (oxfmt, biome, dprint, prettier, deno-fmt) |
|
|
229
|
+
| `vis staged` | | Run tasks on staged files (built-in `lint-staged` replacement) |
|
|
230
|
+
| `vis migrate <type>` | | Migrate from other tools — now including `gitleaks` and `secretlint` |
|
|
231
|
+
|
|
232
|
+
For `vis ignore`, see the [command reference](./docs/commands/ignore.mdx) and the [deployment build gating section](./docs/guides/ci-cd.mdx#deployment-build-gating) of the CI/CD guide.
|
|
233
|
+
|
|
234
|
+
### Diagnosing cache misses
|
|
235
|
+
|
|
236
|
+
When a task you expected to be cached re-ran, ask vis what changed:
|
|
237
|
+
|
|
238
|
+
```sh
|
|
239
|
+
vis cache why @myorg/app:build # human-friendly diff vs. previous run
|
|
240
|
+
vis cache why @myorg/app:build --json # stable shape for CI
|
|
241
|
+
vis cache hash @myorg/app:build # just print the hash + per-bucket inputs
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
`vis cache why` reads `.task-runner/last-summary.json` and diffs the task's `hashDetails` (`command`, `nodes`, `runtime`, `implicitDeps`) against the previous run, so you can pinpoint exactly which bucket rotated. Past runs only land in `.task-runner/runs/` when you pass `--summarize`, so use `vis run :build --summarize` (or set it as a default in CI) for diffs you'll want to inspect later.
|
|
245
|
+
|
|
246
|
+
### Cache retention
|
|
247
|
+
|
|
248
|
+
`vis cache prune` evicts entries by any combination of age, total size, and count:
|
|
249
|
+
|
|
250
|
+
```sh
|
|
251
|
+
vis cache prune --max-age-days=7 # drop entries older than a week
|
|
252
|
+
vis cache prune --max-size=2GB # evict oldest until under 2 GB
|
|
253
|
+
vis cache prune --keep-last=30 # keep only the 30 newest entries
|
|
254
|
+
vis cache prune --keep-last=30 --max-age-days=14 # combine: 30-newest floor, then age cap
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
`--keep-last` enforces a count floor first (newest-first by mtime), then `--max-age-days` and `--max-size` apply.
|
|
258
|
+
|
|
259
|
+
### Sharing the cache across git worktrees
|
|
260
|
+
|
|
261
|
+
When the workspace is a linked worktree (created with `git worktree add`), vis stores the cache at `<mainWorktreeRoot>/.task-runner-cache` so sibling worktrees driven by parallel agents share one cache instead of rebuilding the same hash N times. Set `sharedWorktreeCache: false` in `vis.config.ts` to opt out, or use `--scope=worktree|shared|all` on `vis cache list/size/prune` to inspect or operate on a specific store.
|
|
262
|
+
|
|
263
|
+
### Quieting successful runs
|
|
264
|
+
|
|
265
|
+
`--output-style=quiet` skips stdout/stderr from successful and cached tasks while keeping failures fully visible. Pair it with per-target `options.outputStyle` to mute a single noisy task — or to keep one critical task verbose under a global quiet flag:
|
|
266
|
+
|
|
267
|
+
```sh
|
|
268
|
+
vis run :build --output-style=quiet # only failures print
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
```json
|
|
272
|
+
{
|
|
273
|
+
"targets": {
|
|
274
|
+
"lint": { "options": { "outputStyle": "quiet" } },
|
|
275
|
+
"migrate": { "options": { "outputStyle": "normal" } }
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
See the [`vis cache`](./docs/commands/cache.mdx) and [`vis run`](./docs/commands/run.mdx) command references for the full surface.
|
|
281
|
+
|
|
282
|
+
### Scanning for secrets
|
|
283
|
+
|
|
284
|
+
`vis secrets` wraps [`@visulima/secret-scanner`](../secret-scanner) — a Rust port of the gitleaks detection engine — with ergonomic flags for the common workflows.
|
|
285
|
+
|
|
286
|
+
```sh
|
|
287
|
+
vis secrets # scan the workspace (grouped, colourised output)
|
|
288
|
+
vis secrets --staged # pre-commit mode: scan staged files only
|
|
289
|
+
vis secrets --since main # scan files changed since the `main` branch
|
|
290
|
+
vis secrets --affected # scan only files affected by the current branch
|
|
291
|
+
vis secrets --init # scaffold an initial .secrets-baseline.json
|
|
292
|
+
vis secrets --list-rules # print all bundled detection rules
|
|
293
|
+
vis secrets --enable-rule tag:preset:weak-passwords # enable an opt-in rule group additively
|
|
294
|
+
vis secrets --exclude 'dist/**' --exclude-from .secretsignore # extra walker exclusions
|
|
295
|
+
vis secrets --include-rule stripe-access-token # check a single rule
|
|
296
|
+
vis secrets --exclude-rule generic-api-key # drop a noisy rule
|
|
297
|
+
vis secrets --baseline .secrets-baseline.json # suppress triaged findings; print diff
|
|
298
|
+
vis secrets --update-baseline # merge current findings into the baseline
|
|
299
|
+
vis secrets --format sarif > report.sarif # SARIF for GitHub code-scanning
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
**Suppression** — inline (`// gitleaks:allow`), block (`gitleaks:allow-start` … `gitleaks:allow-end`), or a baseline JSON (sole fingerprint store). See the [secret-scanner README](../secret-scanner/README.md#suppression) for details.
|
|
303
|
+
|
|
304
|
+
**CI example** (GitHub Actions, SARIF upload):
|
|
305
|
+
|
|
306
|
+
```yaml
|
|
307
|
+
name: Secrets
|
|
308
|
+
on: [push, pull_request]
|
|
309
|
+
jobs:
|
|
310
|
+
scan:
|
|
311
|
+
runs-on: ubuntu-latest
|
|
312
|
+
permissions: { security-events: write, contents: read }
|
|
313
|
+
steps:
|
|
314
|
+
- uses: actions/checkout@v4
|
|
315
|
+
- uses: pnpm/action-setup@v4
|
|
316
|
+
- run: pnpm install
|
|
317
|
+
- run: pnpm vis secrets --format sarif > report.sarif
|
|
318
|
+
continue-on-error: true
|
|
319
|
+
- uses: github/codeql-action/upload-sarif@v3
|
|
320
|
+
with: { sarif_file: report.sarif }
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
### Migrations
|
|
324
|
+
|
|
325
|
+
`vis migrate` now speaks two security tools:
|
|
326
|
+
|
|
327
|
+
```sh
|
|
328
|
+
vis migrate gitleaks # keeps gitleaks.toml, rewrites scripts/hooks to `vis secrets`
|
|
329
|
+
vis migrate secretlint # removes @secretlint/*, rewrites scripts/hooks, notes active rules
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
Every destructive step writes a `.bak` sidecar first and prompts for confirmation (skip with `-y`). Dry-run previews are available via `--dry-run`.
|
|
333
|
+
|
|
334
|
+
### Running tasks on staged files
|
|
335
|
+
|
|
336
|
+
`vis staged` is a built-in replacement for `lint-staged` — the same config shape, no peer dependency, and an integrated task renderer. Requires Git ≥ 2.32.
|
|
337
|
+
|
|
338
|
+
Declare the patterns and tasks under `staged` in `vis.config.ts`:
|
|
339
|
+
|
|
340
|
+
```ts
|
|
341
|
+
// vis.config.ts
|
|
342
|
+
import { defineConfig } from "@visulima/vis/config";
|
|
343
|
+
|
|
344
|
+
export default defineConfig({
|
|
345
|
+
staged: {
|
|
346
|
+
"*.{ts,tsx}": ["eslint --fix", "prettier --write"],
|
|
347
|
+
"*.md": "prettier --write",
|
|
348
|
+
"package.json": (files) => `sort-package-json ${files.join(" ")}`,
|
|
349
|
+
},
|
|
350
|
+
});
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
Each key is a glob (basename or path-style — path-style matches resolve relative to `cwd`). Each value is one of:
|
|
354
|
+
|
|
355
|
+
- a command string — split into argv, invoked with matched files appended;
|
|
356
|
+
- a `string[]` array — commands run serially for that pattern;
|
|
357
|
+
- a function `(files) => string | string[] | {title, task}` — generate dynamic commands or a custom task;
|
|
358
|
+
- a `{ title, task }` object — runs `task(files)` with no argv construction, useful for in-process side effects.
|
|
359
|
+
|
|
360
|
+
`vis.config.ts` is the single source of truth — no standalone `.lintstagedrc*` or `.vis-staged.*` files are read at runtime. Migrating from lint-staged or nano-staged? Run `vis migrate lint-staged` (or `vis migrate nano-staged`) to move the config in and remove the legacy files.
|
|
361
|
+
|
|
362
|
+
#### Command-line flags
|
|
363
|
+
|
|
364
|
+
```sh
|
|
365
|
+
vis staged # run tasks on the current staged set
|
|
366
|
+
vis staged --verbose # show stdout/stderr on success as well as failure
|
|
367
|
+
vis staged --no-stash # skip the backup stash (faster, but no recovery on failure)
|
|
368
|
+
vis staged --diff HEAD~1 # operate on a range instead of `--staged`
|
|
369
|
+
vis staged --diff-filter=ACM # override the default ACMR filter
|
|
370
|
+
vis staged --concurrent 4 # cap parallel pattern execution
|
|
371
|
+
vis staged --continue-on-error # don't short-circuit on the first failure
|
|
372
|
+
vis staged --fail-on-changes # non-zero exit if tasks modified staged content
|
|
373
|
+
vis staged --hide-unstaged # hide all unstaged edits on tracked files
|
|
374
|
+
vis staged --hide-all # hide unstaged edits AND untracked files
|
|
375
|
+
vis staged --relative # pass paths relative to cwd to tasks
|
|
376
|
+
vis staged --revert # restore pre-task state on failure
|
|
377
|
+
vis staged --allow-empty # allow a commit when tasks revert everything
|
|
378
|
+
vis staged --auto-stage # auto-stage new files tasks create (codegen, lockfile regen, …)
|
|
379
|
+
vis staged --force-kill # kill in-flight tasks with SIGKILL on fast-fail (default: SIGTERM)
|
|
380
|
+
```
|
|
381
|
+
|
|
382
|
+
#### Environment variables
|
|
383
|
+
|
|
384
|
+
| Variable | Description |
|
|
385
|
+
| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
386
|
+
| `VIS_STAGED_CONCURRENT` | Concurrency fallback when `--concurrent` is not passed. Same value shape as the flag (`true`, `false`, or an integer). Useful in CI so you don't repeat the flag on every invocation. |
|
|
387
|
+
|
|
388
|
+
#### How it behaves
|
|
389
|
+
|
|
390
|
+
1. A hidden backup stash is created (via `git stash create` + `git stash store`, so the working tree is untouched).
|
|
391
|
+
2. For partially-staged files, the unstaged delta is captured as a patch and the working tree is reset to the staged content. `--hide-all` extends this to every unstaged change _and_ untracked files via a single `git stash push --include-untracked`.
|
|
392
|
+
3. Tasks run — patterns in parallel (capped at `os.availableParallelism()` by default), commands within a pattern serially.
|
|
393
|
+
4. Task-driven edits are re-staged with `git update-index --again` (with a `git add -u` fallback for deletions), so commits made via pathspec (`git commit -m "…" .`) keep working.
|
|
394
|
+
5. The unstaged patch — or the hide-all stash — is re-applied and the backup stash is dropped on success. On failure without `--revert`, the backup stash is preserved and the recovery sha is surfaced to the user. Ctrl+C aborts in-flight commands and still runs the restore path; a second Ctrl+C exits immediately.
|
|
395
|
+
|
|
396
|
+
#### Migrating from lint-staged
|
|
397
|
+
|
|
398
|
+
```sh
|
|
399
|
+
vis migrate lint-staged # moves the config into vis.config.ts and rewrites hooks
|
|
400
|
+
```
|
|
401
|
+
|
|
402
|
+
The migrator detects `package.json` keys, `.lintstagedrc*` files, and `lint-staged.config.*`, prompts before rewriting husky/vis hooks to call `vis staged`, and removes `lint-staged` from the dependency list.
|
|
99
403
|
|
|
100
404
|
## Documentation
|
|
101
405
|
|
|
@@ -117,6 +421,26 @@ If you would like to help take a look at the [list of issues](https://github.com
|
|
|
117
421
|
- [Daniel Bannert](https://github.com/prisis)
|
|
118
422
|
- [All Contributors](https://github.com/visulima/visulima/graphs/contributors)
|
|
119
423
|
|
|
424
|
+
### Migration sources
|
|
425
|
+
|
|
426
|
+
`vis migrate` ports configuration, scripts, and hooks from the following projects. Huge thanks to their authors and maintainers for the prior art that shaped vis's surface area.
|
|
427
|
+
|
|
428
|
+
| Project | Migrates with | Replaces |
|
|
429
|
+
| ---------------------------------------------------------- | ------------------------- | --------------------------- |
|
|
430
|
+
| [Husky](https://github.com/typicode/husky) | `vis hook migrate` | Git hook manager |
|
|
431
|
+
| [lint-staged](https://github.com/lint-staged/lint-staged) | `vis migrate lint-staged` | Pre-commit task runner |
|
|
432
|
+
| [nano-staged](https://github.com/usmanyunusov/nano-staged) | `vis migrate nano-staged` | Pre-commit task runner |
|
|
433
|
+
| [Turborepo](https://github.com/vercel/turborepo) | `vis migrate turborepo` | Monorepo task runner |
|
|
434
|
+
| [Nx](https://github.com/nrwl/nx) | `vis migrate nx` | Monorepo task runner |
|
|
435
|
+
| [Moon](https://github.com/moonrepo/moon) | `vis migrate moon` | Monorepo task runner |
|
|
436
|
+
| [Gitleaks](https://github.com/gitleaks/gitleaks) | `vis migrate gitleaks` | Secret scanner |
|
|
437
|
+
| [Kingfisher](https://github.com/mongodb/kingfisher) | `vis migrate kingfisher` | Secret scanner (MongoDB) |
|
|
438
|
+
| [Secretlint](https://github.com/secretlint/secretlint) | `vis migrate secretlint` | Secret linter |
|
|
439
|
+
| [Syncpack](https://github.com/JamieMason/syncpack) | `vis migrate syncpack` | Workspace dependency policy |
|
|
440
|
+
| [Sherif](https://github.com/QuiiBz/sherif) | `vis migrate sherif` | Monorepo linter |
|
|
441
|
+
|
|
442
|
+
After migrating a task runner, run `vis migrate verify-graph` to prove the migration preserved the task graph and cache-key surface — it diffs the original `turbo` / `nx` / `moon` config against the generated `vis.config.*` across six axes (target set, `dependsOn`, `inputs`, `outputs`, `env`, `cache`) and exits non-zero on any dropped task or narrowed cache key, so it can gate CI.
|
|
443
|
+
|
|
120
444
|
## Made with ❤️ at Anolilab
|
|
121
445
|
|
|
122
446
|
This is an open source project and will always remain free to use. If you think it's cool, please star it 🌟. [Anolilab](https://www.anolilab.com/open-source) is a Development and AI Studio. Contact us at [hello@anolilab.com](mailto:hello@anolilab.com) if you need any help with these technologies or just want to say hi!
|