@levr-one/cli 0.5.0 → 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.
- package/README.md +41 -6
- package/dist/cli.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -14,14 +14,45 @@ The command-line interface for [Levr](https://www.levr.one). The binary is
|
|
|
14
14
|
## Install
|
|
15
15
|
|
|
16
16
|
```bash
|
|
17
|
-
npm install -g @levr-one/cli #
|
|
18
|
-
# or run once, no install:
|
|
19
|
-
npx @levr-one/cli --help
|
|
17
|
+
npm install -g @levr-one/cli # gives you a persistent `levr` command
|
|
20
18
|
```
|
|
21
19
|
|
|
22
20
|
The package is self-contained — no peer setup required. A global install
|
|
23
21
|
replaces the `levr` bin from the deprecated `@levr-one/setup` package.
|
|
24
22
|
|
|
23
|
+
### Or run it without a global install
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
npx @levr-one/cli --help
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
`npx` is right for one-shot use (`mcp add`, trying a command). Two things to
|
|
30
|
+
expect:
|
|
31
|
+
|
|
32
|
+
- **`levr` will not be on your PATH afterwards.** npx puts the command on PATH
|
|
33
|
+
only for the duration of that one invocation. Shell completion also assumes a
|
|
34
|
+
global install, since the generated script wires up the `levr` command.
|
|
35
|
+
- **It does download the package** — roughly 8 MB into npm's `~/.npm/_npx`
|
|
36
|
+
cache, kept indefinitely. The first run asks `Ok to proceed?`; later runs are
|
|
37
|
+
silent until a new version is published.
|
|
38
|
+
|
|
39
|
+
In scripts and CI, pass `--yes` — **in a terminal the prompt blocks until it is
|
|
40
|
+
answered**, so an unattended run with a TTY hangs rather than failing:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
npx --yes @levr-one/cli push ./test-results.xml
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Two things to get right:
|
|
47
|
+
|
|
48
|
+
- **Always `npx @levr-one/cli`, never `npx levr`.** npx treats the first
|
|
49
|
+
positional as a _package_ name, so `npx levr` would fetch and run whatever
|
|
50
|
+
package is published under the unscoped name `levr` — which is not ours.
|
|
51
|
+
- **npm's flags go before the package name.** `npx @levr-one/cli --yes` passes
|
|
52
|
+
`--yes` to `levr`, not to npm.
|
|
53
|
+
|
|
54
|
+
For reproducible CI, pin `@levr-one/cli` to a version you have validated.
|
|
55
|
+
|
|
25
56
|
## Quick start
|
|
26
57
|
|
|
27
58
|
**Using an AI client?** Wire the Levr MCP server into it — no login needed;
|
|
@@ -203,7 +234,7 @@ levr import ./cases.csv --team-id <uuid> --map "State=labels:state"
|
|
|
203
234
|
env:
|
|
204
235
|
LEVR_TOKEN: ${{ secrets.LEVR_TOKEN }}
|
|
205
236
|
# LEVR_TEAM_ID is optional — server resolves from automation source or workspace default
|
|
206
|
-
run: npx @levr-one/cli push ./test-results.xml
|
|
237
|
+
run: npx --yes @levr-one/cli push ./test-results.xml
|
|
207
238
|
```
|
|
208
239
|
|
|
209
240
|
### GitLab CI
|
|
@@ -211,7 +242,7 @@ levr import ./cases.csv --team-id <uuid> --map "State=labels:state"
|
|
|
211
242
|
```yaml
|
|
212
243
|
push-results:
|
|
213
244
|
script:
|
|
214
|
-
- npx @levr-one/cli push ./test-results.xml
|
|
245
|
+
- npx --yes @levr-one/cli push ./test-results.xml
|
|
215
246
|
variables:
|
|
216
247
|
LEVR_TOKEN: $LEVR_TOKEN
|
|
217
248
|
```
|
|
@@ -220,7 +251,7 @@ push-results:
|
|
|
220
251
|
|
|
221
252
|
```groovy
|
|
222
253
|
withEnv(["LEVR_TOKEN=${LEVR_TOKEN}"]) {
|
|
223
|
-
sh 'npx @levr-one/cli push ./test-results.xml'
|
|
254
|
+
sh 'npx --yes @levr-one/cli push ./test-results.xml'
|
|
224
255
|
}
|
|
225
256
|
```
|
|
226
257
|
|
|
@@ -272,6 +303,10 @@ levr workspace current # show the active workspace
|
|
|
272
303
|
|
|
273
304
|
## Shell completion (optional)
|
|
274
305
|
|
|
306
|
+
Completion needs a global install: the generated script wires up the `levr`
|
|
307
|
+
command, so it does nothing if `levr` is not on your PATH (which it is not when
|
|
308
|
+
you run via `npx`).
|
|
309
|
+
|
|
275
310
|
`levr completion` prints a completion script to **stdout**. It never edits your
|
|
276
311
|
shell config — you choose where the script goes:
|
|
277
312
|
|
package/dist/cli.js
CHANGED