opencode-top 3.3.3 → 3.3.5
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 +3 -3
- package/bin/octop.mjs +13 -0
- package/dist/cli.mjs +3 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Monitor your [OpenCode](https://opencode.ai) AI coding sessions in real-time — token usage, costs, agent chains, tool calls, and more.
|
|
4
4
|
|
|
5
|
-

|
|
6
6
|
|
|
7
7
|
## Install
|
|
8
8
|
|
|
@@ -68,8 +68,8 @@ Requires OpenCode to have been run at least once (reads from `~/.local/share/ope
|
|
|
68
68
|
## Development
|
|
69
69
|
|
|
70
70
|
```bash
|
|
71
|
-
git clone https://github.com/Nielk74/
|
|
72
|
-
cd
|
|
71
|
+
git clone https://github.com/Nielk74/opencode-top
|
|
72
|
+
cd opencode-top
|
|
73
73
|
npm install
|
|
74
74
|
npm start live # run from source with tsx
|
|
75
75
|
```
|
package/bin/octop.mjs
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire } from "module";
|
|
3
|
+
import { fileURLToPath } from "url";
|
|
4
|
+
import { dirname, join } from "path";
|
|
5
|
+
|
|
6
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
7
|
+
const pkgRoot = join(__dirname, "..");
|
|
8
|
+
|
|
9
|
+
// Use tsx to run the TypeScript source
|
|
10
|
+
const { register } = await import("tsx/esm/api");
|
|
11
|
+
register();
|
|
12
|
+
|
|
13
|
+
await import(join(pkgRoot, "src", "cli.ts"));
|
package/dist/cli.mjs
CHANGED
|
@@ -22508,7 +22508,9 @@ function App2({ refreshInterval = 2e3 }) {
|
|
|
22508
22508
|
}
|
|
22509
22509
|
|
|
22510
22510
|
// src/cli.ts
|
|
22511
|
-
|
|
22511
|
+
import { createRequire } from "node:module";
|
|
22512
|
+
var require2 = createRequire(import.meta.url);
|
|
22513
|
+
var pkg = require2("../package.json");
|
|
22512
22514
|
program.name(pkg.name).version(pkg.version).description("Monitor OpenCode AI coding sessions");
|
|
22513
22515
|
program.command("live").description("Start live monitoring dashboard").option("-i, --interval <ms>", "Refresh interval in milliseconds", "2000").action((options) => {
|
|
22514
22516
|
const refreshInterval = Number.parseInt(options.interval, 10);
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-top",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.5",
|
|
4
4
|
"description": "Monitor OpenCode AI coding sessions - Token usage, costs, and agent analytics",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
|
-
"opencode-top": "
|
|
7
|
+
"opencode-top": "bin/octop.mjs"
|
|
8
8
|
},
|
|
9
9
|
"scripts": {
|
|
10
10
|
"build": "node build.mjs",
|