Skip to content

map --json for programs; --file reads another hostshift.yaml - #14

Merged
oxyc merged 1 commit into
masterfrom
feat/map-json
Nov 8, 2026
Merged

oxyc merged 1 commit into
masterfrom
feat/map-json

Conversation

@oxyc

@oxyc oxyc commented Nov 8, 2026

Copy link
Copy Markdown
Member
  • hostshift map --json prints an object: the layer the map came from (file, ddev or flags), its source, and each site's name, canonical, base and aliases, plus the variant when --slug is given. Without a slug it lists the sites instead of failing, so a program can read a file's canonicals and bases. Breaking: it used to print an array; nothing in this repo or the add-on read it.
  • --file <path> resolves from a hostshift.yaml other than the checkout's, and --file - reads it from stdin, so a caller can pass one commit's file (git show <sha>:hostshift.yaml | hostshift map --json --file - -C /) without writing it into a working tree. rewrite refuses -, since its stdin is the body.
  • hostshift hosts --json prints the hostnames as one array.
  • A go install build reports its module version instead of dev.
  • README: a new section, "Reading the map from a program".

foreman's db-pull uses this in place of its own hostshift.yaml parser, and needs it released as v0.3.0.

make test and make vet pass.

🤖 Generated with Claude Code

… another hostshift.yaml

map --json is now an object: the layer the map came from (file, ddev or
flags), its source, and the sites with name, canonical, base, aliases and,
when a slug is given, variant. Without a slug it lists the sites instead of
failing, so a caller can read a file's canonicals and bases.

--file <path> resolves from a hostshift.yaml other than the checkout's, and
--file - from stdin, so a program can hand over one commit's file without
writing it into a working tree. rewrite refuses -, since stdin is its body.

hosts --json prints the hostnames as one array. A go-installed binary
reports its module version instead of dev.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@oxyc
oxyc merged commit 52114af into master Nov 8, 2026
4 checks passed
@oxyc
oxyc deleted the feat/map-json branch November 8, 2026 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants