@jimmy.codes/stet 0.10.2 → 0.11.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.
- package/README.md +24 -64
- package/bin/stet.js +30 -20
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -2,62 +2,32 @@
|
|
|
2
2
|
|
|
3
3
|
`stet` is a read-only companion TUI for inspecting an agent's changes.
|
|
4
4
|
|
|
5
|
-
The agent runs in one terminal pane, but you still open an editor just to answer
|
|
6
|
-
basic questions:
|
|
5
|
+
The agent runs in one terminal pane, but you still open an editor just to answer basic questions:
|
|
7
6
|
|
|
8
7
|
- What files are in this repo?
|
|
9
8
|
- What changed?
|
|
10
9
|
- What did the agent touch most recently?
|
|
11
|
-
- Are there errors or warnings in what changed?
|
|
12
10
|
|
|
13
|
-
`stet` is meant to sit in the next pane and answer those questions without
|
|
14
|
-
becoming part of the agent loop. It does not review code, approve changes, talk
|
|
15
|
-
to the agent, or manage a workflow. It shows you the repo, the diff, and the
|
|
16
|
-
problems. You decide what to say next.
|
|
11
|
+
`stet` is meant to sit in the next pane and answer those questions without becoming part of the agent loop. It does not review code, approve changes, talk to the agent, or manage a workflow. It shows you the repo and the diff. You decide what to say next.
|
|
17
12
|
|
|
18
|
-
Stet is the proofreader's mark for "let it stand": strike a word out, add dots
|
|
19
|
-
beneath, and it stays.
|
|
13
|
+
Stet is the proofreader's mark for "let it stand": strike a word out, add dots beneath, and it stays.
|
|
20
14
|
|
|
21
15
|

