opencode-manager 0.1.0 → 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/README.md +92 -0
- package/bun.lock +17 -16
- package/package.json +5 -5
- package/src/opencode-tui.tsx +4 -2
package/README.md
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# OpenCode Metadata Manager
|
|
2
|
+
|
|
3
|
+
Terminal UI for inspecting, filtering, and pruning OpenCode metadata stored on disk. The app is written in TypeScript, runs on Bun, and renders with [`@opentui/react`](https://github.com/open-tui/opentui).
|
|
4
|
+
|
|
5
|
+
## Screenshots
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
<img src="home-screen.png" alt="OpenCode Metadata Manager home screen showing projects and sessions" width="85%" />
|
|
9
|
+
<br />
|
|
10
|
+
<em>Main workspace with Projects (left) and Sessions (right) panels.</em>
|
|
11
|
+
</p>
|
|
12
|
+
|
|
13
|
+
<p align="center">
|
|
14
|
+
<img src="help-screen.png" alt="OpenCode Metadata Manager help overlay" width="85%" />
|
|
15
|
+
<br />
|
|
16
|
+
<em>Contextual help overlay with key bindings and tips.</em>
|
|
17
|
+
</p>
|
|
18
|
+
|
|
19
|
+
## Features
|
|
20
|
+
- List both OpenCode projects and sessions from a local metadata root.
|
|
21
|
+
- Filter by “missing only”, bulk-select, and delete metadata safely.
|
|
22
|
+
- Jump from a project directly to its sessions and keep contextual filters.
|
|
23
|
+
- Global search bar (`/` to focus, `Enter` to apply, `Esc` or `X` to clear).
|
|
24
|
+
- Rich help overlay with live key hints (`?` or `H`).
|
|
25
|
+
- Zero-install via `bunx` so even CI shells can run it without cloning.
|
|
26
|
+
|
|
27
|
+
## Requirements
|
|
28
|
+
- [Bun](https://bun.sh) **1.1.0+** (developed/tested on 1.2.x).
|
|
29
|
+
- A node-compatible terminal (truecolor improves readability but is optional).
|
|
30
|
+
|
|
31
|
+
## Installation
|
|
32
|
+
```bash
|
|
33
|
+
# Clone the repo and install deps
|
|
34
|
+
git clone git@github.com:kcrommett/oc-manager.git
|
|
35
|
+
cd oc-manager
|
|
36
|
+
bun install
|
|
37
|
+
|
|
38
|
+
# Or run on demand without cloning
|
|
39
|
+
bunx opencode-manager --help
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
The repository ships with a focused `.gitignore`, keeping `node_modules/`, caches, and logs out of Git history.
|
|
43
|
+
|
|
44
|
+
## Usage
|
|
45
|
+
```bash
|
|
46
|
+
# Preferred: zero-install command
|
|
47
|
+
bunx opencode-manager --root ~/.local/share/opencode
|
|
48
|
+
|
|
49
|
+
# Local dev run (forwards extra args after --)
|
|
50
|
+
bun run tui -- --root ~/.local/share/opencode
|
|
51
|
+
|
|
52
|
+
# Legacy Python wrapper (still used by some automation)
|
|
53
|
+
./manage_opencode_projects.py --root ~/.local/share/opencode -- --help
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Keyboard reference:
|
|
57
|
+
- **Global**: `Tab`/`1`/`2` switch tabs, `/` search, `X` clear search, `R` reload, `Q` quit, `?` help.
|
|
58
|
+
- **Projects**: `Space` toggle selection, `A` select all, `M` missing-only filter, `D` delete, `Enter` jump to Sessions.
|
|
59
|
+
- **Sessions**: `Space` select, `S` toggle updated/created sort, `D` delete, `C` clear project filter, `Enter` details.
|
|
60
|
+
|
|
61
|
+
## Development Workflow
|
|
62
|
+
1. Install dependencies with `bun install`.
|
|
63
|
+
2. Run the TUI via `bun run tui` (pass storage flags after `--`).
|
|
64
|
+
3. Use `bun run dev` for watch mode.
|
|
65
|
+
4. Type-check with `bun run typecheck` (`tsc --noEmit`).
|
|
66
|
+
|
|
67
|
+
### Project Structure
|
|
68
|
+
```
|
|
69
|
+
src/
|
|
70
|
+
bin/opencode-manager.ts # Bun-native CLI shim exposed as the bin entry
|
|
71
|
+
opencode-tui.tsx # Main TUI implementation (panels, search, help)
|
|
72
|
+
manage_opencode_projects.py # Legacy Python launcher for backwards compatibility
|
|
73
|
+
opencode-gen.sh # Spec snapshot helper script
|
|
74
|
+
PROJECT-SUMMARY.md # Extended design notes & roadmap
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Packaging & Publish
|
|
78
|
+
1. `bun install`
|
|
79
|
+
2. `bun run typecheck`
|
|
80
|
+
3. Update `version` in `package.json`
|
|
81
|
+
4. `npm publish` (package exposes the `opencode-manager` bin with public access)
|
|
82
|
+
|
|
83
|
+
## Troubleshooting
|
|
84
|
+
- **tmux failures**: Some sandboxed environments block tmux sockets under `/tmp`. Run `bun run tui` directly if tmux refuses to start.
|
|
85
|
+
- **Rendering glitches**: OpenTUI expects all textual content inside `<text>` nodes. When adding UI components, follow the existing helpers (e.g., `KeyChip`, `Bullet`).
|
|
86
|
+
- **Search won’t clear**: Press `Esc` while the search bar is focused, or hit `X` while in normal navigation.
|
|
87
|
+
|
|
88
|
+
## Contributing
|
|
89
|
+
Issues and pull requests are welcome. Please include reproduction steps for metadata edge cases and run `bun run typecheck` before submitting patches.
|
|
90
|
+
|
|
91
|
+
## License
|
|
92
|
+
MIT © OpenCode contributors. See [`LICENSE`](./LICENSE).
|
package/bun.lock
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"lockfileVersion": 1,
|
|
3
|
+
"configVersion": 0,
|
|
3
4
|
"workspaces": {
|
|
4
5
|
"": {
|
|
5
6
|
"name": "opencode-tools",
|
|
6
7
|
"dependencies": {
|
|
7
|
-
"@opentui/core": "^0.1.
|
|
8
|
-
"@opentui/react": "^0.1.
|
|
8
|
+
"@opentui/core": "^0.1.44",
|
|
9
|
+
"@opentui/react": "^0.1.44",
|
|
9
10
|
"react": "^19.0.0",
|
|
10
11
|
},
|
|
11
12
|
"devDependencies": {
|
|
@@ -74,21 +75,21 @@
|
|
|
74
75
|
|
|
75
76
|
"@jimp/utils": ["@jimp/utils@1.6.0", "", { "dependencies": { "@jimp/types": "1.6.0", "tinycolor2": "^1.6.0" } }, "sha512-gqFTGEosKbOkYF/WFj26jMHOI5OH2jeP1MmC/zbK6BF6VJBf8rIC5898dPfSzZEbSA0wbbV5slbntWVc5PKLFA=="],
|
|
76
77
|
|
|
77
|
-
"@opentui/core": ["@opentui/core@0.1.
|
|
78
|
+
"@opentui/core": ["@opentui/core@0.1.44", "", { "dependencies": { "bun-ffi-structs": "0.1.2", "jimp": "1.6.0", "yoga-layout": "3.2.1" }, "optionalDependencies": { "@dimforge/rapier2d-simd-compat": "^0.17.3", "@opentui/core-darwin-arm64": "0.1.44", "@opentui/core-darwin-x64": "0.1.44", "@opentui/core-linux-arm64": "0.1.44", "@opentui/core-linux-x64": "0.1.44", "@opentui/core-win32-arm64": "0.1.44", "@opentui/core-win32-x64": "0.1.44", "bun-webgpu": "0.1.4", "planck": "^1.4.2", "three": "0.177.0" }, "peerDependencies": { "web-tree-sitter": "0.25.10" } }, "sha512-+lP4TuQTgDXjeZ/18zbgS74F3Ggp7gsh1cpZD5n50I2dSHBkKVgsfjSXB7OvFR+4p56wyol+uG8cwlhk58IZCA=="],
|
|
78
79
|
|
|
79
|
-
"@opentui/core-darwin-arm64": ["@opentui/core-darwin-arm64@0.1.
|
|
80
|
+
"@opentui/core-darwin-arm64": ["@opentui/core-darwin-arm64@0.1.44", "", { "os": "darwin", "cpu": "arm64" }, "sha512-0ekoVf4e0wABfCuArA4tWON+uUdogpLqMZ51XP1yqI/aF08i+W4cY3rnw7ZoAWZzGR+hWCKnllWCbsmApmznpQ=="],
|
|
80
81
|
|
|
81
|
-
"@opentui/core-darwin-x64": ["@opentui/core-darwin-x64@0.1.
|
|
82
|
+
"@opentui/core-darwin-x64": ["@opentui/core-darwin-x64@0.1.44", "", { "os": "darwin", "cpu": "x64" }, "sha512-Q093OEKKYFatoH3mdTuoJuRmZuoYcEGEDuC3ZN+sTGM2Qla6DRkV1LrPnlzPL4P8lfZ1ZZSy376nYB5vCkIvNQ=="],
|
|
82
83
|
|
|
83
|
-
"@opentui/core-linux-arm64": ["@opentui/core-linux-arm64@0.1.
|
|
84
|
+
"@opentui/core-linux-arm64": ["@opentui/core-linux-arm64@0.1.44", "", { "os": "linux", "cpu": "arm64" }, "sha512-PdyJK/6ihM4Kz9zOseFGVlJeUB7sv5HkrTmQ3UEwXIX8TlOhR0t5YBHNDuRakOzyWvN0xoNA/Lk3YDVYS8elWg=="],
|
|
84
85
|
|
|
85
|
-
"@opentui/core-linux-x64": ["@opentui/core-linux-x64@0.1.
|
|
86
|
+
"@opentui/core-linux-x64": ["@opentui/core-linux-x64@0.1.44", "", { "os": "linux", "cpu": "x64" }, "sha512-DEW8Zg0mhy/zk9iErj4hq6FdtwA0Re3RdzgXb6OK6f6pPojJdg1cfYyiwJ1jy8uAHEtzscYLxDwPvCx6qKckhg=="],
|
|
86
87
|
|
|
87
|
-
"@opentui/core-win32-arm64": ["@opentui/core-win32-arm64@0.1.
|
|
88
|
+
"@opentui/core-win32-arm64": ["@opentui/core-win32-arm64@0.1.44", "", { "os": "win32", "cpu": "arm64" }, "sha512-2C6VC5sMNyXa9a9pAmpF0uluyEnBkDOzGt8c2LarsvNb+NZlLVZHMdK+EpTgixuUanH+/7Dqalc9BSZyeEuiFA=="],
|
|
88
89
|
|
|
89
|
-
"@opentui/core-win32-x64": ["@opentui/core-win32-x64@0.1.
|
|
90
|
+
"@opentui/core-win32-x64": ["@opentui/core-win32-x64@0.1.44", "", { "os": "win32", "cpu": "x64" }, "sha512-r0IFCe52ex2lCa+TBdcOBrEgvYY5OQTTMK6xHenUp4Pm9RiCYTM0oLfE4D+CycuMUmzCwsoX5L4D5WnlN5Lm7g=="],
|
|
90
91
|
|
|
91
|
-
"@opentui/react": ["@opentui/react@0.1.
|
|
92
|
+
"@opentui/react": ["@opentui/react@0.1.44", "", { "dependencies": { "@opentui/core": "0.1.44", "react-reconciler": "^0.32.0" }, "peerDependencies": { "react": ">=19.0.0" } }, "sha512-A08aJUR66dtkIranBRBZPD+iNJLYr32UsVeFEe94tDF6biAQz/G+RjedOi4e/6k+0Q27WNoZK8qw3P5R4qNHWg=="],
|
|
92
93
|
|
|
93
94
|
"@tokenizer/token": ["@tokenizer/token@0.3.0", "", {}, "sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A=="],
|
|
94
95
|
|
|
@@ -110,17 +111,17 @@
|
|
|
110
111
|
|
|
111
112
|
"buffer": ["buffer@6.0.3", "", { "dependencies": { "base64-js": "^1.3.1", "ieee754": "^1.2.1" } }, "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA=="],
|
|
112
113
|
|
|
113
|
-
"bun-ffi-structs": ["bun-ffi-structs@0.1.
|
|
114
|
+
"bun-ffi-structs": ["bun-ffi-structs@0.1.2", "", { "peerDependencies": { "typescript": "^5" } }, "sha512-Lh1oQAYHDcnesJauieA4UNkWGXY9hYck7OA5IaRwE3Bp6K2F2pJSNYqq+hIy7P3uOvo3km3oxS8304g5gDMl/w=="],
|
|
114
115
|
|
|
115
|
-
"bun-webgpu": ["bun-webgpu@0.1.
|
|
116
|
+
"bun-webgpu": ["bun-webgpu@0.1.4", "", { "dependencies": { "@webgpu/types": "^0.1.60" }, "optionalDependencies": { "bun-webgpu-darwin-arm64": "^0.1.4", "bun-webgpu-darwin-x64": "^0.1.4", "bun-webgpu-linux-x64": "^0.1.4", "bun-webgpu-win32-x64": "^0.1.4" } }, "sha512-Kw+HoXl1PMWJTh9wvh63SSRofTA8vYBFCw0XEP1V1fFdQEDhI8Sgf73sdndE/oDpN/7CMx0Yv/q8FCvO39ROMQ=="],
|
|
116
117
|
|
|
117
|
-
"bun-webgpu-darwin-arm64": ["bun-webgpu-darwin-arm64@0.1.
|
|
118
|
+
"bun-webgpu-darwin-arm64": ["bun-webgpu-darwin-arm64@0.1.4", "", { "os": "darwin", "cpu": "arm64" }, "sha512-eDgLN9teKTfmvrCqgwwmWNsNszxYs7IZdCqk0S1DCarvMhr4wcajoSBlA/nQA0/owwLduPTS8xxCnQp4/N/gDg=="],
|
|
118
119
|
|
|
119
|
-
"bun-webgpu-darwin-x64": ["bun-webgpu-darwin-x64@0.1.
|
|
120
|
+
"bun-webgpu-darwin-x64": ["bun-webgpu-darwin-x64@0.1.4", "", { "os": "darwin", "cpu": "x64" }, "sha512-X+PjwJUWenUmdQBP8EtdItMyieQ6Nlpn+BH518oaouDiSnWj5+b0Y7DNDZJq7Ezom4EaxmqL/uGYZK3aCQ7CXg=="],
|
|
120
121
|
|
|
121
|
-
"bun-webgpu-linux-x64": ["bun-webgpu-linux-x64@0.1.
|
|
122
|
+
"bun-webgpu-linux-x64": ["bun-webgpu-linux-x64@0.1.4", "", { "os": "linux", "cpu": "x64" }, "sha512-zMLs2YIGB+/jxrYFXaFhVKX/GBt05UTF45lc9srcHc9JXGjEj+12CIo1CHLTAWatXMTqt0Jsu6ukWEoWVT/ayA=="],
|
|
122
123
|
|
|
123
|
-
"bun-webgpu-win32-x64": ["bun-webgpu-win32-x64@0.1.
|
|
124
|
+
"bun-webgpu-win32-x64": ["bun-webgpu-win32-x64@0.1.4", "", { "os": "win32", "cpu": "x64" }, "sha512-Z5yAK28xrcm8Wb5k7TZ8FJKpOI/r+aVCRdlHYAqI2SDJFN3nD4mJs900X6kNVmG/xFzb5yOuKVYWGg+6ZXWbyA=="],
|
|
124
125
|
|
|
125
126
|
"csstype": ["csstype@3.1.3", "", {}, "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw=="],
|
|
126
127
|
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-manager",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Terminal UI for inspecting OpenCode metadata stores.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
|
-
"packageManager": "bun@1.
|
|
7
|
+
"packageManager": "bun@1.3.2",
|
|
8
8
|
"engines": {
|
|
9
|
-
"bun": ">=1.
|
|
9
|
+
"bun": ">=1.3.0"
|
|
10
10
|
},
|
|
11
11
|
"bin": {
|
|
12
12
|
"opencode-manager": "./src/bin/opencode-manager.ts"
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
"access": "public"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@opentui/core": "^0.1.
|
|
47
|
-
"@opentui/react": "^0.1.
|
|
46
|
+
"@opentui/core": "^0.1.44",
|
|
47
|
+
"@opentui/react": "^0.1.44",
|
|
48
48
|
"react": "^19.0.0"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
package/src/opencode-tui.tsx
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { KeyEvent, SelectOption } from "@opentui/core"
|
|
2
|
-
import {
|
|
2
|
+
import { createRoot, useKeyboard, useRenderer } from "@opentui/react"
|
|
3
|
+
import { createCliRenderer } from "@opentui/core"
|
|
3
4
|
import React, {
|
|
4
5
|
forwardRef,
|
|
5
6
|
useCallback,
|
|
@@ -1037,7 +1038,8 @@ Key bindings:
|
|
|
1037
1038
|
|
|
1038
1039
|
async function bootstrap() {
|
|
1039
1040
|
const { root } = parseArgs()
|
|
1040
|
-
|
|
1041
|
+
const renderer = await createCliRenderer()
|
|
1042
|
+
createRoot(renderer).render(<App root={root} />)
|
|
1041
1043
|
}
|
|
1042
1044
|
|
|
1043
1045
|
bootstrap().catch((error) => {
|