@ccusage/pi 17.2.0
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 +116 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +6674 -0
- package/dist/prompt-B3KnGVky.js +843 -0
- package/package.json +46 -0
- package/src/index.ts +34 -0
package/package.json
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ccusage/pi",
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "17.2.0",
|
|
5
|
+
"description": "Pi-agent usage tracking - unified Claude Max usage across Claude Code and pi-agent",
|
|
6
|
+
"author": "ryoppippi",
|
|
7
|
+
"contributors": [
|
|
8
|
+
"nicobailon"
|
|
9
|
+
],
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"funding": "https://github.com/ryoppippi/ccusage?sponsor=1",
|
|
12
|
+
"homepage": "https://github.com/ryoppippi/ccusage#readme",
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "git+https://github.com/ryoppippi/ccusage.git"
|
|
16
|
+
},
|
|
17
|
+
"bugs": {
|
|
18
|
+
"url": "https://github.com/ryoppippi/ccusage/issues"
|
|
19
|
+
},
|
|
20
|
+
"exports": {
|
|
21
|
+
".": "./src/index.ts",
|
|
22
|
+
"./package.json": "./package.json"
|
|
23
|
+
},
|
|
24
|
+
"main": "./dist/index.js",
|
|
25
|
+
"module": "./dist/index.js",
|
|
26
|
+
"types": "./dist/index.d.ts",
|
|
27
|
+
"bin": {
|
|
28
|
+
"ccusage-pi": "./src/index.ts"
|
|
29
|
+
},
|
|
30
|
+
"files": [
|
|
31
|
+
"README.md",
|
|
32
|
+
"dist"
|
|
33
|
+
],
|
|
34
|
+
"publishConfig": {
|
|
35
|
+
"bin": {
|
|
36
|
+
"ccusage-pi": "./dist/index.js"
|
|
37
|
+
},
|
|
38
|
+
"exports": {
|
|
39
|
+
".": "./dist/index.js",
|
|
40
|
+
"./package.json": "./package.json"
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"engines": {
|
|
44
|
+
"node": ">=20.19.4"
|
|
45
|
+
}
|
|
46
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import process from 'node:process';
|
|
4
|
+
import { cli } from 'gunshi';
|
|
5
|
+
import { description, name, version } from '../package.json';
|
|
6
|
+
import { dailyCommand } from './commands/daily.ts';
|
|
7
|
+
import { monthlyCommand } from './commands/monthly.ts';
|
|
8
|
+
import { sessionCommand } from './commands/session.ts';
|
|
9
|
+
|
|
10
|
+
const subCommands = new Map([
|
|
11
|
+
['daily', dailyCommand],
|
|
12
|
+
['monthly', monthlyCommand],
|
|
13
|
+
['session', sessionCommand],
|
|
14
|
+
]);
|
|
15
|
+
|
|
16
|
+
const mainCommand = dailyCommand;
|
|
17
|
+
|
|
18
|
+
async function run(): Promise<void> {
|
|
19
|
+
let args = process.argv.slice(2);
|
|
20
|
+
if (args[0] === 'ccusage-pi') {
|
|
21
|
+
args = args.slice(1);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
await cli(args, mainCommand, {
|
|
25
|
+
name,
|
|
26
|
+
version,
|
|
27
|
+
description,
|
|
28
|
+
subCommands,
|
|
29
|
+
renderHeader: null,
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// eslint-disable-next-line antfu/no-top-level-await
|
|
34
|
+
await run();
|