@jive-sh/jive 0.2.0 → 0.3.0-latest-darwin-x64
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/multi-call-binary +4 -0
- package/package.json +11 -33
- package/README.md +0 -83
- package/bin/git-credential-jive +0 -617
- package/bin/jive +0 -617
- package/bin/jive-signing-agent +0 -617
- package/bin/jive-ssh-keygen +0 -617
- package/bin/package.json +0 -1
- package/install.cjs +0 -617
package/package.json
CHANGED
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jive-sh/jive",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"license": "MIT",
|
|
3
|
+
"version": "0.3.0-latest-darwin-x64",
|
|
5
4
|
"type": "module",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"os": [
|
|
7
|
+
"darwin"
|
|
8
|
+
],
|
|
9
|
+
"cpu": [
|
|
10
|
+
"x64"
|
|
11
|
+
],
|
|
12
|
+
"files": [
|
|
13
|
+
"multi-call-binary"
|
|
14
|
+
],
|
|
6
15
|
"description": "The Jive CLI: signs you in to Jive, signs your git commits and GitHub pushes with your account's key on the Jive server, and loads repos into a workspace.",
|
|
7
16
|
"repository": {
|
|
8
17
|
"type": "git",
|
|
@@ -11,36 +20,5 @@
|
|
|
11
20
|
"publishConfig": {
|
|
12
21
|
"access": "public",
|
|
13
22
|
"provenance": true
|
|
14
|
-
},
|
|
15
|
-
"files": [
|
|
16
|
-
"README.md",
|
|
17
|
-
"bin",
|
|
18
|
-
"install.cjs"
|
|
19
|
-
],
|
|
20
|
-
"scripts": {
|
|
21
|
-
"postinstall": "node ./install.cjs"
|
|
22
|
-
},
|
|
23
|
-
"bin": {
|
|
24
|
-
"git-credential-jive": "./bin/git-credential-jive",
|
|
25
|
-
"jive": "./bin/jive",
|
|
26
|
-
"jive-signing-agent": "./bin/jive-signing-agent",
|
|
27
|
-
"jive-ssh-keygen": "./bin/jive-ssh-keygen"
|
|
28
|
-
},
|
|
29
|
-
"optionalDependencies": {
|
|
30
|
-
"@jive-sh/jive-darwin-arm64": "npm:@jive-sh/jive@0.2.0-latest-darwin-arm64",
|
|
31
|
-
"@jive-sh/jive-darwin-x64": "npm:@jive-sh/jive@0.2.0-latest-darwin-x64",
|
|
32
|
-
"@jive-sh/jive-linux-arm64": "npm:@jive-sh/jive@0.2.0-latest-linux-arm64",
|
|
33
|
-
"@jive-sh/jive-linux-x64": "npm:@jive-sh/jive@0.2.0-latest-linux-x64",
|
|
34
|
-
"@jive-sh/jive-windows-x64": "npm:@jive-sh/jive@0.2.0-latest-windows-x64"
|
|
35
|
-
},
|
|
36
|
-
"dependencies": {
|
|
37
|
-
"@effect/platform-bun": "^4.0.0",
|
|
38
|
-
"@jive-sh/server-client": "^0.4.0",
|
|
39
|
-
"convex": "^1.48.0",
|
|
40
|
-
"effect": "^4.0.0",
|
|
41
|
-
"effective-modules": "0.3.1-effect4",
|
|
42
|
-
"git-url-parse": "^16.1.0",
|
|
43
|
-
"javascript-time-ago": "^2.6.4",
|
|
44
|
-
"oauth2-cli": "^2.0.0"
|
|
45
23
|
}
|
|
46
24
|
}
|
package/README.md
DELETED
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
# @jive-sh/jive
|
|
2
|
-
|
|
3
|
-
The Jive CLI. It signs you in to Jive, signs your git commits and GitHub pushes with your Jive account's SSH key, which
|
|
4
|
-
lives on [`@jive-sh/server`](https://github.com/jive-sh/server) and never on your machine, and loads repos into a
|
|
5
|
-
workspace. It replaces `@ozyman42/ozy-cli`.
|
|
6
|
-
|
|
7
|
-
This repository also holds Jive's [reusable pipeline](.github/workflows/reusable-pipeline.yml), which every Jive
|
|
8
|
-
package's `pipeline.yml` calls; its contract is [CICD_API.md](CICD_API.md). The CLI itself is built and published by
|
|
9
|
-
[`jive-abstract-library`](https://github.com/jive-sh/jive-abstract-library) like any Jive command package.
|
|
10
|
-
|
|
11
|
-
## Install
|
|
12
|
-
|
|
13
|
-
```sh
|
|
14
|
-
bun add -g @jive-sh/jive
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
Installing registers `jive-signing-agent` to start at login (a LaunchAgent on macOS, a `systemctl --user` unit on
|
|
18
|
-
Linux, a scheduled task on Windows).
|
|
19
|
-
|
|
20
|
-
## Commands
|
|
21
|
-
|
|
22
|
-
| Command | What it does |
|
|
23
|
-
| --- | --- |
|
|
24
|
-
| `jive login` | Signs this machine in to Jive: prints a confirmation code and opens `https://jive.sh/login?request=…`, where you check the code and approve with your jive.sh passkey. |
|
|
25
|
-
| `jive login --cicd` | In a GitHub Actions job with `id-token: write`: exchanges the job's ID token for a session of its pipeline. |
|
|
26
|
-
| `jive whoami` | Prints the Jive account (`<handle>@jive.sh`) this machine is signed in as. |
|
|
27
|
-
| `jive git setup [owner/repo]` | Signs in if needed, has the server create your account's SSH key on first use, registers it on GitHub as an authentication key and a signing key (one GitHub sign-in in the browser), and configures the current repository and every submodule checked out under it to sign commits and tags with it and push through the signing agent. With `owner/repo` it clones that repo first, over SSH, with its submodules. |
|
|
28
|
-
| `jive load <org> <repo>` | Clones a GitHub repo into the workspace as a submodule, configures it the same way, then `bun install` and `bun link` it. |
|
|
29
|
-
| `jive unload <org> <repo>` | Removes a loaded repo. |
|
|
30
|
-
| `jive on <org> <repo> -- <command…>` | Runs a command in a loaded repo's directory; its exit code is jive's. |
|
|
31
|
-
| `jive daemons` | Lists every Jive daemon registered on this machine, with its state, executable and log. |
|
|
32
|
-
| `jive upgrade` | Upgrades jive with the package manager that installed it. |
|
|
33
|
-
|
|
34
|
-
`jive --help`, `--version` and Tab completion (`jive --setup-completion`) work as for every command built with
|
|
35
|
-
`jive-abstract-library`'s `Cli`. `jive init` and `jive create` are still stubs.
|
|
36
|
-
|
|
37
|
-
## How signing works
|
|
38
|
-
|
|
39
|
-
1. **Sessions.** A session is obtained only by a person's passkey (`jive login`, or the agent asking when it needs
|
|
40
|
-
one) or, for a pipeline, by exchanging its GitHub OIDC token (`jive login --cicd`, which calls the server's
|
|
41
|
-
`pipelineSessions:signIn` with an ID token minted for `https://api.jive.sh`). There is no other way: no pasted tokens and no local keys. `jive login` opens a sign-in request
|
|
42
|
-
(`signInRequests:open`), shows its code and page, and claims the session (`signInRequests:claim`) every 2 seconds
|
|
43
|
-
until you approve it. The session token goes to `~/.jive/session.json`, readable by you only. A session lasts 12
|
|
44
|
-
hours.
|
|
45
|
-
2. **The key.** `ssh:createKey` makes your account's ed25519 key on the server the first time and returns its public
|
|
46
|
-
key, which jive keeps at `~/.jive/ssh/account.pub`. The private key never leaves the server.
|
|
47
|
-
3. **The agent.** `jive-signing-agent` serves the SSH agent protocol on `~/.jive/signing-agent.sock` (owner-only). It
|
|
48
|
-
lists the public key and forwards each sign request's bytes to `ssh:sign` with the session token, returning the
|
|
49
|
-
server's signature. With no live session it opens a sign-in request itself: it opens the page and, on macOS,
|
|
50
|
-
shows the code in a notification. A session the server revoked early is dropped and signed in again once. A
|
|
51
|
-
second installed copy of jive finds the first agent's pidfile (`~/.jive/signing-agent.pid`) and stands down.
|
|
52
|
-
4. **Git.** `jive git setup` and `jive load` set, per repository: `user.signingKey` to the public key file,
|
|
53
|
-
`gpg.format=ssh`, `gpg.ssh.program` to `jive-ssh-keygen` (ssh-keygen pointed at the agent's socket),
|
|
54
|
-
`commit.gpgSign` and `tag.gpgSign`, and `core.sshCommand` to ssh with the agent as `IdentityAgent`. Your
|
|
55
|
-
`~/.ssh/config` is left alone, so github.com connections outside these repositories are unchanged.
|
|
56
|
-
|
|
57
|
-
Signing needs `ssh-keygen` (OpenSSH) on PATH, as git's own SSH signing does.
|
|
58
|
-
|
|
59
|
-
## Workspaces
|
|
60
|
-
|
|
61
|
-
`jive load`, `unload` and `on` work in a workspace: the nearest directory holding a `.jive/` directory. Loaded repos
|
|
62
|
-
live at `@<org>/<repo>` under it. The GitHub sign-in a workspace uses for cloning (read through `git-credential-jive`,
|
|
63
|
-
which `jive load` sets as each repo's credential helper) is kept in `.jive/users/`. Loaded repos fetch over HTTPS and
|
|
64
|
-
push over SSH.
|
|
65
|
-
|
|
66
|
-
## Developing
|
|
67
|
-
|
|
68
|
-
```sh
|
|
69
|
-
bun install
|
|
70
|
-
bun run jive:cicd:audit # type check and tests
|
|
71
|
-
bun run install:local # build with the jive-abstract-library checkout beside this one, install globally
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
Tests never reach jive.sh, the server or GitHub: the signing agent's tests run the real `ssh-keygen` and `ssh-add`
|
|
75
|
-
against the agent with a fake server, and the workspace tests use local bare repos.
|
|
76
|
-
|
|
77
|
-
## Direction
|
|
78
|
-
|
|
79
|
-
- `jive provision <kind> <instance>` (e.g. `jive provision connector-package-registry @jive-sh/server-client`): makes sure a
|
|
80
|
-
resource instance exists, the organization's configuration on the server picking the implementation. Waits on the
|
|
81
|
-
server's provision call; jive-abstract-library's deploy hook will then run `jive login --cicd` and `jive provision`
|
|
82
|
-
instead of calling `packages:provision` itself.
|
|
83
|
-
- Repo creation from an abstract: `jive create <kind>` resolves `jive-abstract-<kind>`.
|