26
.opencode/INSTALL.md
Normal file
26
.opencode/INSTALL.md
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
# Installing tmux-utils for OpenCode
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
Add the plugin to the `plugin` array in your `opencode.json`:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"plugin": ["tmux-utils"]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
If you install directly from git instead of a registry, use the git URL in that same array entry.
|
||||||
|
|
||||||
|
Restart OpenCode after updating the config.
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
This plugin provides:
|
||||||
|
|
||||||
|
- the `interactive_bash` tool for tmux-backed interactive sessions
|
||||||
|
- tmux subagent pane management tied to OpenCode session lifecycle events
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
|
||||||
|
Plugin configuration is loaded from standard OpenCode config locations for this project and user environment.
|
||||||
1
.opencode/plugins/tmux-utils.js
Normal file
1
.opencode/plugins/tmux-utils.js
Normal file
@@ -0,0 +1 @@
|
|||||||
|
export { default } from "../../dist/index.js"
|
||||||
13
README.md
Normal file
13
README.md
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
# tmux-utils
|
||||||
|
|
||||||
|
Standalone OpenCode plugin for tmux subagent panes and the `interactive_bash` tmux tool.
|
||||||
|
|
||||||
|
## OpenCode Install
|
||||||
|
|
||||||
|
Tell OpenCode:
|
||||||
|
|
||||||
|
```text
|
||||||
|
Fetch and follow instructions from ./.opencode/INSTALL.md
|
||||||
|
```
|
||||||
|
|
||||||
|
Detailed OpenCode docs: `docs/README.opencode.md`
|
||||||
25
docs/README.opencode.md
Normal file
25
docs/README.opencode.md
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
# tmux-utils for OpenCode
|
||||||
|
|
||||||
|
`tmux-utils` is an OpenCode plugin that adds a tmux-backed `interactive_bash` tool and manages tmux panes for subagent sessions.
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
Add the plugin to `opencode.json`:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"plugin": ["tmux-utils"]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Restart OpenCode after installing.
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
- `interactive_bash` tool backed by tmux
|
||||||
|
- tmux pane lifecycle management for subagent sessions
|
||||||
|
- plugin-config-driven tmux behavior
|
||||||
|
|
||||||
|
## Entrypoint Layout
|
||||||
|
|
||||||
|
The published package exposes an OpenCode-specific wrapper at `.opencode/plugins/tmux-utils.js`, which re-exports the built plugin from `dist/index.js`.
|
||||||
1007
opencode-session.json
Normal file
1007
opencode-session.json
Normal file
File diff suppressed because one or more lines are too long
@@ -2,16 +2,19 @@
|
|||||||
"name": "tmux-utils",
|
"name": "tmux-utils",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"description": "Standalone OpenCode plugin for tmux subagent panes and interactive tmux tool",
|
"description": "Standalone OpenCode plugin for tmux subagent panes and interactive tmux tool",
|
||||||
"main": "dist/index.js",
|
"main": ".opencode/plugins/tmux-utils.js",
|
||||||
"types": "dist/index.d.ts",
|
"types": "dist/index.d.ts",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"files": [
|
"files": [
|
||||||
"dist"
|
".opencode",
|
||||||
|
"dist",
|
||||||
|
"docs",
|
||||||
|
"README.md"
|
||||||
],
|
],
|
||||||
"exports": {
|
"exports": {
|
||||||
".": {
|
".": {
|
||||||
"types": "./dist/index.d.ts",
|
"types": "./dist/index.d.ts",
|
||||||
"import": "./dist/index.js"
|
"import": "./.opencode/plugins/tmux-utils.js"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
40
release.sh
Executable file
40
release.sh
Executable file
@@ -0,0 +1,40 @@
|
|||||||
|
#! /usr/bin/env nix
|
||||||
|
#! nix shell nixpkgs#bash nixpkgs#bun nixpkgs#git nixpkgs#nodejs --command bash
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
if [[ $# -ne 1 ]]; then
|
||||||
|
printf 'Usage: %s <version>\n' "$0" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
version="$1"
|
||||||
|
branch="$(git branch --show-current)"
|
||||||
|
|
||||||
|
if [[ "$branch" != "main" ]]; then
|
||||||
|
printf 'Release must run from main, current branch: %s\n' "$branch" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -n "$(git status --porcelain)" ]]; then
|
||||||
|
printf 'Working tree must be clean before releasing.\n' >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
git fetch origin main --tags
|
||||||
|
|
||||||
|
if ! git merge-base --is-ancestor origin/main HEAD; then
|
||||||
|
printf 'Local main is behind origin/main. Pull or rebase before releasing.\n' >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
bun run typecheck
|
||||||
|
bun run clean
|
||||||
|
bun run build
|
||||||
|
|
||||||
|
npm version "$version"
|
||||||
|
|
||||||
|
git push origin main
|
||||||
|
git push origin "v$version"
|
||||||
|
|
||||||
|
# vim: set ft=bash :
|
||||||
Reference in New Issue
Block a user