opencode-tps-meter 0.1.1 → 0.1.2

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.
Files changed (2) hide show
  1. package/README.md +7 -69
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -7,6 +7,7 @@
7
7
  [![TypeScript](https://img.shields.io/badge/TypeScript-5.0+-3178C6?logo=typescript&logoColor=white)](https://www.typescriptlang.org/)
8
8
  [![Bun](https://img.shields.io/badge/Bun-Runtime-000?logo=bun&logoColor=white)](https://bun.sh)
9
9
  [![OpenCode](https://img.shields.io/badge/OpenCode-Plugin-7C3AED?logo=code&logoColor=white)](https://opencode.ai)
10
+ [![NPM Version](https://img.shields.io/npm/v/opencode-tps-meter.svg)](https://www.npmjs.com/package/opencode-tps-meter)
10
11
  [![License](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)
11
12
 
12
13
  </div>
@@ -41,82 +42,19 @@ A live tokens-per-second meter plugin for OpenCode. Track AI token throughput in
41
42
 
42
43
  ## Installation
43
44
 
44
- ### From NPM (Recommended)
45
+ Add the plugin to your OpenCode configuration file (`~/.config/opencode/opencode.json`):
45
46
 
46
- The easiest way to install is from the NPM registry:
47
-
48
- ```bash
49
- # Using bun
50
- bun add opencode-tps-meter
51
-
52
- # Using npm
53
- npm install opencode-tps-meter
54
-
55
- # Using yarn
56
- yarn add opencode-tps-meter
57
- ```
58
-
59
- Then add to your OpenCode configuration (see [Quick Start](#quick-start) below).
60
-
61
- ### From Git Repository
62
-
63
- If you prefer to install directly from GitHub:
64
-
65
- ```bash
66
- # Install directly from git
67
- bun add github:ChiR24/opencode-tps-meter
68
-
69
- # Or with npm
70
- npm install github:ChiR24/opencode-tps-meter
71
- ```
72
-
73
- ### From Local Directory (Development)
74
-
75
- For local development or testing:
76
-
77
- ```bash
78
- # Clone the repository
79
- git clone https://github.com/ChiR24/opencode-tps-meter.git
80
- cd opencode-tps-meter
81
-
82
- # Install dependencies and build
83
- bun install
84
- bun run build
85
-
86
- # Link for local development
87
- bun link
88
- ```
89
-
90
- Then in your OpenCode project:
91
-
92
- ```bash
93
- # Link the plugin locally
94
- bun link opencode-tps-meter
47
+ ```json
48
+ {
49
+ "plugin": ["opencode-tps-meter@latest"]
50
+ }
95
51
  ```
96
52
 
97
53
  ---
98
54
 
99
55
  ## Quick Start
100
56
 
101
- > **Prerequisites:** Make sure you've built the plugin first:
102
- > ```bash
103
- > bun install
104
- > bun run build
105
- > ```
106
-
107
- ### As OpenCode Plugin (Recommended)
108
-
109
- Create a plugin file in your OpenCode project:
110
-
111
- ```typescript
112
- // File: tps-meter-plugin.ts (or .js)
113
- import TpsMeterPlugin from 'opencode-tps-meter';
114
-
115
- // Export the plugin - it automatically hooks into OpenCode events
116
- export default TpsMeterPlugin;
117
- ```
118
-
119
- Then configure it in your OpenCode config (see Configuration section below).
57
+ The plugin will automatically hook into OpenCode events and start tracking TPS after installation.
120
58
 
121
59
  ### Programmatic Usage
122
60
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-tps-meter",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Live tokens-per-second meter for OpenCode",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",