@vlandoss/run-run 0.5.1 → 0.5.2
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 +54 -10
- package/dist/cli.usage.kdl +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -18,7 +18,7 @@ CLI toolbox to fullstack common scripts in [Variable Land](https://variable.land
|
|
|
18
18
|
## Installation
|
|
19
19
|
|
|
20
20
|
```sh
|
|
21
|
-
pnpm add @vlandoss/run-run
|
|
21
|
+
pnpm add -D @vlandoss/run-run
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
It adds the `rr` command to your project.
|
|
@@ -28,39 +28,83 @@ It adds the `rr` command to your project.
|
|
|
28
28
|
Run the help command:
|
|
29
29
|
|
|
30
30
|
```sh
|
|
31
|
-
rr help
|
|
31
|
+
pnpm rr help
|
|
32
32
|
```
|
|
33
33
|
|
|
34
|
+
> If you have `node_modules/.bin` on your `PATH` (e.g. via `mise` or `direnv` — see [Shell completion](#shell-completion)), you can drop the `pnpm` prefix and invoke `rr` directly.
|
|
35
|
+
|
|
34
36
|
See [`CLI.md`](./CLI.md) for the full reference (auto-generated per release).
|
|
35
37
|
|
|
36
38
|
## Shell completion
|
|
37
39
|
|
|
38
|
-
`rr` ships a `completion` subcommand that prints a shell-specific script.
|
|
40
|
+
`rr` ships a `completion` subcommand that prints a shell-specific script.
|
|
41
|
+
Pick the option that matches your setup.
|
|
42
|
+
|
|
43
|
+
### Option A — with `mise` or `direnv` (recommended)
|
|
44
|
+
|
|
45
|
+
If your tooling puts `node_modules/.bin` on `PATH` per-project, `rr` resolves at shell startup and completion picks up new commands automatically on each new shell. Examples:
|
|
46
|
+
|
|
47
|
+
```toml
|
|
48
|
+
# mise.toml
|
|
49
|
+
[env]
|
|
50
|
+
_.path = ["{{config_root}}/node_modules/.bin"]
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
```sh
|
|
54
|
+
# .envrc (direnv)
|
|
55
|
+
PATH_add node_modules/.bin
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Then add a guarded eval to your shell rc — the guard makes it a no-op when you open a shell outside any project:
|
|
39
59
|
|
|
40
60
|
```sh
|
|
41
61
|
# zsh — ~/.zshrc
|
|
42
|
-
eval "$(rr completion zsh)"
|
|
62
|
+
command -v rr >/dev/null 2>&1 && eval "$(rr completion zsh)"
|
|
43
63
|
|
|
44
64
|
# bash — ~/.bashrc
|
|
45
|
-
eval "$(rr completion bash)"
|
|
65
|
+
command -v rr >/dev/null 2>&1 && eval "$(rr completion bash)"
|
|
46
66
|
|
|
47
67
|
# fish — ~/.config/fish/config.fish
|
|
48
|
-
rr completion fish | source
|
|
68
|
+
command -v rr >/dev/null 2>&1; and rr completion fish | source
|
|
49
69
|
```
|
|
50
70
|
|
|
51
|
-
|
|
71
|
+
### Option B — without a per-project PATH manager
|
|
72
|
+
|
|
73
|
+
Cache the completion script once, then source the cached file from your shell rc. Run the generation step from inside a project that has `@vlandoss/run-run` installed:
|
|
74
|
+
|
|
75
|
+
```sh
|
|
76
|
+
mkdir -p ~/.cache
|
|
77
|
+
pnpm exec rr completion zsh > ~/.cache/rr-completion.zsh
|
|
78
|
+
pnpm exec rr completion bash > ~/.cache/rr-completion.bash
|
|
79
|
+
pnpm exec rr completion fish > ~/.cache/rr-completion.fish
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
```sh
|
|
83
|
+
# zsh — ~/.zshrc
|
|
84
|
+
[ -f ~/.cache/rr-completion.zsh ] && source ~/.cache/rr-completion.zsh
|
|
85
|
+
|
|
86
|
+
# bash — ~/.bashrc
|
|
87
|
+
[ -f ~/.cache/rr-completion.bash ] && source ~/.cache/rr-completion.bash
|
|
88
|
+
|
|
89
|
+
# fish — ~/.config/fish/config.fish
|
|
90
|
+
test -f ~/.cache/rr-completion.fish; and source ~/.cache/rr-completion.fish
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Regenerate the cache after upgrading `@vlandoss/run-run` to pick up new commands.
|
|
94
|
+
|
|
95
|
+
### Prerequisite
|
|
96
|
+
|
|
97
|
+
The [`usage`](https://usage.jdx.dev) CLI must be on your `PATH` (it powers completion at runtime). Install via one of:
|
|
52
98
|
|
|
53
99
|
```sh
|
|
54
100
|
mise use -g usage
|
|
55
101
|
brew install usage
|
|
56
102
|
```
|
|
57
103
|
|
|
58
|
-
When you upgrade `@vlandoss/run-run`, the next shell session will pick up new commands automatically — no need to re-run anything.
|
|
59
|
-
|
|
60
104
|
## Troubleshooting
|
|
61
105
|
|
|
62
106
|
To enable debug mode, set the `DEBUG` environment variable to `run-run:*` before running *any* command.
|
|
63
107
|
|
|
64
108
|
```sh
|
|
65
|
-
DEBUG=run-run:* rr <command>
|
|
109
|
+
DEBUG=run-run:* pnpm rr <command>
|
|
66
110
|
```
|
package/dist/cli.usage.kdl
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @generated by @usage-spec/commander from Commander.js metadata
|
|
2
2
|
name rr
|
|
3
3
|
bin rr
|
|
4
|
-
version "0.5.
|
|
4
|
+
version "0.5.2"
|
|
5
5
|
usage "[options] <command...>"
|
|
6
6
|
flag --usage help="print KDL spec for this CLI (https://kdl.dev)"
|
|
7
7
|
cmd completion help="print shell completion script 🐚 (usage)" {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vlandoss/run-run",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.2",
|
|
4
4
|
"description": "The CLI toolbox to fullstack common scripts in Variable Land",
|
|
5
5
|
"homepage": "https://github.com/variableland/dx/tree/main/packages/run-run#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -63,8 +63,8 @@
|
|
|
63
63
|
"rimraf": "6.1.3",
|
|
64
64
|
"tsdown": "0.21.10",
|
|
65
65
|
"typescript": "6.0.3",
|
|
66
|
-
"@vlandoss/
|
|
67
|
-
"@vlandoss/
|
|
66
|
+
"@vlandoss/loggy": "0.2.0",
|
|
67
|
+
"@vlandoss/clibuddy": "0.5.0"
|
|
68
68
|
},
|
|
69
69
|
"devDependencies": {
|
|
70
70
|
"@vlandoss/tsdown-config": "^0.0.1"
|