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.
- package/README.md +7 -69
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
[](https://www.typescriptlang.org/)
|
|
8
8
|
[](https://bun.sh)
|
|
9
9
|
[](https://opencode.ai)
|
|
10
|
+
[](https://www.npmjs.com/package/opencode-tps-meter)
|
|
10
11
|
[](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
|
-
|
|
45
|
+
Add the plugin to your OpenCode configuration file (`~/.config/opencode/opencode.json`):
|
|
45
46
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
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
|
-
|
|
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
|
|