@carlosstenzel/opencode-git-sidebar 0.0.0-stage → 0.1.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Carlos Stenzel
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 CHANGED
@@ -1,3 +1,106 @@
1
- # Temporary Holding Version
1
+ # @carlosstenzel/opencode-git-sidebar
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ [English](README.md) · [Português (Brasil)](README-pt-br.md)
4
+
5
+ A GUI plugin for **OpenCode Desktop (Electron)** that adds a **Git/PR** panel to the side region — the same region used by the browser panel.
6
+
7
+ > Not to be confused with OpenCode Rune: Rune uses Luau plugins and does not load this package's `gui-experimental` API.
8
+
9
+ ## Features
10
+
11
+ - Side panel with a GitLens-style header: repository, branch badge, changes/ahead/behind/upstream chips, and a refresh button.
12
+ - Tabs **Branches / Commits / PRs / Files**:
13
+ - Branches: filter, current branch, ahead/behind, latest commit, checkout, create, merge and delete (checkout with a dirty tree and destructive actions ask for confirmation).
14
+ - Commits: short hash, subject, author, relative time and changed files (expand a row to see the list).
15
+ - PRs: open pull requests with check-status icons and browser opening.
16
+ - Files: changes grouped by type (Conflicts, Modified, Added, Removed, Untracked) with counters, colored status badges, prominent filename + muted directory, and `+/-` stats per file, group and total. Select individual files, a whole group, `Select all` / `Clear`, plus a sticky bar with the selected count and **Commit selected** (runs `git add` only for the checked files).
17
+ - Diff: click a file (or the eye icon) to open the viewer with numbered lines, `+`/`-` gutters, inline highlight of the changed fragment, optional line wrapping, copy diff, `Include in commit`, and previous/next navigation (`K`/`J`) across selected files — or across all files when the open file is not part of a multi-selection.
18
+ - Action bar: refresh, push, pull, commit-all (with message and confirmation) and new PR.
19
+ - Entry in the side region's `+` menu and a button in the panel tab strip.
20
+ - Branch row in the project menu.
21
+ - Pill above the composer with open PRs for the session directory.
22
+ - Palette commands: `Git: open panel`, `Git: push branch`, `Git: pull`, `Git: create pull request`, `Git: commit all changes`, `Git: commit selected files`.
23
+ - Server-side RPC using `git` and `gh`.
24
+
25
+ ## Preview
26
+
27
+ Illustrative images with fictional data (no real project, branch or author):
28
+
29
+ ![Git panel overview](docs/images/git-sidebar-overview.svg)
30
+
31
+ ![Files tab with selection and stats](docs/images/git-sidebar-files.svg)
32
+
33
+ ![Diff viewer](docs/images/git-sidebar-diff.svg)
34
+
35
+ ## Requirements
36
+
37
+ - Electron-based OpenCode Desktop with `@opencode/plugin/gui` support.
38
+ - `git` on PATH.
39
+ - `gh` (GitHub CLI) on PATH and authenticated with `gh auth login` to list/create PRs.
40
+
41
+ ## Installation
42
+
43
+ Install from npm:
44
+
45
+ ```sh
46
+ opencode plugin add @carlosstenzel/opencode-git-sidebar
47
+ ```
48
+
49
+ Or directly from GitHub (npm is not required):
50
+
51
+ ```sh
52
+ opencode plugin add github:carlosstenzel/opencode-git-sidebar
53
+ ```
54
+
55
+ The config reloads automatically. To check it:
56
+
57
+ ```sh
58
+ opencode plugin list
59
+ opencode plugin check
60
+ ```
61
+
62
+ Or add it manually to `~/.config/opencode/opencode.json`:
63
+
64
+ ```json
65
+ {
66
+ "plugins": ["@carlosstenzel/opencode-git-sidebar"]
67
+ }
68
+ ```
69
+
70
+ The GUI part is the `./gui-experimental` export; the `dist/gui-experimental.cjs` bundle is generated by `prepack`.
71
+
72
+ ## Development
73
+
74
+ ```sh
75
+ npm install
76
+ npm run build
77
+ npm run typecheck
78
+ ```
79
+
80
+ Watch rebuild:
81
+
82
+ ```sh
83
+ npm run dev
84
+ ```
85
+
86
+ OpenCode reloads the GUI after the build. You can also use **Settings → Extensions → Plugins** to turn the GUI off without removing the plugin.
87
+
88
+ ## Publishing
89
+
90
+ ```sh
91
+ npm publish --access public
92
+ ```
93
+
94
+ `prepack` runs `typecheck` and `build` before packaging.
95
+
96
+ ## Notes
97
+
98
+ - The OpenCode Desktop GUI API is experimental (`gui-experimental`).
99
+ - No push, pull, commit, merge, delete or PR action runs automatically; everything is explicit and destructive actions ask for confirmation.
100
+ - `commit all` stages every change (`git add -A`) before committing.
101
+ - Deleting a branch uses `git branch -d` (safe delete; unmerged branches are refused by git).
102
+ - The plugin does not touch the browser configuration.
103
+
104
+ ## License
105
+
106
+ MIT — see `LICENSE`.