hostctl 0.1.62 → 0.1.63

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 CHANGED
@@ -113,7 +113,20 @@ Mount SSH keys or AGE identities as needed (for example `-v "$HOME/.ssh:/home/no
113
113
  ```
114
114
 
115
115
  - `-r/--remote` targets hosts selected by tags via SSH.
116
- - `-t/--tag` is greedy; use `--` before positional args when needed.
116
+ - `-t/--tag` specifies a tag filter; repeat for multiple tags.
117
+
118
+ Tag selection uses disjunctive normal form (DNF). Each `-t/--tag` value is a clause. Within a clause, `+` requires every tag (intersection). Multiple `-t` values are OR (union). Commas are literal characters in tag names; use repeated `-t` flags for unions.
119
+
120
+ ```bash
121
+ # Intersection: host must have both tags
122
+ hostctl run -r -t web+prod core.net.interfaces
123
+
124
+ # Union: host may have either tag
125
+ hostctl run -r -t web -t prod core.net.interfaces
126
+
127
+ # Union of intersections
128
+ hostctl run -r -t web+prod -t api+prod core.net.interfaces
129
+ ```
117
130
 
118
131
  - **From npm or git**
119
132
  ```bash
@@ -4043,7 +4043,7 @@ var ParamMap = class _ParamMap {
4043
4043
  import * as z from "zod";
4044
4044
 
4045
4045
  // src/version.ts
4046
- var version = "0.1.62";
4046
+ var version = "0.1.63";
4047
4047
 
4048
4048
  // src/app.ts
4049
4049
  import { retryUntilDefined } from "ts-retry";
@@ -33576,6 +33576,9 @@ function shouldSkipConfig(envValue) {
33576
33576
  function collectConfigHeader(value, previous) {
33577
33577
  return previous.concat(value);
33578
33578
  }
33579
+ function collectTag(value, previous) {
33580
+ return previous.concat(value);
33581
+ }
33579
33582
  function parseHeaderEntry(entry) {
33580
33583
  const index = entry.indexOf(":");
33581
33584
  if (index === -1) {
@@ -33644,7 +33647,7 @@ var Cli = class {
33644
33647
  'additional HTTP config header (repeatable, format: "Header-Name: value")',
33645
33648
  collectConfigHeader,
33646
33649
  []
33647
- ).option("--json", "output should be json formatted").option("-p, --password", "should prompt for sudo password?", false).option("-t, --tag <tags...>", "specify a tag (repeat for multiple tags)");
33650
+ ).option("--json", "output should be json formatted").option("-p, --password", "should prompt for sudo password?", false).option("-t, --tag <tag>", "tag filter (repeatable; use + for intersection)", collectTag, []);
33648
33651
  this.program.command("exec").alias("e").argument(
33649
33652
  "<command...>",
33650
33653
  `the command string to run, with optional arguments (e.g. hostctl exec sudo sh -c 'echo "$(whoami)"')`