@semboja/opencode-claude 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 +19 -13
- package/package.json +7 -3
package/README.md
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
# opencode-
|
|
1
|
+
# @semboja/opencode-claude
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@semboja/opencode-claude)
|
|
4
|
+
[](https://opensource.org/licenses/MIT)
|
|
2
5
|
|
|
3
6
|
Claude usage tracking plugin for OpenCode - monitor tokens, costs, sessions, and API performance.
|
|
4
7
|
|
|
8
|
+
**Repository:** https://github.com/SembojaTech/opencode-claude
|
|
9
|
+
|
|
5
10
|
## Features
|
|
6
11
|
|
|
7
12
|
- **Token Tracking**: Input, output, cache read, and cache creation tokens
|
|
@@ -17,9 +22,9 @@ Claude usage tracking plugin for OpenCode - monitor tokens, costs, sessions, and
|
|
|
17
22
|
## Installation
|
|
18
23
|
|
|
19
24
|
```bash
|
|
20
|
-
npm install opencode-
|
|
25
|
+
npm install @semboja/opencode-claude
|
|
21
26
|
# or
|
|
22
|
-
bun add opencode-
|
|
27
|
+
bun add @semboja/opencode-claude
|
|
23
28
|
```
|
|
24
29
|
|
|
25
30
|
## Configuration
|
|
@@ -33,7 +38,7 @@ Add to your `.opencode/opencode.json`:
|
|
|
33
38
|
"experimental": {
|
|
34
39
|
"openTelemetry": true
|
|
35
40
|
},
|
|
36
|
-
"plugin": ["opencode-
|
|
41
|
+
"plugin": ["@semboja/opencode-claude"]
|
|
37
42
|
}
|
|
38
43
|
```
|
|
39
44
|
|
|
@@ -66,16 +71,16 @@ Use the CLI to view your usage:
|
|
|
66
71
|
|
|
67
72
|
```bash
|
|
68
73
|
# Show usage report
|
|
69
|
-
npx
|
|
74
|
+
npx claude-tracker report
|
|
70
75
|
|
|
71
76
|
# List recent sessions
|
|
72
|
-
npx
|
|
77
|
+
npx claude-tracker sessions 20
|
|
73
78
|
|
|
74
79
|
# Export as JSON
|
|
75
|
-
npx
|
|
80
|
+
npx claude-tracker export json > usage.json
|
|
76
81
|
|
|
77
82
|
# Export as CSV
|
|
78
|
-
npx
|
|
83
|
+
npx claude-tracker export csv > usage.csv
|
|
79
84
|
```
|
|
80
85
|
|
|
81
86
|
### Example Report Output
|
|
@@ -113,7 +118,7 @@ Top Tools:
|
|
|
113
118
|
You can also use the plugin programmatically:
|
|
114
119
|
|
|
115
120
|
```typescript
|
|
116
|
-
import { getUsageStats, printUsageReport, FileStorage } from 'opencode-
|
|
121
|
+
import { getUsageStats, printUsageReport, FileStorage } from '@semboja/opencode-claude';
|
|
117
122
|
|
|
118
123
|
// Get usage statistics
|
|
119
124
|
const stats = await getUsageStats();
|
|
@@ -209,16 +214,17 @@ Before starting, make sure you have:
|
|
|
209
214
|
|
|
210
215
|
3. **The plugin installed** in your OpenCode project
|
|
211
216
|
```bash
|
|
212
|
-
npm install opencode-
|
|
217
|
+
npm install @semboja/opencode-claude
|
|
213
218
|
```
|
|
214
219
|
|
|
215
220
|
### Step 1: Start the Monitoring Stack
|
|
216
221
|
|
|
217
|
-
First,
|
|
222
|
+
First, clone the repository (or copy the docker-compose.yml to your project):
|
|
218
223
|
|
|
219
224
|
```bash
|
|
220
|
-
# Clone
|
|
221
|
-
|
|
225
|
+
# Clone the repository
|
|
226
|
+
git clone https://github.com/SembojaTech/opencode-claude.git
|
|
227
|
+
cd opencode-claude
|
|
222
228
|
|
|
223
229
|
# Start all services in the background
|
|
224
230
|
docker compose up -d
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semboja/opencode-claude",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Claude usage tracking plugin for OpenCode - monitor tokens, costs, sessions, and API performance",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -55,6 +55,10 @@
|
|
|
55
55
|
},
|
|
56
56
|
"repository": {
|
|
57
57
|
"type": "git",
|
|
58
|
-
"url": ""
|
|
58
|
+
"url": "git+https://github.com/SembojaTech/opencode-claude.git"
|
|
59
|
+
},
|
|
60
|
+
"homepage": "https://github.com/SembojaTech/opencode-claude#readme",
|
|
61
|
+
"bugs": {
|
|
62
|
+
"url": "https://github.com/SembojaTech/opencode-claude/issues"
|
|
59
63
|
}
|
|
60
|
-
}
|
|
64
|
+
}
|