qrlkit 0.12.0 → 0.12.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 +32 -179
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -193,63 +193,25 @@ State is stored in `$XDG_STATE_HOME/qrlkit/state.yaml` on Linux, falling back to
|
|
|
193
193
|
|
|
194
194
|
## Config syntax
|
|
195
195
|
|
|
196
|
-
Each example replaces the previous one.
|
|
197
|
-
|
|
198
|
-
References use their full path, like `{shared.repos}`.
|
|
199
|
-
Strings supply fixed values. Lists offer choices when no value is supplied.
|
|
200
|
-
CLI values follow first-reference order, including lookup inputs.
|
|
201
|
-
Use `args` to declare argument order. Repeated references reuse the same selection.
|
|
202
|
-
|
|
203
196
|
### URLs
|
|
204
197
|
|
|
205
198
|
Open URLs in your default browser.
|
|
206
199
|
|
|
207
200
|
```toml
|
|
208
201
|
[repos]
|
|
209
|
-
|
|
210
|
-
```
|
|
211
|
-
|
|
212
|
-
Choose the repository with an argument.
|
|
213
|
-
|
|
214
|
-
```toml
|
|
215
|
-
[repos]
|
|
216
|
-
open = "https://github.com/qrlkit/{repo}"
|
|
217
|
-
```
|
|
218
|
-
|
|
219
|
-
Reuse an organization.
|
|
220
|
-
|
|
221
|
-
```toml
|
|
222
|
-
[shared]
|
|
223
|
-
hidden = true
|
|
224
|
-
org = "qrlkit"
|
|
225
|
-
|
|
226
|
-
[repos]
|
|
227
|
-
open = "https://github.com/{shared.org}/{repo}"
|
|
228
|
-
```
|
|
229
|
-
|
|
230
|
-
Add hints and override the browser.
|
|
231
|
-
|
|
232
|
-
```toml
|
|
233
|
-
[shared]
|
|
234
|
-
hidden = true
|
|
235
|
-
org = "qrlkit"
|
|
236
|
-
|
|
237
|
-
[repos]
|
|
238
|
-
browser = "firefox"
|
|
239
|
-
# hint: Browse the source code
|
|
240
|
-
open = "https://github.com/{shared.org}/{repo}"
|
|
202
|
+
rs = "https://github.com/qrlkit/qrlkit-rs"
|
|
241
203
|
```
|
|
242
204
|
|
|
243
|
-
|
|
205
|
+
Or go advanced with reuseable constants and hints.
|
|
244
206
|
|
|
245
207
|
```toml
|
|
246
|
-
[
|
|
208
|
+
[const]
|
|
247
209
|
hidden = true
|
|
248
210
|
org = "qrlkit"
|
|
249
211
|
repos = ["qrlkit-rs", "qrlkit-web"]
|
|
250
212
|
|
|
251
213
|
[repos.open]
|
|
252
|
-
url = "https://github.com/{
|
|
214
|
+
url = "https://github.com/{const.org}/{const.repos}"
|
|
253
215
|
hint = "Browse the source code"
|
|
254
216
|
browser = "firefox"
|
|
255
217
|
```
|
|
@@ -273,46 +235,16 @@ Print file paths without configured hooks.
|
|
|
273
235
|
readme = "~/dev/qrlkit-rs/README.md"
|
|
274
236
|
```
|
|
275
237
|
|
|
276
|
-
|
|
238
|
+
Or beef it up with reuseable constants, hints and a custom filehook:
|
|
277
239
|
|
|
278
240
|
```toml
|
|
279
|
-
[
|
|
280
|
-
readme = "~/dev/{repo}/README.md"
|
|
281
|
-
```
|
|
282
|
-
|
|
283
|
-
Reuse your development directory across paths.
|
|
284
|
-
|
|
285
|
-
```toml
|
|
286
|
-
[shared]
|
|
287
|
-
hidden = true
|
|
288
|
-
root = "~/dev"
|
|
289
|
-
|
|
290
|
-
[files]
|
|
291
|
-
readme = "{shared.root}/{repo}/README.md"
|
|
292
|
-
```
|
|
293
|
-
|
|
294
|
-
Add hints and open your editor.
|
|
295
|
-
|
|
296
|
-
```toml
|
|
297
|
-
[shared]
|
|
298
|
-
hidden = true
|
|
299
|
-
root = "~/dev"
|
|
300
|
-
|
|
301
|
-
[files]
|
|
302
|
-
filehook = "nvim $file"
|
|
303
|
-
readme = "{shared.root}/{repo}/README.md" # hint: Edit the project README
|
|
304
|
-
```
|
|
305
|
-
|
|
306
|
-
Offer project choices before opening files.
|
|
307
|
-
|
|
308
|
-
```toml
|
|
309
|
-
[shared]
|
|
241
|
+
[const]
|
|
310
242
|
hidden = true
|
|
311
243
|
root = "~/dev"
|
|
312
244
|
repos = ["qrlkit-rs", "qrlkit-web"]
|
|
313
245
|
|
|
314
246
|
[files.readme]
|
|
315
|
-
url = "{
|
|
247
|
+
url = "{const.root}/{const.repos}/README.md"
|
|
316
248
|
hint = "Edit the project README"
|
|
317
249
|
filehook = "nvim $file"
|
|
318
250
|
```
|
|
@@ -322,52 +254,19 @@ qrlkit files readme qrlkit-rs # Open directly
|
|
|
322
254
|
qrlkit files readme # Choose interactively
|
|
323
255
|
```
|
|
324
256
|
|
|
325
|
-
Set global defaults with `qrlkit set-filehook`.
|
|
326
|
-
|
|
327
257
|
### Dirs
|
|
328
258
|
|
|
329
|
-
|
|
259
|
+
By default you can `cd` into a dir:
|
|
330
260
|
|
|
331
261
|
```toml
|
|
332
262
|
[dirs]
|
|
333
263
|
project = "~/dev/qrlkit-rs"
|
|
334
264
|
```
|
|
335
265
|
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
```toml
|
|
339
|
-
[dirs]
|
|
340
|
-
project = "~/dev/{repo}"
|
|
341
|
-
```
|
|
342
|
-
|
|
343
|
-
Reuse your development directory across projects.
|
|
266
|
+
Or mod it similarly to files and urls with consts, dirhooks and hints:
|
|
344
267
|
|
|
345
268
|
```toml
|
|
346
|
-
[
|
|
347
|
-
hidden = true
|
|
348
|
-
root = "~/dev"
|
|
349
|
-
|
|
350
|
-
[dirs]
|
|
351
|
-
project = "{shared.root}/{repo}"
|
|
352
|
-
```
|
|
353
|
-
|
|
354
|
-
Add hints and list directory contents.
|
|
355
|
-
|
|
356
|
-
```toml
|
|
357
|
-
[shared]
|
|
358
|
-
hidden = true
|
|
359
|
-
root = "~/dev"
|
|
360
|
-
|
|
361
|
-
[dirs]
|
|
362
|
-
dirhook = "cd $dir && tree -L 1"
|
|
363
|
-
# hint: Enter and inspect the project
|
|
364
|
-
project = "{shared.root}/{repo}"
|
|
365
|
-
```
|
|
366
|
-
|
|
367
|
-
Offer project choices before changing directories.
|
|
368
|
-
|
|
369
|
-
```toml
|
|
370
|
-
[shared]
|
|
269
|
+
[const]
|
|
371
270
|
hidden = true
|
|
372
271
|
root = "~/dev"
|
|
373
272
|
repos = ["qrlkit-rs", "qrlkit-web"]
|
|
@@ -383,8 +282,6 @@ qrlkit dirs project qrlkit-rs # Open directly
|
|
|
383
282
|
qrlkit dirs project # Choose interactively
|
|
384
283
|
```
|
|
385
284
|
|
|
386
|
-
Set global defaults with `qrlkit set-dirhook`.
|
|
387
|
-
|
|
388
285
|
### Scripts
|
|
389
286
|
|
|
390
287
|
Run Bash from the config's directory.
|
|
@@ -463,23 +360,6 @@ qrlkit greet Hey
|
|
|
463
360
|
|
|
464
361
|
Supported shells: `bash`, `sh`, and `zsh`.
|
|
465
362
|
|
|
466
|
-
Use a script's output in another resource.
|
|
467
|
-
|
|
468
|
-
```toml
|
|
469
|
-
[system]
|
|
470
|
-
hidden = true
|
|
471
|
-
|
|
472
|
-
[system.hostname]
|
|
473
|
-
run = "hostname"
|
|
474
|
-
|
|
475
|
-
[logs]
|
|
476
|
-
url = "https://logs.example.com/search?host={system.hostname}"
|
|
477
|
-
```
|
|
478
|
-
|
|
479
|
-
Referenced scripts run only when needed. Their stdout is reused within the command,
|
|
480
|
-
with trailing newlines removed. A failed script stops the command.
|
|
481
|
-
Script bodies stay literal; use `args` and `env` to pass values.
|
|
482
|
-
|
|
483
363
|
### Shared values
|
|
484
364
|
|
|
485
365
|
Put shared values in any config and register it with `qrlkit add`.
|
|
@@ -510,71 +390,44 @@ run = 'printf "Hello, %s!\n" "$NAME"'
|
|
|
510
390
|
NAME = "{shared.name}"
|
|
511
391
|
```
|
|
512
392
|
|
|
513
|
-
`constants.toml` is no longer loaded automatically. Register shared values explicitly
|
|
514
|
-
and replace `{global.name}` with their full path. `constants` is now an ordinary group.
|
|
515
|
-
|
|
516
393
|
### Composition
|
|
517
394
|
|
|
518
395
|
Reference another resource's target without opening it.
|
|
519
396
|
|
|
520
397
|
```toml
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
repos = ["qrlkit-rs", "qrlkit-web"]
|
|
524
|
-
|
|
525
|
-
[repos.open]
|
|
526
|
-
url = "https://github.com/qrlkit/{shared.repos}"
|
|
527
|
-
|
|
528
|
-
[repos.prs]
|
|
529
|
-
url = "{repos.open}/pulls"
|
|
530
|
-
```
|
|
531
|
-
|
|
532
|
-
```sh
|
|
533
|
-
repos prs qrlkit-web # Opens the repository's pull requests
|
|
534
|
-
repos prs # Choose the repository
|
|
398
|
+
# Reference another QRL's value or URL
|
|
399
|
+
url = "{project.home}/issues"
|
|
535
400
|
```
|
|
536
401
|
|
|
537
|
-
Missing references and circular dependencies are errors.
|
|
538
|
-
|
|
539
|
-
### Lookups
|
|
540
|
-
|
|
541
|
-
Choose a URL part from a mapping. Use one selector for a flat mapping,
|
|
542
|
-
or multiple selectors to walk nested mappings.
|
|
543
|
-
|
|
544
402
|
```toml
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
[shared]
|
|
550
|
-
hidden = true
|
|
551
|
-
environments = ["sim", "live"]
|
|
403
|
+
# Use a script's output
|
|
404
|
+
[branch]
|
|
405
|
+
run = "git branch --show-current"
|
|
552
406
|
|
|
553
|
-
[
|
|
554
|
-
url = "
|
|
555
|
-
|
|
556
|
-
[logs.subdomains]
|
|
557
|
-
hidden = true
|
|
407
|
+
[compare]
|
|
408
|
+
url = "{project.home}/compare/main...{branch}"
|
|
409
|
+
```
|
|
558
410
|
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
411
|
+
```toml
|
|
412
|
+
# Look up a value using one selector
|
|
413
|
+
[project]
|
|
414
|
+
environment = ["staging", "production"]
|
|
562
415
|
|
|
563
|
-
[
|
|
564
|
-
|
|
565
|
-
live = "web-production"
|
|
416
|
+
[open]
|
|
417
|
+
url = "https://{hosts[project.environment]}.example.com"
|
|
566
418
|
```
|
|
567
419
|
|
|
568
|
-
|
|
420
|
+
```toml
|
|
421
|
+
# Walk a nested mapping using multiple selectors
|
|
422
|
+
[project]
|
|
423
|
+
name = ["api", "web"]
|
|
424
|
+
environment = ["staging", "production"]
|
|
569
425
|
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
logs qrlkit-rs # Choose the environment
|
|
573
|
-
logs # Choose the repository and environment
|
|
426
|
+
[open]
|
|
427
|
+
url = "https://{hosts[project.name, project.environment]}.example.com"
|
|
574
428
|
```
|
|
575
429
|
|
|
576
|
-
Missing
|
|
577
|
-
use `--` before a value that matches a child command's name.
|
|
430
|
+
Missing references and circular dependencies are errors.
|
|
578
431
|
|
|
579
432
|
### Hints and hidden groups
|
|
580
433
|
|
package/package.json
CHANGED
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
"README.md"
|
|
10
10
|
],
|
|
11
11
|
"optionalDependencies": {
|
|
12
|
-
"qrlkit-darwin-arm64": "0.12.
|
|
13
|
-
"qrlkit-darwin-x64": "0.12.
|
|
14
|
-
"qrlkit-linux-arm64": "0.12.
|
|
15
|
-
"qrlkit-linux-x64": "0.12.
|
|
12
|
+
"qrlkit-darwin-arm64": "0.12.1",
|
|
13
|
+
"qrlkit-darwin-x64": "0.12.1",
|
|
14
|
+
"qrlkit-linux-arm64": "0.12.1",
|
|
15
|
+
"qrlkit-linux-x64": "0.12.1"
|
|
16
16
|
},
|
|
17
17
|
"os": [
|
|
18
18
|
"linux",
|
|
@@ -34,5 +34,5 @@
|
|
|
34
34
|
"bugs": {
|
|
35
35
|
"url": "https://github.com/qrlkit/qrlkit-rs/issues"
|
|
36
36
|
},
|
|
37
|
-
"version": "0.12.
|
|
37
|
+
"version": "0.12.1"
|
|
38
38
|
}
|