@invariant.guru/cli 0.4.4 → 0.5.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.
Files changed (3) hide show
  1. package/README.md +57 -2
  2. package/dist/main.js +914 -865
  3. package/package.json +3 -3
package/README.md CHANGED
@@ -35,14 +35,28 @@ invariant init
35
35
  invariant init --name my-project
36
36
  ```
37
37
 
38
- ### `invariant install [package]`
38
+ ### `invariant install [package...]`
39
39
 
40
- Install a package from the registry.
40
+ Install packages from the registry (or GitHub) and activate their items. If the package already has curated `active` entries in `invariant.json`, exactly those are restored; otherwise all items are added.
41
41
 
42
42
  ```bash
43
43
  invariant install everything-claude-code
44
+
45
+ # Install every package declared in invariant.json (same activation rule per package)
46
+ invariant install
47
+
48
+ # Only cache the package, don't activate anything (pre-0.5 behavior)
49
+ invariant install everything-claude-code --no-add
50
+
51
+ # Run `invariant sync` automatically afterwards
52
+ invariant install everything-claude-code --sync
44
53
  ```
45
54
 
55
+ | Option | Description |
56
+ |--------|-------------|
57
+ | `--no-add` | Only cache the package, do not activate its items |
58
+ | `-s, --sync` | Run `invariant sync` after installing |
59
+
46
60
  ### `invariant add <target> [<target>...]`
47
61
 
48
62
  Activate items from installed packages. Accepts one or more targets.
@@ -59,8 +73,49 @@ invariant add skill:my-pkg/react-expert skill:my-pkg/ts-patterns
59
73
 
60
74
  # Mix types and packages
61
75
  invariant add agent:pkg-a/planner skill:pkg-b/tdd
76
+
77
+ # Run `invariant sync` automatically afterwards
78
+ invariant add everything-claude-code --sync
62
79
  ```
63
80
 
81
+ | Option | Description |
82
+ |--------|-------------|
83
+ | `-s, --sync` | Run `invariant sync` after adding |
84
+
85
+ ### `invariant add-interactive`
86
+
87
+ Interactively select/unselect what's active — like `yarn upgrade-interactive`. Checked rows reflect the current activation state; checking adds, unchecking removes.
88
+
89
+ By default it shows an **item-level tree** grouped per package and item type (agents / skills / commands / rules / contexts / instructions). Package and type rows are headers; you toggle the individual items below them (`space` toggles, `a` toggles all):
90
+
91
+ ```
92
+ nest-clean-architecture@1.0.0 (1/3)
93
+ agents (0/1)
94
+ ◯ architect
95
+ skills (1/2)
96
+ ◉ qweqwe
97
+ ◯ sdgsd
98
+ ```
99
+
100
+ ```bash
101
+ # Item-level tree (default)
102
+ invariant add-interactive
103
+
104
+ # Coarse selection: one checkbox per whole package
105
+ invariant add-interactive --packages
106
+
107
+ # Apply changes and sync immediately
108
+ invariant add-interactive --sync
109
+ ```
110
+
111
+ In `--packages` mode an already-active package left checked is untouched, so a curated partial selection is never silently expanded — use the default item view to manage individual items.
112
+
113
+ | Option | Description |
114
+ |--------|-------------|
115
+ | `-p, --packages` | Select whole packages instead of individual items |
116
+ | `-s, --sync` | Run `invariant sync` after applying changes |
117
+ | `-t, --target <target>` | With `--sync`, sync only to a specific target |
118
+
64
119
  ### `invariant remove <target> [<target>...]`
65
120
 
66
121
  Remove added items (inverse of `add`). The package stays in cache for future use. Accepts one or more targets.