@kaynooo/cli-check 0.10.0 → 0.12.0

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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # check and fix
2
2
 
3
- `check` runs a repo's validation and `fix` its fixers, both showing only what failed, so a Claude Code session spends no tokens on passing output.
3
+ `check` runs a repo's validation and `check --fix` its fixers, both showing only what failed, so a Claude Code session spends no tokens on passing output. `fix` stays installed as the alias of `check --fix`: same options, output and exit codes.
4
4
 
5
5
  ```sh
6
6
  bun install -g @kaynooo/cli-check
@@ -10,6 +10,8 @@ check --only lint,test
10
10
  check --timeout 5m # end a step still running after 5 minutes, exit 2
11
11
  check --slot # queue each step behind the machine-wide slots of `slot` (@kaynooo/cli-wait)
12
12
  check --in app # run every step in this compose service, whatever is detected
13
+ check --failed # run again only the steps that failed in this folder's last run
14
+ check --fix # run the fixers instead, what `fix` does
13
15
  check --host # run on the host even when a compose service mounts the folder
14
16
  check --json # [{name, command, in?, ok, ms, log, failed?}] once every step ran
15
17
  ```
@@ -55,8 +57,12 @@ SIGINT, SIGTERM and SIGHUP go to the running step's whole process group and `che
55
57
 
56
58
  Exit code 0 when every step passed, 1 when one failed, 2 on bad usage, when no step is found or when a step timed out.
57
59
 
60
+ `--failed` reads the last finished run's folder of logs, where each run leaves a `results.json` of its steps' names and results, and runs the steps that failed there again. When that run had none, or there was no run, it says so and exits 2. The re-run leaves its own `results.json`.
61
+
58
62
  ## fix
59
63
 
64
+ `fix` is `check --fix`: `check --fix --only lint:fix` is the same call. `--only` then names fixers, and `--changed`, `--failed` and `--slot` are refused.
65
+
60
66
  ```sh
61
67
  fix # run every fixer that applies to this folder
62
68
  fix --list # print them and their commands
@@ -107,3 +113,22 @@ Turns tsc, tsgo and vue-tsc (plain and pretty), bun check, eslint and keslint (s
107
113
  `--json` prints `{errors: [{tool, file, line, column, rule?, severity, message, test?}], unrecognised, log?, code?}`, `tool` one of `tsc`, `eslint`, `bun check`, `bun test`, `vitest`, `playwright`, `phpunit`, `phpstan`, `php-cs-fixer`, `go`, `cargo`, `ruff` or `pytest`. Lines no format recognised are never dropped silently: their count goes to stderr, with the path of the full log. A command run after `--` has its whole output saved with the same log writer as `out`, and `log` is that file (the file given when a log is read, nothing for stdin). A first argument that is neither an option nor an existing file starts the command, so the `--` is optional. A command runs in the compose service mounting the current folder like a `check` step does (see above), `--in` and `--host` applying only to a command; a service that is down exits 1 with the service named.
108
114
 
109
115
  Exit code 0 when no error was found and the command, if any, passed, 1 when errors were found or the command failed, 2 on bad usage.
116
+
117
+ ## j
118
+
119
+ `j` picks a recipe, script or task of the repo with fzf and runs it.
120
+
121
+ ```sh
122
+ j # pick one; the ones run last come first, per folder
123
+ j test # run it without the picker
124
+ j api/test --watch # a child folder's, the words after the name are its arguments
125
+ j just:check # the one of a runner, when several share the name
126
+ j - # the last one again, with the same arguments
127
+ j --json # list what can run: [{id, key, runner, dir, name, doc, parameters}]
128
+ ```
129
+
130
+ It reads a `justfile`, a `Makefile` (a `## doc` comment above a target or after it documents it), the scripts of a `package.json` (run through the package manager its `packageManager` field or lockfile names), `composer.json` scripts, `deno.json` tasks, a `Taskfile`, mise tasks and a `pyproject.toml` (poe tasks and `[project.scripts]`). The folder's own manifests are looked up the parents as far as the repository root; child folders and workspace packages only count the files they hold, their entries being named `api/test` and run with `env -C api`.
131
+
132
+ A name several entries share opens the picker on those alone, unless it comes qualified by its runner (`just:check`, `bun:api/test`). A required parameter of a recipe not given after the name is asked for. Without fzf or a terminal, `j` lists what can run instead, a note on stderr telling why.
133
+
134
+ Hidden flags for the shell and the tmux integration: `--list` prints the rows term shows as JSON (`label`, `hint`, `typed`, `preview`, `editsTyped`), `--names` the names with a description for the completions (`name<TAB>description`, a qualified form on its own line for a name several runners share), `--show <kind> <dir> <name>` the preview of one, `--record <id> [args...]` notes a run, and `--emit [name] [args...]` prints what tmux_pick reads: `run`, the words typed back, the id to record, then one line per word of the command, `=fixed`, `+given` or `?name` for a parameter to ask.