feat(cli): add jss install <name> subcommand (Phase 1 of #464) - #479
Merged
Conversation
Direct port of jspod's `runInstall` (~120 LoC) into a JSS-native subcommand. Server operators using `jss start` no longer need to drop to a wrapper to get the install command. jss install chrome jss install vellum pdf hub jss install chrome --pod http://other.host:5444 Behavior: - Resolves <name> to https://github.com/solid-apps/<name> - Full git clone (no --depth — shallow pushes are rejected on git-receive) - Dual push (HEAD:main + HEAD:gh-pages) so it works regardless of the operator's init.defaultBranch - Skip-on-existing-non-repo paths with a friendly ⊘ message - Idempotent on re-run (existing repo accepts the push normally) - Per-app status output (✓ / ⊘ / ✗), summary line, exit 1 if any failed Auth via `POST <pod>/idp/credentials`. `--pod` / `--user` / `--password` flags; password also reads JSS_SINGLE_USER_PASSWORD env. If the IDP isn't running (--public mode), the install proceeds without a token. Verified end-to-end against a fresh `jss start` pod: - install chrome → /public/apps/chrome/index.html 200 - install vellum pdf (multi-arg) - install chrome (re-run, idempotent) - install ../etc/passwd → validation error, exit 1 - install nonexistent-name → clone-fails, exit 1 - install chrome --password wrong → auth-fails, exit 1 Phases 2-6 (full spec, --did, --nostr-privkey, curated set, --bundle) build on this same atom. See #464 comment for the roadmap. Fixes #478
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.
Fixes #478. Phase 1 of the phased install plan (#464 comment).
What
`jss install ` clones `github.com/solid-apps/` and pushes it into the running pod at `/public/apps//`. Server operators using `jss start` directly no longer need a wrapper to install Solid apps.
```bash
jss install chrome
jss install vellum pdf hub # multi-arg
jss install chrome --pod http://other.host:5444 # remote pod
```
Implementation
Direct port of jspod's proven `runInstall` (~120 LoC). New file: `src/cli/install.js` exporting `runInstall(names, options)`. Subcommand wired into `bin/jss.js` via commander `.command('install <names...>')`.
The hard infrastructure (git auto-init `-b main`, regular-repo extraction via `updateInstead`, ACL-gated push) already lives in JSS — this is just the orchestration layer.
Behavior
Flags
Verified end-to-end against a fresh `jss start`
Depends on
Not in scope (later phases of #464)
Diff