@jive-sh/jive 0.5.1-latest-darwin-x64 → 0.5.1
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/README.md +92 -0
- package/bin/git-credential-jive +617 -0
- package/bin/jive +617 -0
- package/bin/jive-signing-agent +617 -0
- package/bin/jive-ssh-keygen +617 -0
- package/bin/package.json +1 -0
- package/install.cjs +617 -0
- package/package.json +32 -11
- package/multi-call-binary +0 -4
package/README.md
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# Jive
|
|
2
|
+
|
|
3
|
+
Jive is a developer platform and an agentic workforce platform.
|
|
4
|
+
|
|
5
|
+
- **Developer platform:** the `jive` CLI in this repository; the CI/CD pipeline every Jive package runs (its
|
|
6
|
+
[reusable workflow](.github/workflows/reusable-pipeline.yml) lives here, its contract in [CICD_API.md](CICD_API.md));
|
|
7
|
+
and resource provisioning, which makes sure each resource a package declares exists in its organization.
|
|
8
|
+
- **Agentic workforce platform:** workforces of agents that run an organization's work. A software factory is one
|
|
9
|
+
kind of workforce; binary decompilation is another; a business with its various operations is another.
|
|
10
|
+
|
|
11
|
+
<picture>
|
|
12
|
+
<source media="(prefers-color-scheme: dark)" srcset="docs/jive-platforms-dark.svg">
|
|
13
|
+
<img alt="Agentic workforce, the outer circle, holding three separate circles: software factory, binary decompilation, and a business and its operations" src="docs/jive-platforms-light.svg" width="480">
|
|
14
|
+
</picture>
|
|
15
|
+
|
|
16
|
+
## The `jive` CLI
|
|
17
|
+
|
|
18
|
+
`@jive-sh/jive` signs you in to Jive, signs your git commits and GitHub pushes with your Jive account's SSH key, which
|
|
19
|
+
lives on [`@jive-sh/server`](https://github.com/jive-sh/server) and never on your machine, and loads repos into a
|
|
20
|
+
workspace. It replaces `@ozyman42/ozy-cli` ([what changed](docs/ozy-cli-migration.md)). It is built and published by
|
|
21
|
+
[`jive-abstract-library`](https://github.com/jive-sh/jive-abstract-library) like any Jive command package.
|
|
22
|
+
|
|
23
|
+
## Install
|
|
24
|
+
|
|
25
|
+
```sh
|
|
26
|
+
bun add -g @jive-sh/jive
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Installing registers `jive-signing-agent` to start at login (a LaunchAgent on macOS, a `systemctl --user` unit on
|
|
30
|
+
Linux, a scheduled task on Windows).
|
|
31
|
+
|
|
32
|
+
## Commands
|
|
33
|
+
|
|
34
|
+
| Command | What it does |
|
|
35
|
+
| --- | --- |
|
|
36
|
+
| `jive login` | Signs this machine in to Jive: opens `https://jive.sh/login?request=…`, where you sign in with your jive.sh passkey, and waits. Then fetches your account's public key, which the server creates on first use. |
|
|
37
|
+
| `jive login --cicd` | In a GitHub Actions job with `id-token: write`: exchanges the job's ID token for a session of its pipeline. |
|
|
38
|
+
| `jive provision <kind> <name>` | Makes sure a resource instance exists through the server's `provision`, e.g. `jive provision connector-package-registry @scope/name`; the organization's configured implementation (npm for jive-sh) does it. The instance is `./package.json`'s `jive.resources.<kind>.<name>`, or `--instance '<json>'`. Needs a pipeline session (`jive login --cicd`). |
|
|
39
|
+
| `jive whoami` | Prints the Jive account (`<handle>@jive.sh`) this machine is signed in as. |
|
|
40
|
+
| `jive init` | Makes the git repository you are in a jive workspace: adds `/.jive/` to its .gitignore, signs in to GitHub (one approval) and to Jive if needed, rewrites every .gitmodules at every depth to https URLs, syncs them and checks out every submodule not yet checked out (one already checked out keeps its HEAD), and configures the root, every submodule and every git repository inside it that git doesn't track to sign with your account key and push over SSH through `jive-signing-agent`. |
|
|
41
|
+
| `jive load <org> <repo>` | Adds a GitHub repo to the workspace as a submodule by its https URL, fetches its own submodules recursively, registers your account key on GitHub as an authentication and signing key, configures the repo and every submodule under it to sign commits and tags and push through the signing agent, then runs `bun install` and `bun link`. |
|
|
42
|
+
| `jive unload <org> <repo>` | Removes a loaded repo. |
|
|
43
|
+
| `jive on <org> <repo> -- <command…>` | Runs a command in a loaded repo's directory; its exit code is jive's. |
|
|
44
|
+
| `jive daemons` | Lists every Jive daemon registered on this machine, with its state, executable and log. |
|
|
45
|
+
| `jive upgrade` | Upgrades jive with the package manager that installed it. |
|
|
46
|
+
|
|
47
|
+
`jive --help`, `--version` and Tab completion (`jive --setup-completion`) work as for every command built with
|
|
48
|
+
`jive-abstract-library`'s `Cli`. What changed from ozy-cli, and why: [docs/ozy-cli-migration.md](docs/ozy-cli-migration.md).
|
|
49
|
+
|
|
50
|
+
## How signing works
|
|
51
|
+
|
|
52
|
+
1. **Sessions.** A session is obtained only by a person's passkey (`jive login`, or the agent asking when it needs
|
|
53
|
+
one) or, for a pipeline, by exchanging its GitHub OIDC token (`jive login --cicd`, which calls the server's
|
|
54
|
+
`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
|
|
55
|
+
(`signInRequests:open`), opens its page, where you sign in with your passkey, and claims the session (`signInRequests:claim`) every 2 seconds
|
|
56
|
+
until you approve it. The session token goes to `~/.jive/session.json`, readable by you only. A session lasts 12
|
|
57
|
+
hours.
|
|
58
|
+
2. **The key.** `ssh:createKey` makes your account's ed25519 key on the server the first time and returns its public
|
|
59
|
+
key, which jive keeps at `~/.jive/ssh/account.pub`. The private key never leaves the server.
|
|
60
|
+
3. **The agent.** `jive-signing-agent` serves the SSH agent protocol on `~/.jive/signing-agent.sock` (owner-only). It
|
|
61
|
+
lists the public key and forwards each sign request's bytes to `ssh:sign` with the session token, returning the
|
|
62
|
+
server's signature. With no live session it opens a sign-in request itself: it opens the page the same way. A session the server revoked early is dropped and signed in again once. A
|
|
63
|
+
second installed copy of jive finds the first agent's pidfile (`~/.jive/signing-agent.pid`) and stands down.
|
|
64
|
+
4. **Git.** `jive load` sets, per repository: `user.signingKey` to the public key file,
|
|
65
|
+
`gpg.format=ssh`, `gpg.ssh.program` to `jive-ssh-keygen` (ssh-keygen pointed at the agent's socket),
|
|
66
|
+
`commit.gpgSign` and `tag.gpgSign`, and `core.sshCommand` to ssh with the agent as `IdentityAgent`. Your
|
|
67
|
+
`~/.ssh/config` is left alone, so github.com connections outside these repositories are unchanged.
|
|
68
|
+
|
|
69
|
+
Signing needs `ssh-keygen` (OpenSSH) on PATH, as git's own SSH signing does.
|
|
70
|
+
|
|
71
|
+
## Workspaces
|
|
72
|
+
|
|
73
|
+
`jive load`, `unload` and `on` work in a workspace: the nearest directory holding a `.jive/` directory (your home
|
|
74
|
+
directory's `~/.jive` is jive's own and never counts). `jive init` makes one of any git repository. Loaded repos live at
|
|
75
|
+
`@<org>/<repo>` under it. The GitHub sign-in a workspace uses for cloning (read through `git-credential-jive`,
|
|
76
|
+
which `jive load` sets as each repo's credential helper) is kept in `.jive/users/`. Loaded repos fetch over HTTPS and
|
|
77
|
+
push over SSH.
|
|
78
|
+
|
|
79
|
+
## Developing
|
|
80
|
+
|
|
81
|
+
```sh
|
|
82
|
+
bun install
|
|
83
|
+
bun run jive:cicd:audit # type check and tests
|
|
84
|
+
bun run install:local # build with the jive-abstract-library checkout beside this one, install globally
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Tests never reach jive.sh, the server or GitHub: the signing agent's tests run the real `ssh-keygen` and `ssh-add`
|
|
88
|
+
against the agent with a fake server, and the workspace tests use local bare repos.
|
|
89
|
+
|
|
90
|
+
## Direction
|
|
91
|
+
|
|
92
|
+
- Repo creation from an abstract: `jive create <kind>` resolves `jive-abstract-<kind>`.
|