companions: add diskpush, and allow an installer that is not npm - #34
Merged
Conversation
`diskpush` browses servers like FileZilla and transfers with rsync — incremental, resumable, and directly between two servers. It belongs in this set for the same reason timer and billing do: it is a command worth having on PATH that this repository should not be implementing. It is not on npm, so `Companion` gains an install method. `npm` is unchanged; `script` pipes an installer into sh the way the project documents it. That is not a lesser arrangement — one command places a desktop application and a CLI together and decides between them by what the machine can actually run, which npm cannot express. Here it installs with `--cli-only`. A command-line toolbelt being set up on a server should not be answered with 100MB of Electron, and the installer would otherwise place the desktop app wherever it finds a desktop session. `installArgs` becomes `installCommand`, returning a command, its arguments and the line a person would type; the caller runs whatever it is handed instead of assuming npm. `source()` gives the package or url for display. The failure message names the real command rather than always saying npm. Verified by running the exact command this generates against a throwaway HOME: it installed diskpush and `diskpush --version` answered 0.1.2. 538 tests pass. `pnpm typecheck` still reports the pre-existing error in src/free-names.ts, which is untouched here and fails the same way on master.
ThreatCrush Security Scan16 finding(s) HIGH/CRITICAL: 5 | MEDIUM: 2 | LOW: 9
Snippets are redacted; ThreatCrush never prints matched credential material. |
ralyodio
added a commit
that referenced
this pull request
Aug 30, 2026
Eight commits since 0.15.0, one of them a new command, so the minor moves. - sysupdate: apt lists, apt packages and snaps in one command, reachable from the pit as /update (#37) - root-ubuntu.sh: a 2G swapfile on a box with no swap at all, plus vm.swappiness=10 (#36) - root-ubuntu.sh: one ssh-agent per user under systemd (#35) - root-ubuntu.sh: lm-sensors, smartmontools and the rest of the hardware inventory set, with sensor detection on bare metal - companions: diskpush, and installers that are not npm (#34) - porkbun: Porkbun's own pre-flight, structured refusals, and the fact that registration spends prepaid credit rather than a card (#32, #33) Claude-Session: https://claude.ai/code/session_013TerE4nvNU3jvS51nRR6Pd Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
diskpushto the companions, and generalises the mechanism so a companioncan come from something other than npm.
Why it is a companion
Same reason as
timerandbilling: a command worth having on PATH that thisrepository should not implement. diskpush.com — browse
servers like FileZilla, transfer with rsync, incremental and resumable, and
directly between two servers.
What changed
Companiongains an install method:npmbehaves exactly as before.scriptpipes the project's own installer intosh. That is not a workaround for not being on npm — one command places adesktop application and a CLI together and decides between them by what the
machine can actually run, which npm cannot express.
installArgsbecomesinstallCommand, returning{ command, args, display },so the caller runs whatever it is handed rather than assuming npm.
source()gives the package or url for display, and a failed install now names the real
command instead of always saying npm.
--cli-onlyDeliberate. A toolbelt being installed on a server should not be answered with
100MB of Electron; the installer would otherwise place the desktop app wherever
it finds a desktop session. Anyone wanting the app runs the installer directly.
Verification
Ran the exact command this generates against a throwaway
HOME:cli-tools companionslists it and reports it as missing/installed correctly.538 tests pass.
pnpm typecheckstill reports the pre-existing error insrc/free-names.ts— untouched here, and it fails the same way onmaster.