|
|
22
16
|
|
|
23
17
|
## What it does
|
|
24
18
|
|
|
25
|
-
- Shows the full repo tree, including tracked files and untracked files that are
|
|
26
|
-
|
|
27
|
-
-
|
|
28
|
-
|
|
29
|
-
-
|
|
30
|
-
|
|
31
|
-
-
|
|
32
|
-
- Shows an
|
|
33
|
-
|
|
34
|
-
the OS default app with `O`.
|
|
35
|
-
- Finds text within the open file, and searches file contents across the repo,
|
|
36
|
-
scoped to the changes or the whole tree.
|
|
37
|
-
- Switches scope from a picker (all changes, staged, unstaged, since launch, or
|
|
38
|
-
the last commit) and between git worktrees in place.
|
|
39
|
-
- Shows which worktree an agent is working in: the picker ranks worktrees by how
|
|
40
|
-
recently each was touched (an edit, a commit, a checkout), busiest first, each
|
|
41
|
-
with its age beside it.
|
|
42
|
-
- Watches the filesystem and refreshes as the agent changes files, keeping the
|
|
43
|
-
current file and selection stable.
|
|
19
|
+
- Shows the full repo tree, including tracked files and untracked files that are not ignored by git.
|
|
20
|
+
- Marks changed files in place, with staged, unstaged, mixed, and untracked states.
|
|
21
|
+
- Opens unchanged files read-only, with syntax highlighting for more than 150 languages.
|
|
22
|
+
- Opens changed files as diffs, with the changed words in each modified line marked, and a toggle for the full file.
|
|
23
|
+
- Shows an image or binary file as a metadata card (type, dimensions, size) instead of raw bytes, since a terminal can't render the pixels, and opens it in the OS default app with `O`.
|
|
24
|
+
- Finds text within the open file, and searches file contents across the repo, scoped to the changes or the whole tree.
|
|
25
|
+
- Switches scope from a picker (all changes, staged, unstaged, since launch, or the last commit) and between git worktrees in place.
|
|
26
|
+
- Shows which worktree an agent is working in: the picker ranks worktrees by how recently each was touched (an edit, a commit, a checkout), busiest first, each with its age beside it.
|
|
27
|
+
- Watches the filesystem and refreshes as the agent changes files, keeping the current file and selection stable.
|
|
44
28
|
- Marks recent activity and lets you jump to the latest touched file.
|
|
45
|
-
-
|
|
46
|
-
|
|
47
|
-
branch, changed since the file's start, or original to it, git blame reframed
|
|
48
|
-
around how much of what you are reviewing is yours and how recent it is.
|
|
49
|
-
- Shows diagnostics in the tree, the viewer, and a problems panel.
|
|
50
|
-
- Rearranges its own layout: the tree and the problems panel dock to any edge and
|
|
51
|
-
resize along it, with `d` cycling the focused pane clockwise, `m` toggling zoom on
|
|
52
|
-
the focused pane, and `ctrl-s` persisting the arrangement.
|
|
53
|
-
- Navigates code through read-only language-server pulls: go to definition, find
|
|
54
|
-
references, find implementations, call hierarchy, hover, and a symbol outline.
|
|
55
|
-
- Copies a reference and snippet to paste back to the agent: `path` in the tree,
|
|
56
|
-
`path:line:col` in the viewer, and a whole diagnostic (or every one) from the
|
|
57
|
-
problems panel.
|
|
58
|
-
|
|
59
|
-
The git-backed file tree renders first. Diagnostics come in later as
|
|
60
|
-
decorations, so the basic view stays useful even when checks are still running.
|
|
29
|
+
- Rearranges its own layout: the tree docks to any edge and resizes along it, with `d` cycling it clockwise, `m` toggling zoom on the focused pane, and `ctrl-s` persisting the arrangement.
|
|
30
|
+
- Copies a reference and snippet to paste back to the agent: `path` in the tree, and `path:line:col` or the selected lines in the viewer.
|
|
61
31
|
|
|
62
32
|
## Install
|
|
63
33
|
|
|
@@ -78,27 +48,21 @@ Run `stet` inside any git repository; `stet upgrade` updates it in place.
|
|
|
78
48
|
|
|
79
49
|
Full documentation lives at **[stet.jimmy.codes](https://stet.jimmy.codes)**:
|
|
80
50
|
|
|
81
|
-
- [Getting started](https://stet.jimmy.codes/docs): install, usage, flags, and
|
|
82
|
-
|
|
83
|
-
- [
|
|
84
|
-
|
|
85
|
-
worktrees, and themes
|
|
86
|
-
- [Keybindings](https://stet.jimmy.codes/docs/reference/keybindings): every
|
|
87
|
-
shortcut (or press `?` in the app)
|
|
88
|
-
- [Configuration](https://stet.jimmy.codes/docs/reference/configuration): themes,
|
|
89
|
-
file associations, icons, language servers, and editor setup at
|
|
90
|
-
`~/.config/stet/config.jsonc` (or `config.json`)
|
|
51
|
+
- [Getting started](https://stet.jimmy.codes/docs): install, usage, flags, and requirements
|
|
52
|
+
- [Guides](https://stet.jimmy.codes/docs/guides/reading-files-and-diffs): reading files and diffs, search and navigation, panes and layout, scopes and worktrees, and themes
|
|
53
|
+
- [Keybindings](https://stet.jimmy.codes/docs/reference/keybindings): every shortcut (or press `?` in the app)
|
|
54
|
+
- [Configuration](https://stet.jimmy.codes/docs/reference/configuration): themes, file associations, icons, keybindings, and editor setup at `~/.config/stet/config.jsonc` (or `config.json`)
|
|
91
55
|
|
|
92
56
|
## Requirements
|
|
93
57
|
|
|
94
58
|
- git
|
|
95
|
-
- a clipboard tool for copy (`y`): `pbcopy` on macOS (built in), or `wl-copy`,
|
|
96
|
-
|
|
97
|
-
- a Nerd Font for the tree's file-type icons (optional; use `--no-icons` without
|
|
98
|
-
one)
|
|
59
|
+
- a clipboard tool for copy (`y`): `pbcopy` on macOS (built in), or `wl-copy`, `xclip`, or `xsel` on Linux
|
|
60
|
+
- a Nerd Font for the tree's file-type icons (optional; use `--no-icons` without one)
|
|
99
61
|
|
|
100
62
|
## Development
|
|
101
63
|
|
|
64
|
+
The TUI uses OpenTUI with SolidJS. `@pierre/trees` owns the tree hierarchy, focus, expansion, and default file icon matching. Stet renders its visible rows and keeps Git metadata and viewer navigation in state.
|
|
65
|
+
|
|
102
66
|
```sh
|
|
103
67
|
bun install
|
|
104
68
|
bun run stet # run from source (the TUI lives in packages/tui)
|
|
@@ -106,12 +70,8 @@ bun run check # format, lint, tests, typecheck + knip
|
|
|
106
70
|
bun run build:dist # build standalone binaries for all targets
|
|
107
71
|
```
|
|
108
72
|
|
|
109
|
-
`bun install` also wires up git hooks (via [lefthook](https://lefthook.dev)):
|
|
110
|
-
`pre-commit` formats and lints staged files, `pre-push` typechecks the whole
|
|
111
|
-
repo and runs knip.
|
|
73
|
+
`bun install` also wires up git hooks (via [lefthook](https://lefthook.dev)): `pre-commit` runs `ultracite fix` on staged files, `pre-push` typechecks the whole repo and runs knip.
|
|
112
74
|
|
|
113
75
|
## Non-goals
|
|
114
76
|
|
|
115
|
-
`stet` is deliberately not an agent integration. It has no approvals, no
|
|
116
|
-
accept/reject protocol, no generated review explanations, no PR workflow, and no
|
|
117
|
-
database. The agent never hears from `stet`, only from you.
|
|
77
|
+
`stet` is deliberately not an agent integration. It has no approvals, no accept/reject protocol, no generated review explanations, no PR workflow, and no database. The agent never hears from `stet`, only from you.
|
package/bin/stet.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
/// <reference types="node" />
|
|
2
3
|
|
|
3
4
|
// Npm launcher: resolves the platform-specific stet binary package and execs it.
|
|
4
5
|
// Pattern from opencode's bin launcher (anomalyco/opencode packages/opencode/bin/opencode).
|
|
@@ -10,8 +11,11 @@ const os = require("node:os");
|
|
|
10
11
|
|
|
11
12
|
const forwardedSignals = ["SIGINT", "SIGTERM", "SIGHUP"];
|
|
12
13
|
|
|
13
|
-
|
|
14
|
-
|
|
14
|
+
/** @param {string} target path of the platform binary to exec */
|
|
15
|
+
const run = (target) => {
|
|
16
|
+
const child = childProcess.spawn(target, process.argv.slice(2), {
|
|
17
|
+
stdio: "inherit",
|
|
18
|
+
});
|
|
15
19
|
|
|
16
20
|
child.on("error", (error) => {
|
|
17
21
|
console.error(error.message);
|
|
@@ -31,35 +35,41 @@ function run(target) {
|
|
|
31
35
|
child.on("exit", (code, signal) => {
|
|
32
36
|
if (signal) {
|
|
33
37
|
process.kill(process.pid, signal);
|
|
38
|
+
|
|
34
39
|
return;
|
|
35
40
|
}
|
|
36
|
-
|
|
41
|
+
|
|
42
|
+
process.exit(code ?? 1);
|
|
37
43
|
});
|
|
38
|
-
}
|
|
44
|
+
};
|
|
39
45
|
|
|
40
46
|
const packageName = `stet-${os.platform()}-${os.arch()}`;
|
|
41
47
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
48
|
+
/**
|
|
49
|
+
* Walks up from `dir` through each ancestor's `node_modules`, the way Node resolves a package.
|
|
50
|
+
* @param {string} dir directory to start the search from
|
|
51
|
+
* @returns {string | undefined} the binary's path, or undefined when no ancestor has it
|
|
52
|
+
*/
|
|
53
|
+
const findBinary = (dir) => {
|
|
54
|
+
const candidate = path.join(dir, "node_modules", packageName, "bin", "stet");
|
|
49
55
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
return undefined;
|
|
53
|
-
}
|
|
54
|
-
current = parent;
|
|
56
|
+
if (fs.existsSync(candidate)) {
|
|
57
|
+
return candidate;
|
|
55
58
|
}
|
|
56
|
-
}
|
|
57
59
|
|
|
58
|
-
const
|
|
60
|
+
const parent = path.dirname(dir);
|
|
61
|
+
|
|
62
|
+
return parent === dir ? undefined : findBinary(parent);
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
const fromEnv = process.env.STET_BIN_PATH;
|
|
66
|
+
|
|
67
|
+
const resolved =
|
|
68
|
+
fromEnv !== undefined && fromEnv !== "" ? fromEnv : findBinary(__dirname);
|
|
59
69
|
|
|
60
|
-
if (
|
|
70
|
+
if (resolved === undefined) {
|
|
61
71
|
console.error(
|
|
62
|
-
`Could not find the stet binary for your platform. Your package manager may have skipped optional dependencies; try reinstalling, or install "${packageName}" directly. Supported platforms: darwin/linux on arm64/x64
|
|
72
|
+
`Could not find the stet binary for your platform. Your package manager may have skipped optional dependencies; try reinstalling, or install "${packageName}" directly. Supported platforms: darwin/linux on arm64/x64.`
|
|
63
73
|
);
|
|
64
74
|
process.exit(1);
|
|
65
75
|
}
|
package/package.json
CHANGED
|
@@ -16,14 +16,14 @@
|
|
|
16
16
|
"license": "MIT",
|
|
17
17
|
"name": "@jimmy.codes/stet",
|
|
18
18
|
"optionalDependencies": {
|
|
19
|
-
"stet-darwin-arm64": "0.
|
|
20
|
-
"stet-darwin-x64": "0.
|
|
21
|
-
"stet-linux-x64": "0.
|
|
22
|
-
"stet-linux-arm64": "0.
|
|
19
|
+
"stet-darwin-arm64": "0.11.0",
|
|
20
|
+
"stet-darwin-x64": "0.11.0",
|
|
21
|
+
"stet-linux-x64": "0.11.0",
|
|
22
|
+
"stet-linux-arm64": "0.11.0"
|
|
23
23
|
},
|
|
24
24
|
"repository": {
|
|
25
25
|
"type": "git",
|
|
26
26
|
"url": "github:jimmy-guzman/stet"
|
|
27
27
|
},
|
|
28
|
-
"version": "0.
|
|
28
|
+
"version": "0.11.0"
|
|
29
29
|
}
|