Skip to content

feat(packages): add host CLI gaps; fix psmux cheatsheet flattening#119

Merged
Gerrrt merged 2 commits into
mainfrom
claude/dotfiles-windows-missing-tools-75f891
Jul 15, 2026
Merged

feat(packages): add host CLI gaps; fix psmux cheatsheet flattening#119
Gerrrt merged 2 commits into
mainfrom
claude/dotfiles-windows-missing-tools-75f891

Conversation

@Gerrrt

@Gerrrt Gerrrt commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

Summary

Two independent changes, both scoped to the host layer.

1. Six host CLI tools filling genuine gaps (packages/scoopfile.json)

Audited the current scoop/winget manifests against a mature shell-first Windows host. The stack is already very complete, so these are deliberately non-redundant — each fills a hole rather than duplicating an existing tool. All are in scoop main:

Tool Fills Not redundant with
lsd ls (eza fallback) Already documented in docs/TOOLS.md as the eza fallback but was never actually installed — this resolves that drift.
gsudo sudo for Windows In-session cached elevation (gsudo !!); covers Win10 where native sudo is absent.
watchexec run-on-file-change viddy only does interval re-runs — this is the change-driven complement.
trippy (trip) mtr / traceroute TUI gping/doggo don't do hop/path analysis.
ast-grep (sg) structural code search/replace rg/sd are line/regex; this is AST-aware.
jless interactive JSON/YAML viewer jq/yq/gron only transform; this browses + folds.

Documented in docs/TOOLS.md under a new "Mid-2026 additions" table.

Lockfile note: these are added to scoopfile.json but not to packages.lock.json — that file is generator-owned (packages/Update-PackageLock.ps1) and must be re-run on a Windows host to pin the resolved versions. It was intentionally not hand-edited.

2. Fix prefix ? cheatsheet rendering (psmux/scripts/psmux-cheat.ps1)

Symptom: the cheatsheet popup rendered as 3 columns of ~1 character each.

Cause: $rows was built from newline-separated @(...) literals. In PowerShell each inner array on its own line is a separate pipeline statement, so the collecting @() unrolled and flattened them into one big string array. $_[0..2] in the render loop then indexed single characters ('psmux'[0]='p', [1]='s', [2]='m') instead of a row's three fields.

Fix: the leading-comma idiom (,@(...)) on each of the 75 rows wraps each in a 1-element array, so unrolling yields the row intact. Added a comment at the $rows definition documenting why the commas must stay, so a future cleanup doesn't reintroduce the bug.

Testing

No PowerShell runtime available in this environment to execute the cheatsheet; the fix is verified by the flattening semantics described above and the render loop's field indexing ($_[0]/$_[1]/$_[2]). Recommend a quick prefix ? smoke check on a host, plus scoop install of the six new apps and a Update-PackageLock.ps1 run to refresh the lock.

Notes

  • awesome-windows was not used as a source — that repo's CLAUDE.md prohibits AI reading its files to prepare changes. Tool selection came from auditing this repo plus general ecosystem knowledge.
  • The four discretionary CLI tools (watchexec/trippy/ast-grep/jless) are easy to trim if any don't match the workflow; lsd + gsudo are the clear wins.

🤖 Generated with Claude Code

https://claude.ai/code/session_011dsAaWXtMUgrmei7K9KxZw


Generated by Claude Code

Add six non-redundant host CLI tools to scoopfile.json (scoop main):
lsd (the eza-fallback TOOLS.md already documented but wasn't installed),
gsudo (in-session sudo for Windows), watchexec (run-on-file-change),
trippy (mtr/traceroute TUI), ast-grep (structural search/replace), and
jless (interactive JSON/YAML viewer). Documented in docs/TOOLS.md.

Fix psmux/scripts/psmux-cheat.ps1: the prefix ? cheatsheet rendered as
3 columns of ~1 character each. The $rows array used newline-separated
@(...) literals, which PowerShell emits as separate pipeline statements
that the collecting @() flattens into one string array; $_[0..2] then
indexed single characters. Leading-comma idiom (,@(...)) preserves each
row through unrolling; added a comment so it isn't "tidied" away.

packages.lock.json still needs a generator run on a Windows host to pin
the new tools' versions (the lock is generator-owned, not hand-edited).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011dsAaWXtMUgrmei7K9KxZw
Copilot AI review requested due to automatic review settings July 15, 2026 19:56

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR makes two host-layer updates: it expands the Scoop-managed CLI baseline with a small set of additional tools, and it fixes psmux’s prefix ? cheatsheet rendering by preventing $rows from being flattened.

Changes:

  • Add six Scoop apps (lsd, gsudo, watchexec, trippy, ast-grep, jless) to packages/scoopfile.json.
  • Fix psmux/scripts/psmux-cheat.ps1 cheatsheet column rendering by using the leading-comma idiom for each row.
  • Document the additions and the cheatsheet fix in docs/TOOLS.md and CHANGELOG.md.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
psmux/scripts/psmux-cheat.ps1 Prevents row flattening so the cheatsheet renders correct 3-field rows.
packages/scoopfile.json Adds six new Scoop-managed host CLI tools.
docs/TOOLS.md Documents the new host CLI additions and the lockfile workflow note.
CHANGELOG.md Records the new tools and the psmux cheatsheet fix under Unreleased.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/scoopfile.json Outdated
Comment on lines +69 to +73
{ "Name": "lsd", "Source": "main" },
{ "Name": "gsudo", "Source": "main" },
{ "Name": "watchexec", "Source": "main" },
{ "Name": "trippy", "Source": "main" },
{ "Name": "ast-grep", "Source": "main" },
The Packages.Tests drift gate (tests/Packages.Tests.ps1) requires
packages.lock.json to cover exactly the scoopfile app set, so adding
apps without lock entries failed CI (Get-PackageLockDrift → Missing).

- Reconcile packages.lock.json with the five new apps using versions
  read from the ScoopInstaller/Main bucket manifests (the same source
  Update-PackageLock.ps1 queries): ast-grep 0.44.1, gsudo 2.6.1,
  lsd 1.2.0, trippy 0.13.0, watchexec 2.5.1. Re-run the generator on a
  Windows host to confirm against locally-installed versions.
- Drop jless: it is not in the scoop Main or Extras buckets and its
  Windows support is weak; gron/jq already cover JSON viewing. Removed
  from scoopfile.json, docs/TOOLS.md, and CHANGELOG.md.

scoopfile app set now equals lock scoop keys (58/58, no Missing/Orphan).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011dsAaWXtMUgrmei7K9KxZw
@Gerrrt
Gerrrt merged commit 7bb019e into main Jul 15, 2026
6 checks passed
@Gerrrt
Gerrrt deleted the claude/dotfiles-windows-missing-tools-75f891 branch July 15, 2026 21:18
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.

3 participants