Page 4 of 5
Make sure that last part is clear in the readme for the users
<file>
00089|
00090| If you already have the plugin installed, run the local update script:
00091|
00092| ```bash
00093| ~/.config/opencode/plugin/install.sh --update
00094| ```
00095|
00096| Or use the remote script:
00097|
00098| ```bash
00099| curl -sSL https://raw.githubusercontent.com/ramtinJ95/opencode-tokenscope/main/install.sh | bash -s -- --update
00100| ```
00101|
00102| Both methods download the latest plugin files while skipping dependency installation (faster).
00103|
00104| For a full reinstall (if you're having issues):
00105|
00106| ```bash
00107| curl -sSL https://raw.githubusercontent.com/ramtinJ95/opencode-tokenscope/main/install.sh | bash
00108| ```
00109|
00110| ## Usage
00111|
00112| ### Basic Command
00113|
(File has more lines. Use 'offset' parameter to read beyond line 113)
</file>
If you already have the plugin installed, run the local update script:
```bash
~/.config/opencode/plugin/install.sh --update
```
Or use the remote script:
```bash
curl -sSL https://raw.githubusercontent.com/ramtinJ95/opencode-tokenscope/main/install.sh | bash -s -- --update
```
Both methods download the latest plugin files while skipping dependency installation (faster).
For a full reinstall (if you're having issues):
```bash
curl -sSL https://raw.githubusercontent.com/ramtinJ95/opencode-tokenscope/main/install.sh | bash
```
### Quick Update (v1.2.1+)
If you have v1.2.1 or later installed, use the local update script:
```bash
~/.config/opencode/plugin/install.sh --update
```
### Update from v1.2.0 or Earlier
Use the remote script (this will also install the local update script for future use):
```bash
curl -sSL https://raw.githubusercontent.com/ramtinJ95/opencode-tokenscope/main/install.sh | bash -s -- --update
```
Both methods download the latest plugin files while skipping dependency installation (faster).
### Full Reinstall
For a full reinstall (if you're having issues):
```bash
curl -sSL https://raw.githubusercontent.com/ramtinJ95/opencode-tokenscope/main/install.sh | bash
```
[main 93bd925] Clarify update instructions for different versions
1 file changed, 8 insertions(+), 2 deletions(-)
To github.com:ramtinJ95/opencode-tokenscope.git
9861778..93bd925 main -> main
what should be the realse title and release notes for this new 1.2.1 release
Based on the changes since v1.2.0, here's what I'd suggest:
---
## Release Title
v1.2.1 - Local Update Script## Release Notes
## What's New
### Easier Updates
- Local update script: After installing v1.2.1+, you can update the plugin by simply running:
- No need to remember the curl command for future updates
### Documentation
- Clarified update instructions for users on different versions
---
This is a small patch release, so the notes are brief. Want me to adjust anything?
okej everything is ready for me to create a new release right? the code and readme updates are all pushed?
Let me verify everything is pushed:
All 2 tools executed successfully.
Keep using the batch tool for optimal performance in your next response!
On branch main
Your branch is up to date with 'origin/main'.
nothing to commit, working tree clean
93bd925 Clarify update instructions for different versions
9861778 Document local update script in README
c7ccd31 Add install.sh to plugin folder for easier updates
ce7ae7b Bump version to 1.2.0
6e3fd1d README updates
4913368 Trying to make the data visualization a bit cleaner
f9e5284 Proper counting of API calls for subagents added to the total
fe5e747 Starting some work on tracking subagent costs and tokens also
e352d47 Adding a way to update the plugin easily
Wait - package.json is still at 1.2.0. For a v1.2.1 release, we should bump it:
<file>
00001| {
00002| "name": "opencode-tokenscope",
00003| "version": "1.2.0",
00004| "description": "OpenCode plugin for detailed token usage analysis",
00005| "type": "module",
00006| "dependencies": {}
00007| }
00008|
(End of file - total 8 lines)
</file>
"version": "1.2.0"
"version": "1.2.1"
[main bc33e37] Bump version to 1.2.1
1 file changed, 1 insertion(+), 1 deletion(-)
To github.com:ramtinJ95/opencode-tokenscope.git
93bd925..bc33e37 main -> main
Now everything is ready. Here's the summary:
- ✅ Working tree clean
- ✅ All changes pushed to origin/main
- ✅ package.json updated to 1.2.1
You're good to create the release on GitHub!
and why exactly do we need 2 install.sh script?
Good question! Currently we have:
1. /install.sh (root) - Used for the one-line curl install from GitHub
2. /plugin/install.sh (plugin folder) - Gets downloaded to user's machine for local updates
They're identical, which is redundant. We could simplify to just one file in the plugin/ folder and update the curl command in the README to point there instead.
Simplified approach:
- Keep only plugin/install.sh
- Update README curl commands from:
curl -sSL .../main/install.sh | bashcurl -sSL .../main/plugin/install.sh | bashWould you like me to remove the root install.sh and update the README? It's a minor change but keeps things cleaner.
yeah it makes more sense right? why have the same thing 2 times
Agreed, let's clean this up:
On branch main
Your branch is up to date with 'origin/main'.
Changes not staged for commit:
(use "git add/rm <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
deleted: install.sh
no changes added to commit (use "git add" and/or "git commit -a")
Now let me update the README to point to plugin/install.sh:
<file>
00031|
00032| ## Quick Install
00033|
00034| ### One-Line Install (Recommended)
00035|
00036| ```bash
00037| curl -sSL https://raw.githubusercontent.com/ramtinJ95/opencode-tokenscope/main/install.sh | bash
00038| ```
00039|
00040| Then restart OpenCode and run `/tokenscope`
00041|
00042| ## Manual Installation
00043|
00044| <details>
00045| <summary>Click to expand manual installation steps</summary>
00046|
00047| ### Requirements
00048| - OpenCode installed (`~/.config/opencode` directory exists)
00049| - npm (for tokenizer dependencies)
00050| - ~50MB disk space (for tokenizer models)
00051|
00052| ### Installation Steps
00053|
00054| 1. **Navigate to OpenCode config**:
00055| ```bash
00056| cd ~/.config/opencode
00057| ```
00058|
00059| 2. **Download plugin files**:
00060| ```bash
(File has more lines. Use 'offset' parameter to read beyond line 60)
</file>
```bash
curl -sSL https://raw.githubusercontent.com/ramtinJ95/opencode-tokenscope/main/install.sh | bash
```
```bash
curl -sSL https://raw.githubusercontent.com/ramtinJ95/opencode-tokenscope/main/plugin/install.sh | bash
```
37:curl -sSL https://raw.githubusercontent.com/ramtinJ95/opencode-tokenscope/main/install.sh | bash
103:curl -sSL https://raw.githubusercontent.com/ramtinJ95/opencode-tokenscope/main/install.sh | bash -s -- --update
113:curl -sSL https://raw.githubusercontent.com/ramtinJ95/opencode-tokenscope/main/install.sh | bash
https://raw.githubusercontent.com/ramtinJ95/opencode-tokenscope/main/install.sh
https://raw.githubusercontent.com/ramtinJ95/opencode-tokenscope/main/plugin/install.sh
Now commit and push:
[main f5a9a60] Remove duplicate install.sh, keep only plugin/install.sh
2 files changed, 3 insertions(+), 200 deletions(-)
delete mode 100755 install.sh
To github.com:ramtinJ95/opencode-tokenscope.git
bc33e37..f5a9a60 main -> main
Done! Now there's only one install.sh at plugin/install.sh and all README references point to it.
You'll need to update the release notes for v1.2.1 to mention this:
## What's New
### Easier Updates
- Local update script: After installing, update the plugin by running:
### Cleanup
- Consolidated to single install script at plugin/install.sh
- Updated install URLs in documentation