jj-octo 0.1.0

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.
Files changed (4) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +63 -0
  3. package/dist/jj-octo.js +18897 -0
  4. package/package.json +47 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Konrad Komorowski
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,63 @@
1
+ # jj-octo
2
+
3
+ A [jj](https://github.com/jj-vcs/jj) subcommand for working with GitHub that supports stacking.
4
+
5
+ > [!WARNING]
6
+ > `jj-octo` is in early development, and its commands may change. So far it is largely vibe coded.
7
+
8
+ ## Usage
9
+
10
+ Run `jj gh --help` to list the commands.
11
+
12
+ ## Install
13
+
14
+ `jj-octo` runs on [bun](https://bun.sh), and calls `jj`. Both must be on `PATH`.
15
+
16
+ ### For one repository
17
+
18
+ With [mise](https://mise.jdx.dev), in the repository's `mise.toml`, where `A.B.C` is a bun version and `X.Y.Z` a [released version](https://www.npmjs.com/package/jj-octo?activeTab=versions) of `jj-octo`:
19
+
20
+ ```toml
21
+ [tools]
22
+ bun = "A.B.C"
23
+
24
+ [tools."npm:jj-octo"]
25
+ version = "X.Y.Z"
26
+ # mise holds back a package that is new or rarely downloaded, and this approves it.
27
+ allow_low_downloads = true
28
+ ```
29
+
30
+ Then make it a jj subcommand. The alias isn't committed, so run this once in each checkout:
31
+
32
+ ```
33
+ jj config set --repo aliases.gh '["util", "exec", "--", "jj-octo"]'
34
+ ```
35
+
36
+ ### For every repository
37
+
38
+ ```
39
+ bun install --global jj-octo
40
+ jj config set --user aliases.gh '["util", "exec", "--", "jj-octo"]'
41
+ ```
42
+
43
+ To update it later:
44
+
45
+ ```
46
+ bun update --global --latest jj-octo
47
+ ```
48
+
49
+ ## GitHub access
50
+
51
+ `jj-octo` reads the repository from the `origin` remote. It takes its token from `GH_TOKEN` or `GITHUB_TOKEN`, and otherwise from `gh auth token`.
52
+
53
+ It uses only GitHub's REST API, so that it works in a [Claude Code](https://claude.com/claude-code) cloud session. There, GitHub is reached through a proxy that allows REST calls for the session's repository and blocks GraphQL, which `gh pr` depends on.
54
+
55
+ ## Development
56
+
57
+ ```
58
+ bun install
59
+ bun run check # format, lint, types, tests and build
60
+ bun run fix # format and lint fixes
61
+ ```
62
+
63
+ To release, run `bun run release:patch`, `release:minor` or `release:major` in a pull request, which raises `version` in `package.json`. Once it is merged and the checks pass on `main`, the same workflow publishes that version to npm and tags it.