jelly-dev 0.5.0__py3-none-win_amd64.whl

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.
jelly_dev/__init__.py ADDED
@@ -0,0 +1,21 @@
1
+ """Jelly-Dev: the jd command (a terminal IDE and diff/merge tool). The binary is installed with this package."""
2
+
3
+ import os
4
+ import sys
5
+ import sysconfig
6
+
7
+ __version__ = "0.5.0"
8
+
9
+
10
+ def binary_path():
11
+ """Return the path of the jd binary installed by pip (None when it cannot be found)."""
12
+ name = "jd.exe" if sys.platform == "win32" else "jd"
13
+ for scheme in (None, "posix_user", "nt_user"):
14
+ try:
15
+ directory = sysconfig.get_path("scripts", scheme) if scheme else sysconfig.get_path("scripts")
16
+ except KeyError:
17
+ continue
18
+ candidate = os.path.join(directory, name)
19
+ if os.path.isfile(candidate):
20
+ return candidate
21
+ return None
jelly_dev/__main__.py ADDED
@@ -0,0 +1,22 @@
1
+ """python -m jelly_dev runs the installed jd binary (for when the scripts folder is not on the PATH)."""
2
+
3
+ import os
4
+ import subprocess
5
+ import sys
6
+
7
+ from . import binary_path
8
+
9
+
10
+ def main():
11
+ path = binary_path()
12
+ if path is None:
13
+ sys.stderr.write("jelly-dev: the jd binary was not found; reinstall with: pip install --force-reinstall jelly-dev\n")
14
+ return 1
15
+ if sys.platform == "win32":
16
+ return subprocess.call([path, *sys.argv[1:]])
17
+ os.execv(path, [path, *sys.argv[1:]])
18
+ return 0
19
+
20
+
21
+ if __name__ == "__main__":
22
+ sys.exit(main())
Binary file
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Eutima
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.
@@ -0,0 +1,363 @@
1
+ Metadata-Version: 2.1
2
+ Name: jelly-dev
3
+ Version: 0.5.0
4
+ Summary: Terminal IDE and diff/merge tool with a vim-style editor (the jd command)
5
+ Home-page: https://github.com/Eutima/jelly-dev
6
+ License: MIT
7
+ Requires-Python: >=3.8
8
+ Classifier: Environment :: Console
9
+ Classifier: License :: OSI Approved :: MIT License
10
+ Classifier: Operating System :: MacOS
11
+ Classifier: Operating System :: Microsoft :: Windows
12
+ Classifier: Operating System :: POSIX :: Linux
13
+ Classifier: Programming Language :: Go
14
+ Classifier: Topic :: Software Development
15
+ Project-URL: Source, https://github.com/Eutima/jelly-dev
16
+ Project-URL: Issues, https://github.com/Eutima/jelly-dev/issues
17
+ Description-Content-Type: text/markdown
18
+
19
+ # Jelly Dev
20
+
21
+ <p align="center"><img src="docs/jelly-dev-logo.png" alt="Jelly Dev logo" width="384"></p>
22
+
23
+ A terminal diff and merge tool with a JetBrains-style UI: side-by-side panes, colored change blocks and
24
+ word-level highlights. It diffs files, directories and the clipboard, shows `git diff` and acts as a three-pane
25
+ `git mergetool`, optionally with Claude or Codex resolving the conflicts. The command is `jd`.
26
+
27
+ - Type: tool
28
+ - Tier: 1
29
+ - Owner: Roy
30
+ - License: MIT
31
+ - Stack: Go + Bubble Tea (deliberate deviation from the Python tool default)
32
+
33
+ ## Install
34
+
35
+ Latest release, checked against the SHA-256 checksum published with it (an integrity check, not a signature):
36
+
37
+ ```
38
+ curl -fsSL https://raw.githubusercontent.com/Eutima/jelly-dev/master/scripts/install.sh | sh # Linux, macOS
39
+ irm https://raw.githubusercontent.com/Eutima/jelly-dev/master/scripts/install.ps1 | iex # Windows (PowerShell)
40
+ ```
41
+
42
+ Or with pip (any platform with a wheel: Linux glibc/musl including Alpine, macOS 11 or newer, Windows; x86-64 and arm64):
43
+
44
+ ```
45
+ pip install jelly-dev # puts the jd command on the PATH; pipx install jelly-dev works too
46
+ ```
47
+
48
+ The wheel carries the same static binary as the release (no download at install time). It does not set up git or install
49
+ language servers and runtimes; `jd install-git --apply` sets jd as git's diff and merge tool, and the IDE installs the language
50
+ servers it needs when it starts (`:tools`). Releases are published by the workflow `pypi` (`.github/workflows/pypi.yml`).
51
+
52
+ The installer:
53
+
54
+ - puts `jd` in `~/.local/bin` (Windows: `%LOCALAPPDATA%\Programs\jelly-dev`) and removes an old `jelly-dev` binary there;
55
+ - adds that directory to your PATH (Linux/macOS: your shell profile; Windows: the user PATH). Reload the shell
56
+ (`exec "$SHELL" -l`, or open a new terminal) so `jd` is found and tab-completes;
57
+ - checks the tools the IDE needs and **installs what is missing, without asking** (see below);
58
+ - runs `jd install-git --apply`, making `jd` the global `diff.tool` and `merge.tool` of git (overwrites existing values).
59
+
60
+ Dependencies (groups, all on by default; choose with `JD_DEPS=basics,terminal,runtimes,lsp`, skip with `JD_SKIP_DEPS=1`,
61
+ preview with `JD_DRY_RUN=1`):
62
+
63
+ | Group | Linux / macOS | Windows |
64
+ |---|---|---|
65
+ | `basics` | git; on Linux a clipboard tool (wl-clipboard or xclip) | git (winget) |
66
+ | `terminal` | a terminal emulator for new windows (xterm if none is found); in WSL Windows Terminal (`wt.exe`, via winget) | Windows Terminal |
67
+ | `runtimes` | Go, Node.js + npm, Python (pip, pipx), a JDK (also installed when `lsp` is chosen: the servers need them) | Go, Node.js, JDK 21, Python |
68
+ | `lsp` | gopls (`go install`), pyright, typescript-language-server (JavaScript and TypeScript), vscode-langservers-extracted (HTML, CSS, JSON), the Angular language server and the formatter prettier (`npm -g`, into `~/.local`), the formatter black (pipx or `pip --user`), jdtls (download), groovy-language-server (download) | the same |
69
+
70
+ System packages are installed with apt, dnf, pacman, zypper, apk or brew (through `sudo` unless you are root) and winget on
71
+ Windows. A tool that cannot be installed is reported at the end; jd itself works without them (the language servers are
72
+ used by the IDE from milestone 2 on). The jdtls and groovy-language-server downloads come from their official sites over
73
+ HTTPS and are not checksum-verified.
74
+
75
+ Options (environment variables): `JELLY_DEV_VERSION` (for example `v0.2.0`) picks a release, `INSTALL_DIR` changes
76
+ the target, `JD_SKIP_GIT_CONFIG=1` leaves the git configuration alone.
77
+
78
+ Check it: `jd --version`.
79
+
80
+ ## Usage
81
+
82
+ ```
83
+ jd <file-a> <file-b> compare two files, or two directories
84
+ jd --clip <file> compare a file with the clipboard (--clip-left: clipboard on the left)
85
+ jd git [--staged] [<rev> | <a>..<b>] browse the changes of the current git repository
86
+ jd merge <base> <local> <remote> <merged> three-way merge (what git mergetool calls)
87
+ jd merge <file-a> <file-b> merge b into a without git; the result is written to a
88
+ jd merge <dir-a> <dir-b> the same for two directories
89
+ jd [<folder> | <file>] open the project window (no argument: the most recent project)
90
+ jd install-git [--apply] [--local] print (or write) the git diff/merge tool settings
91
+ ```
92
+
93
+ With `jd` as git's tools: `git difftool`, `git difftool --dir-diff` and `git mergetool`.
94
+
95
+ Keys in the diff views: `↓`/`↑` next/previous change (in `jd git` and directory diffs with the diff pane focused, past the last or first change of a file they open the next or previous file), `j`/`k` scroll, `g`/`G` top/bottom, `t` split/unified, `q` quit.
96
+ Keys in the merge view (conflicts):
97
+
98
+ | Key | Action |
99
+ |---|---|
100
+ | `n` / `p` | next / previous change |
101
+ | `→` / `←` | add ours / theirs to the change and stay on it (like `»` / `«`); the other arrow adds the second side (= both); the same arrow again removes the side |
102
+ | `x` | ignore both sides of an open conflict: keep the lines the result pane shows now (the base; nothing in `jd merge a b`), mark it resolved and stay on it |
103
+ | `backspace` / `delete` | cancel the decision for the change (unresolved again) |
104
+ | `o` / `t` / `b` / `r` | take ours / theirs / both / base and jump to the next conflict |
105
+ | `ctrl+o` / `ctrl+t` | take ours / theirs for all open conflicts |
106
+ | `m` | auto-resolve conflicts that are none in fact (whitespace, different words) |
107
+ | `a` / `c` | let Claude / Codex resolve all open conflicts (if the CLI is installed) |
108
+ | `e` / `enter`, `i`, `d` | open the vim-style editor on the change under the cursor (`i`: on a new line below), delete the line |
109
+ | `w` | wrap long lines (default) or cut them with `…` |
110
+ | `u` | undo |
111
+ | `s` | save (when every conflict is resolved) |
112
+ | `q` | quit |
113
+
114
+ The commands in the footers are written as `[key] action` and can be clicked (when they are not dimmed): a click does what the key
115
+ does. This works in the diff, git, directory and merge views, and for the editor commands (`[:w]`, `[:q]`, ...); the one-line
116
+ footer of very small terminals is not clickable.
117
+
118
+ Exit codes: 0 ok (also when there are no differences), 1 runtime error, 2 usage error. A merge exits 0 only after saving.
119
+
120
+ `playground/` has sample files, two directory trees, merge inputs and a script that creates git repositories with
121
+ local changes and with a merge stopped on conflicts: see `playground/README.md`.
122
+
123
+ ## Project window (work in progress)
124
+
125
+ `jd` with no argument opens the **most recent project** (a folder) in the project window: the file tree on the left and a
126
+ vim-style editor on the right; with no history it shows a welcome screen with the recent projects (`enter` open here,
127
+ `w` open in a new window, `o` type a folder, `d` forget, `q` quit). `jd <folder>` opens that folder, `jd <file>` opens the
128
+ file in its project (the git root, else its folder); a name that does not exist yet starts a new file. The list of recent
129
+ projects, and for each one the file and cursor that were open, is kept in `<user config dir>/jd/projects.json`
130
+ (`JD_CONFIG_DIR` changes the folder), so the next `jd` continues where you stopped.
131
+
132
+ **Top bar**: the first line of the project window has the buttons *Project* (`ctrl+p`), *Terminal* (`ctrl+t`) and, in a git
133
+ repository only, *Diff* (the git changes of the project as in `jd git`, `D` in the tree or `:diff`; `q` returns to the editor; save
134
+ first, the diff shows what is on disk). `ctrl+p` and `ctrl+t` work in the tree and in the editor's normal mode (`ctrl+o` is the way
135
+ back after `gd`/`gr`). *Terminal* opens a shell in the project in a panel under the editor, like VS Code. Everything you type goes
136
+ to the shell; `ctrl+]` (or a click on the editor) gives the focus back, `ctrl+t` or the *Terminal* button hides the panel (the shells
137
+ keep running). The panel has **tabs**, one shell each: `alt+t` or `[+]` (or `:terminal new`) opens another, a click or `alt+1` … `alt+9`
138
+ chooses one, `alt+w` or `[×]` ends the shown one; a shell that exits closes its tab, the last one takes the panel with it. Windows has no embedded terminal yet: there the shell runs in place of the window until
139
+ you `exit`.
140
+
141
+ **File tabs**: every file you open from the tree, a search or `gd`/`gr` gets a tab above the editor (an open file is shown, not
142
+ opened twice); each tab keeps its own text, undo history and cursor. `gt` / `gT` (or `:tabn` / `:tabp`, `:bn` / `:bp`) show the next /
143
+ previous tab, a click on a name shows it, a click on `×` (or `:bd`, `:tabclose`) closes it. `:q`, `:wq` and `ctrl+d` close the tab, the
144
+ last one leaves; `:wa` writes all files, `:qa` leaves when nothing is unsaved and `:qa!` anyway. The open tabs come back with the project.
145
+ The footers and bars adapt to the width: on a narrow terminal the last commands lose their label (the `[key]` stays clickable) and then
146
+ drop out, the first ones stay.
147
+
148
+ **Unsaved changes**: closing a tab or switching project asks *Save / Discard / Cancel* (`s`, `d`, `c`,
149
+ `←/→` and `enter`, or a click).
150
+
151
+ **Switching projects**: `ctrl+p` (or `P` in the tree), `:project` (without a folder) or `:projects` / `:recent` open the list of
152
+ recent projects; `enter` opens the chosen one in a new window, `o` lets you type a folder (with `tab` completion; also opened in a new window), `d`
153
+ forgets an entry, `esc` closes the list. `:project <folder>` switches this window directly (the folder may be relative to the project or start
154
+ with `~`); `:project!` discards unsaved changes, otherwise they block the switch (E37). The file and cursor that were open are
155
+ stored first and come back when you return to a project; the language servers follow the window to the new project.
156
+
157
+ **New windows** (like JetBrains): `w` in the tree on a folder, `:window [folder]` in the editor and `w` on the welcome screen
158
+ start a new terminal window running `jd` on that folder. jd uses tmux (`tmux new-window`) when it runs inside tmux, Windows
159
+ Terminal when it runs in **WSL** or Windows, Terminal.app on macOS, and on Linux the first terminal it finds
160
+ (x-terminal-emulator, gnome-terminal, konsole, xfce4-terminal, kitty, wezterm, alacritty, foot, xterm). Set `JD_TERMINAL`
161
+ (for example `JD_TERMINAL="kitty"`) to choose another one; jd and the folder are appended to it. The value is split at spaces (no quoting), so a path with spaces needs a wrapper script. Where no terminal can be started (a container, an ssh session) a project
162
+ opens in the current window instead.
163
+
164
+ Closing: `ctrl+d` (like `ctrl+c`) closes the window from the tree and from the editor's normal mode; with unsaved changes it
165
+ warns first and quits on the second press. In insert mode `ctrl+c` only returns to normal mode.
166
+
167
+ Welcome screen "open folder" (`o`): type a path and press `tab` to complete it (a single match completes the whole folder, several
168
+ matches complete their common part, further presses walk through them; `shift+tab` goes back). The matching folders are listed
169
+ while you type and can be chosen with the arrows; `enter` opens the folder here, `ctrl+w` in a new window.
170
+
171
+ Tree keys: `j`/`k` move, `enter`/`o` open a file or toggle a folder, `h`/`l` collapse/expand, `R` refresh, `w` new window,
172
+ `ctrl+e` or `tab` switch to the editor, `q` quit (`ctrl+e` switches back to the tree). Entries of `.git` and the root
173
+ `.gitignore` (names and globs) are hidden. The mouse works in the tree, the editor and the footers.
174
+
175
+ Editor: normal, insert and visual mode with the keys listed under "Merge" (the same engine), line numbers, syntax highlighting,
176
+ scrolling, `:w [file]`, `:wq`, `:x`, `:q`, `:q!`, `:e[!] file`, `:set nu|nonu`, `:{n}`. Files are written atomically with
177
+ their line endings. Planned (branch `feature/vim-ide`): tabs and splits, the rest of vim, diagnostics, a terminal panel.
178
+
179
+ **Search in the open file** like vim: `/pattern` forwards, `?pattern` backwards (a regular expression; a pattern that is none is searched
180
+ literally; start it with `\c` to ignore case), `enter` jumps, `n` / `N` repeat in the same / the opposite direction and wrap around the
181
+ end of the file, an empty `/` repeats the last pattern, and `:noh` removes the highlight of the matches.
182
+
183
+ **Search** (`ctrl+f` file names, `ctrl+g` file content; in the tree also `/`; `:find [name]`, `:grep [text]`): a full-screen search over
184
+ the project. `tab` switches between the two. File names are matched fuzzily (`uied` finds `internal/ui/editor.go`; several words must all
185
+ match; names rank above paths). Content search starts while you type (smart case: lower case ignores case, a capital letter makes it
186
+ case sensitive; `ctrl+r` switches to regular expressions) and lists `file:line text` with the match highlighted. `enter` or a click
187
+ opens the file at the match, `esc` (or `ctrl+d`) closes. `node_modules`, `.venv`, `venv`, `__pycache__`, `.tox`, `.gradle`, `.idea`,
188
+ `.git`, caches and everything in the project's `.gitignore` or an optional `.jdignore` (same patterns) are skipped, as are binary
189
+ files and files over 1 MiB.
190
+
191
+ **Language servers** (started when first needed, per project): `gd` jumps to the definition of the symbol under the cursor, `gr` lists
192
+ its references (`j`/`k`, `enter` or a click jump), `ctrl+o` returns to where the last jump started (also after a search jump), also
193
+ across files; so do `ctrl+c` and `ctrl+d` in normal mode, one step at a time, and only when there is no jump left to undo they close the
194
+ window (unsaved changes block going back to another file, E37). `:format` (`:fmt`) formats the file as one undoable change: with the file type's formatter command when installed (Go: `gofmt`;
195
+ HTML, CSS, SCSS, JavaScript, TypeScript, JSON: `prettier`; Python: `black`), otherwise with the language server (Java is formatted
196
+ by jdtls). `ctrl+space` (or `ctrl+n`) in insert mode opens the completion popup with the server's
197
+ suggestions and the words of the file as a fallback: typing narrows it, `ctrl+n`/`ctrl+p` or the arrows choose, `tab` or `enter`
198
+ accept, `esc` closes it. Defaults: gopls (Go), typescript-language-server (JavaScript, TypeScript, JSX), pyright (Python),
199
+ vscode-html/css/json-language-server, jdtls (Java), groovy-language-server; the installer sets them up. Add or change servers in
200
+ `<config dir>/jd/lsp.json`: `{"servers": [{"name": "rust", "command": ["rust-analyzer"], "extensions": [".rs"], "languageId": "rust",
201
+ "rootMarkers": ["Cargo.toml"], "formatter": ["rustfmt", "--emit", "stdout"]}]}` (an entry with the name of a default replaces it).
202
+
203
+ **Tools are installed for you**: when a project window opens, jd checks for the language servers and formatters (gopls,
204
+ typescript-language-server, pyright, the HTML/CSS/JSON servers, the Angular language server, jdtls, groovy-language-server,
205
+ prettier, black) and **installs what is missing in the background**, one after the other, with the language's own tool (`go
206
+ install`, `npm install -g --prefix ~/.local`, `pipx` or `pip --user`, or a download); the progress shows in the status line
207
+ and the result when it is done. A runtime that is missing (Go, Node.js, Python, Java) is reported, not installed: jd never
208
+ asks for root rights, the installer installs runtimes. A tool that failed is tried again after a day; `:tools` tries all missing
209
+ ones now and `:tools status` lists what is missing. `JD_NO_AUTO_INSTALL=1` turns the start-up installation off. Tools end up in
210
+ `~/.local/bin` (and Go's bin folder), which jd adds to its own PATH. Angular templates (`*.component.html`) use the Angular
211
+ language server (it finds `typescript` and `@angular/language-service` in the project's `node_modules` or the global ones).
212
+
213
+ **Clipboard**: copied and deleted text (`y`, `d`, `x`, ...) is also put on the system clipboard, and `p` pastes what is on it, so text
214
+ moves between the editor and other programs (WSL and Windows use PowerShell, macOS pbcopy/pbpaste, Linux wl-clipboard, xclip or
215
+ xsel). Text pasted by the terminal is inserted as text, never run as vim commands. `ctrl+d` leaves insert and visual mode like `ctrl+c`.
216
+
217
+ ## Details
218
+
219
+ ### Status
220
+
221
+ Done: file diff, word-level highlights, unified view, clipboard compare, git changes, directory diff, three-pane
222
+ merge, git tool setup, themes (dark, light, mono), syntax highlighting. Releases are published automatically.
223
+
224
+ ### Diff, clipboard, git and directories
225
+
226
+ Usage: `jd <file-a> <file-b>`. Flags must come before file names.
227
+ Exit codes: 0 ok (also when there are no differences), 1 runtime error, 2 usage error.
228
+ Clipboard: `jd --clip <file>` (clipboard on the right) or `--clip-left`. Reads via PowerShell on
229
+ WSL/Windows, `pbpaste` on macOS, `wl-paste`/`xclip`/`xsel` on Linux.
230
+ Git: `jd git [--staged] [<rev> | <a>..<b>] [-- <path>...]` shows a changed-file list (working tree vs HEAD incl.
231
+ untracked files by default) next to the diff of the selected file. In the list: `j`/`k` select, `enter` focus the
232
+ diff, `tab` switch focus, `esc` back. Three-dot ranges are not supported; flags must precede the revision.
233
+ Directories: `jd <dir-a> <dir-b>` lists the files that differ (modified, only left, only right) with the same
234
+ list-plus-diff view; use it from git with `git difftool --dir-diff` (its temporary directories hold links to the working tree files, which
235
+ are followed). Compared are regular files and links to regular files; links to directories, dangling links, special
236
+ files and `.git` directories are skipped.
237
+ Keys (diff): `↓`/`↑` next/previous change, `j`/`k` scroll, `g`/`G` top/bottom, `t` split/unified, mouse wheel, `q` quit.
238
+ The mouse is captured for wheel scrolling; hold Shift while dragging to select text in most terminals.
239
+
240
+ ### Merge
241
+
242
+ Merge: `jd merge <base> <local> <remote> <merged>` shows ours | result | theirs. Non-conflicting changes are
243
+ merged automatically; conflicts start with the base lines. The result pane has a line cursor:
244
+
245
+ - `j`/`k`/arrows move the cursor (the change under it is selected), `n`/`p` jump to the next/previous change.
246
+ - Gutter buttons (mouse, three-pane layout only): `»` applies ours, `«` applies theirs; applying the second side of a
247
+ change gives both. `×` discards that side (the other side stays, or the base when none is left), like JetBrains.
248
+ A click stays on the change instead of jumping to the next conflict, so you can apply both and edit by hand.
249
+ A button disappears (and is no longer clickable) once its action is done, e.g. `»` after ours was applied.
250
+ - `ctrl+→` or `ctrl+o` / `ctrl+←` or `ctrl+t` take ours / theirs for every conflict that is still unresolved (decided conflicts and automatic
251
+ merges stay; one `u` undoes it).
252
+ - `→` / `←` work like the gutter buttons: they add ours / theirs to the selected change and stay on it, so the other side can
253
+ still be added (the second arrow gives both); the same arrow again removes that side (like `×`) and `backspace` or `delete`
254
+ cancels the whole decision. Move on with `n`. `o` takes ours, `t` theirs, `b` both and `r` reverts to the base, each
255
+ followed by a jump to the next unresolved conflict. `x` ignores both sides of an open conflict (keeps the lines shown
256
+ in the result now) and stays on it; unlike `r` it only applies to open conflicts and does not jump.
257
+ - `m` (auto-resolve) resolves every conflict that is none in fact: a change of whitespace only, or both sides editing
258
+ different words of the same lines. Real conflicts stay open; one `u` undoes the whole step.
259
+ - `a` asks Claude (`claude` CLI) and `c` asks Codex (`codex` CLI) to resolve every conflict that is still open; a
260
+ key is only active when its CLI is installed and on the PATH. The answer is applied as hand-edited result lines
261
+ (review it, one `u` undoes the whole answer). **The three versions of every open conflict are sent to the
262
+ assistant's service**, so do not use it on files that must not leave your machine. The assistant runs in an empty
263
+ temporary directory without tools (Claude) or in a read-only sandbox (Codex) and times out after 5 minutes; `q`
264
+ cancels a running request. Needs a logged-in CLI.
265
+ - `e` or `enter` opens a vim-style editor on the **change under the cursor** (`i` opens it on a new empty line below the
266
+ cursor, in insert mode); `d` deletes the line under the cursor. The editor takes the whole screen and starts in
267
+ normal mode. The lines of the change are editable; all other lines of the result are shown above and below,
268
+ dimmed and read-only: the cursor can walk over them (`j`/`k`, arrows, `pgup`/`pgdn`, `gg`/`G`; the status line says
269
+ `READ-ONLY`) but any attempt to change them is refused:
270
+ - motions: `h j k l` and arrows, `w b e`, `0 ^ $`, `gg G` and `{n}G`, `ctrl+u`, `pgup`/`pgdn`, counts (`3j`, `2dw`);
271
+ - insert mode: `i a I A o O`; `esc` returns to normal mode;
272
+ - changes: `x X D C`, operators `d c y` with a motion (`dd cc yy dw cw d$ dj dG ...`), `p P`, `r{char}`, `J`, `~`, `u`, `ctrl+r`;
273
+ - visual mode: `v` (characters) and `V` (lines), then `d x y c`;
274
+ - Ex commands: `:w` applies the text to the merge and stays, `:wq` or `:x` applies and leaves, `:q` leaves (refuses
275
+ while there are unapplied changes), `:q!` discards them, `:{n}` goes to line n. `ctrl+d` works like `q` in the merge view: it leaves right away when
276
+ nothing changed, otherwise it asks whether to apply (`y`), discard (`n`) or keep editing (any other key).
277
+
278
+ Not supported: `.`, macros, named registers, search, text objects. Applying stores the lines in the change, which then
279
+ counts as resolved; one `u` in the merge view undoes a whole `:w`.
280
+ - `u` undoes the last step (also edits, deletions and insertions), `s` saves (only when every conflict is resolved),
281
+ `q`, `ctrl+c` or `ctrl+d` quits (asks before discarding an unsaved result), `v` switches the shown pane on narrow terminals.
282
+
283
+ Layout: a header shows the document, the number of conflicts remaining, the save state (`Modified`, `Saved`,
284
+ `Save failed`), the position (`Conflict 2 of 5`) and a progress bar; the result pane (40%) sits between ours and
285
+ theirs. The edge column marks each change: `▌` the selected change, `!` unresolved conflict, `✓` resolved, `~` merged
286
+ automatically. Below 72 columns one pane is shown at a time (`v` switches pane); below 10 rows header and footer shrink
287
+ to one line each. The footer shows the actions for the selected change and the shortcuts in groups; unavailable ones
288
+ are dimmed.
289
+
290
+ Without git: `jd merge <file-a> <file-b>` merges file b into file a and writes the result to file a (atomically,
291
+ with a's line endings). There is no common ancestor, so every difference is a conflict you decide (`»`/`«`/`×`, `o`/`t`/`b`,
292
+ `ctrl+o` keeps all of a, `ctrl+t` takes all of b); identical files print "no differences" and write nothing.
293
+
294
+ Directories: `jd merge <dir-a> <dir-b>` lists the files that differ (`M`, `(only in a)`, `(only in b)`);
295
+ `enter` opens one in the merge view and `s` saves it into directory a (a file only in b is created there; for a file only
296
+ in a you decide per hunk, `ctrl+o` keeps it). `q` returns to the list, where `✓` marks merged files. Directory b is
297
+ never changed and nothing is deleted.
298
+
299
+ The result is written atomically with the line endings of the local file and a final newline; the exit code is 0 only
300
+ after saving.
301
+
302
+ Use as git tool: `jd install-git` prints the `git config` commands, `--apply` writes them (`--local` for
303
+ the current repository only), then use `git difftool` and `git mergetool`.
304
+
305
+ ### Build from source and test
306
+
307
+ ```
308
+ go build -o bin/jd ./cmd/jelly-dev
309
+ go test ./...
310
+ ```
311
+
312
+ Requires Go 1.24 (the toolchain is fetched automatically by Go >= 1.21).
313
+
314
+ Git mode runs the `git` command, so the repository's own git configuration applies; do not open untrusted
315
+ repositories with it. Symbolic links are shown as their target path and are never followed.
316
+
317
+ Inputs must be regular files (or symbolic links to them): pipes such as `<(command)` are rejected.
318
+
319
+ Syntax highlighting (library: [chroma](https://github.com/alecthomas/chroma), MIT) is chosen by file name and shown in
320
+ the diff, clipboard, git, directory and merge views (in the merge view the result pane is re-highlighted after every
321
+ choice): monokai colors in the dark theme, github colors in the light theme, none in mono. Changed words keep their
322
+ own highlight. Files over 512 KiB and files without a known lexer are not highlighted.
323
+
324
+ ### Known limitations of the terminal UI
325
+
326
+ - On terminals that do not answer the background-color query (some serial consoles and test harnesses) every start,
327
+ including `jd --version`, waits about 5 seconds. This comes from bubbletea v1 (it queries the terminal while
328
+ initializing) and goes away on terminals such as xterm, iTerm2, kitty, Alacritty, WezTerm; tmux and screen are skipped.
329
+
330
+ ### Build and release
331
+
332
+ `jd --version` (or `jd version`, only as the sole argument; use `./version` for a file of that name) prints the
333
+ version. A plain `go build` reports the version Go records for the build (a pseudo-version with the commit, or `dev`
334
+ without build information, or the tag when installed with `go install ...@vX.Y.Z`); release builds get the version
335
+ linked in:
336
+
337
+ ```
338
+ go build -trimpath -ldflags "-X main.version=0.1.0" -o bin/jd ./cmd/jelly-dev
339
+ goreleaser release --snapshot --clean # archives for Linux, macOS and Windows (amd64, arm64) in dist/
340
+ ```
341
+
342
+ CI (`.github/workflows/ci.yml`) cross-compiles all six targets and runs `goreleaser check`. The actions are pinned
343
+ to commit SHAs and GoReleaser to an exact version; Dependabot (`.github/dependabot.yml`) proposes updates weekly
344
+ with Conventional Commit titles.
345
+
346
+ Every push to `master` runs the tests (`.github/workflows/release.yml`) and then creates a release:
347
+ `scripts/next-version.sh` derives the next `vX.Y.Z` tag from the Conventional Commits since the last tag
348
+ (`feat` = minor, `fix`/`perf` = patch, `!` or `BREAKING CHANGE` = major) and GoReleaser publishes the archives and
349
+ `checksums.txt` to GitHub. Pushes with only `chore`, `docs`, `test`, `ci` or `refactor` commits create no release.
350
+
351
+ ### Config
352
+
353
+ Environment variables (see `.env.example`):
354
+
355
+ - `JELLY_DEV_THEME`: `dark` (default), `light` or `mono` (no colors: bold = added, strikethrough = deleted, reverse video = changed words).
356
+ - `NO_COLOR`: any non-empty value selects `mono` unless `JELLY_DEV_THEME` is set.
357
+
358
+ ### Known limitations
359
+
360
+ - A missing trailing newline at the end of a file is not shown as a difference.
361
+ - Binary detection only checks for NUL bytes (UTF-16 files are shown as garbage); files and git blobs are limited to 64 MiB.
362
+ - While a file loads in the list views a wobbling jelly is shown; slow operations before the UI opens (listing a large directory or repository, reading the clipboard) show a small jelly wave on stderr after 300 ms (only on an interactive terminal).
363
+ - In git mode files load in the background ("Loading ..." is shown); selecting another file cancels the load in progress, including a running `git` process, so only the latest selection is loaded. Plain `jd a b` still reads both files before the UI opens.
@@ -0,0 +1,7 @@
1
+ jelly_dev/__init__.py,sha256=cHRVYYHeOf1wuW_KSdwtF2t727buXXcxiJtNXrUHWDs,695
2
+ jelly_dev/__main__.py,sha256=LbTVJ-gfHthChpj3dEiLNWqFzfY4v-FR6m6Rqpj45E0,566
3
+ jelly_dev-0.5.0.data/scripts/jd.exe,sha256=dfcY7bMPax0uZhIVRcCJObjFbx4hws8l0rwZWbx5Exw,13075456
4
+ jelly_dev-0.5.0.dist-info/METADATA,sha256=-lj42mKzqtbCZX2EFExhp9bHeWFY75W2IKJAnH0DSHM,27551
5
+ jelly_dev-0.5.0.dist-info/LICENSE,sha256=ixTyInOg7SZrssnAu3i-u_1rE13sED4Yb09age3B06I,1063
6
+ jelly_dev-0.5.0.dist-info/WHEEL,sha256=REXKkAYHgL4vrmwFQWn7hipK3NXiX9Jds8ivHoKltMA,100
7
+ jelly_dev-0.5.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: jelly-dev build_wheels
3
+ Root-Is-Purelib: false
4
+ Tag: py3-none-win_amd64