@brainervirus/workit-cli 6.0.0 → 7.0.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.
Files changed (3) hide show
  1. package/README.md +14 -103
  2. package/dist/index.js +58190 -57713
  3. package/package.json +4 -4
package/README.md CHANGED
@@ -1,113 +1,24 @@
1
1
  # @brainervirus/workit-cli
2
2
 
3
3
  [![CI](https://github.com/BrainerVirus/workit/actions/workflows/ci.yml/badge.svg)](https://github.com/BrainerVirus/workit/actions/workflows/ci.yml)
4
- [![npm version](https://img.shields.io/npm/v/@brainervirus/workit-cli.svg)](https://www.npmjs.com/package/@brainervirus/workit-cli)
5
- [![license: MIT](https://img.shields.io/badge/license-MIT-green.svg)](../../LICENSE)
4
+ [![npm](https://img.shields.io/npm/v/@brainervirus/workit-cli.svg)](https://www.npmjs.com/package/@brainervirus/workit-cli)
5
+ [![license: MIT](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/BrainerVirus/workit/blob/main/LICENSE)
6
6
 
7
- The workit CLI — an interactive Ink wizard that configures workit for OpenCode, Cursor, Codex and Pi, plus upgrade tooling and an offline installation doctor.
8
-
9
- ## Requirements
10
-
11
- - **Node.js ≥ 24** — the published CLI is a self-contained Node bundle (no Bun runtime). Node 23 and below fail (`ERR_MODULE_NOT_FOUND`/ESM syntax or the `>=24` engine gate).
12
-
13
- ## Install
7
+ The `workit` command: setup wizard, doctor and upgrades, plus the delivery
8
+ verbs agents use (`check`, `ledger`, `git`, `pr`, `ci`, `stack`,
9
+ `verify-delivery`, `grant`, `task`, …). Requires Node.js 24+; the published
10
+ CLI is a self-contained Node bundle.
14
11
 
15
12
  ```bash
16
13
  npm i -g @brainervirus/workit-cli
17
- # or run without installing:
18
- npx @brainervirus/workit-cli init
19
- ```
20
-
21
- ## Usage
22
-
23
- ```bash
24
- workit init # basic / advanced setup wizard
25
- workit upgrade [--hosts=opencode,cursor,codex,pi] [--cli] [--preview | --apply --confirm] [--json]
26
- workit launch <opencode|cursor|codex|pi> [--auto-upgrade] [-- host arguments]
27
- workit doctor # offline installation health report
28
- workit doctor --json # machine-readable report
29
- workit <family> <action> [--payload <json|@file|->] [--task <id>] [--revision <uuid>] [--workspace-revision <uuid|null>] [--view full] [--actor <id>] [--json]
30
- workit grant show [<workspace>] [--all] # effective autonomy grants
31
- workit grant set <workspace> <kind>=<true|false|verified>… [defaultEndpoint=commit|pr]
32
- workit grant unset <workspace> <kind>…
33
- workit youtrack note <ISSUE> (--markdown <t>|--file <p>) [--minutes n] [--date auto|YYYY-MM-DD]
34
- workit youtrack time|meeting <ISSUE> --minutes n [--text t] [--date …]
35
- workit changelog apply (--entries <JSON|@file|->|--normalize-only) [--path CHANGELOG.md] [--preview]
36
- workit handoff --task <id> [--json] # export task state and compact destination context
37
- workit check <name> | workit check [--name <n>] [--shell] [--timeout <s>] [--task <id>] [--json] -- <cmd…> # run a check, record CLI-observed evidence (exit = the command's)
38
- workit uninstall # remove host registrations (keeps ~/.config/workit)
39
- workit # help
40
- ```
41
-
42
- `workit init` guides you through: detected host selection, basic global config (locale, branch policy), optional advanced commit policy, YouTrack, VCS, workspaces (scoped hosting/tracker/branch/commit rules, profiles and release tracks), and project hygiene files. The wizard is a TTY application — `workit init` requires an interactive terminal and prints guidance (exiting nonzero) when stdin is not a TTY.
43
-
44
- Authenticate GitHub or GitLab with `gh auth login` or `glab auth login` before hosting actions; Workit does not need a second provider token file. Non-Git directories can host tasks for OS work; YouTrack keeps its own permanent token.
45
-
46
- The platforms step lists all four supported hosts. Installed tools are selected
47
- initially; absent tools are disabled. Select all available, clear all, or pick
48
- individual hosts. Apply uses native Codex marketplace and Pi package commands,
49
- OpenCode registration, and a managed Cursor plugin copy. Existing explicit/local
50
- pins and unrelated host settings are preserved.
51
-
52
- Advanced workspace edits preserve existing custom fields. Narrow globs win over
53
- broader matches independent of file order; equal-specificity ambiguity is
54
- reported. A sample-checkout preview shows the selected scope and effective
55
- policy source. GitHub and GitLab can both use YouTrack; GitHub Issues requires
56
- GitHub. Inheritance removes an override instead of freezing global defaults.
57
-
58
- `workit upgrade` previews targeted native package updates and known configuration
59
- migrations. `--apply --confirm` backs up configuration, rejects stale previews,
60
- and verifies the installed version. Local/exact pins are skipped; `--cli` also
61
- updates an existing global npm CLI (`--hosts=none` targets only the CLI). For ephemeral use, invoke
62
- `npx @brainervirus/workit-cli@latest`. JSONC OpenCode configuration currently
63
- requires native inspection rather than automatic mutation.
64
-
65
- OpenCode 2.0.21 cannot target a server plugin with its `plugin update` command
66
- (verified in the official Docker image). Workit reports that limitation and
67
- preserves the OpenCode registration; it never falls back to updating every
68
- plugin or deleting caches. OpenCode package resolution remains host-owned.
69
- Cursor, Codex and Pi use their supported scoped update paths.
70
-
71
- `workit launch <host> --auto-upgrade -- <args>` performs optional upgrades before
72
- launch. Stop other selected host instances first. Registry failure starts the
73
- unchanged host with a warning; installer or verification failure prevents launch.
74
- No startup hook updates an already loaded plugin, and no task-history migration
75
- or host-permission change is performed.
76
-
77
- `workit doctor` checks the offline installation health and exits nonzero when problems are found; `--json` prints the full report as JSON instead of the human-readable table.
78
-
79
- The task surface exposes the seven shared operation families (`task`, `policy`,
80
- `evidence`, `finding`, `decision`, `worker`, and `state`) and their closed
81
- actions. Payloads can be inline JSON, a UTF-8 `@file`, or UTF-8 stdin
82
- with `-`; `--json` preserves the structured Result shape and exits nonzero for
83
- failures. Task-family mutations ask no consent prompt; `--confirm` is accepted
84
- and ignored. `workit handoff --task` is read-only and refuses to
85
- emit a handoff when export and inspection revisions differ.
86
-
87
- Delivery authority is the host's own permission system plus per-workspace
88
- autonomy grants in `~/.config/workit/workspaces.json` (see the root README).
89
- `workit grant set` raises a grant only for a user at an interactive terminal who
90
- types the workspace name; headless or agent shells get `blocked` with the
91
- command to give the user. Lowering is always allowed, and writes keep a
92
- `workspaces.json.bak`. The `youtrack` and `changelog` verbs are gated by host
93
- permission only. Workit 5.0 removed `workit action` and the checkout lease verb.
94
-
95
- ## Behavior
96
-
97
- - **Safe apply semantics** — a malformed `config.json` is detected before the wizard renders and reported as a friendly blocked output instead of crashing; the same guard runs after the Apply preview.
98
- - **Stable interaction** — unchanged wizard inputs are no-ops; they settle without React render warnings and never discard draft state.
99
- - **Clean terminal** — only `warn`/`error` diagnostics print to stderr; routine structured `info` records stay in the JSONL journal. Nonzero failures and human-readable errors remain visible.
100
- - **Node support** — the packed CLI runs on Node 24+; installation on Node 24 emits no engine warning from workit's dependency tree.
101
-
102
- ## Package scripts
103
-
104
- ```bash
105
- bun run build # bundle dist/index.js (self-contained, Node shebang) + assets
106
- bun run typecheck # tsc --noEmit
14
+ workit init # interactive setup for Claude Code, OpenCode, Cursor, Codex and Pi
15
+ workit doctor # offline installation health
16
+ workit help # every verb; `workit help <verb>` for one
107
17
  ```
108
18
 
109
- The build produces a nonsplitting `dist/index.js` with a portable `#!/usr/bin/env node` shebang and copies the deterministic `assets/` (templates) from core.
110
-
111
- ## Docs
19
+ Or run once without installing: `npx @brainervirus/workit-cli init`.
112
20
 
113
- Full usage: https://github.com/BrainerVirus/workit#readme
21
+ See the root [README](https://github.com/BrainerVirus/workit) for concepts and the
22
+ [CLI reference](https://github.com/BrainerVirus/workit#cli-reference), and the
23
+ [guides](https://github.com/BrainerVirus/workit/tree/main/docs/guides) for verification, delivery, grants and
24
+ configuration.