@simonesiega/codex-limits 0.1.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/.env.example +21 -0
- package/CHANGELOG.md +13 -0
- package/LICENSE +21 -0
- package/README.md +150 -0
- package/dist/cli.js +42856 -0
- package/dist/index.js +1062 -0
- package/docs/photos/agents/opencode/opencode_result.png +0 -0
- package/docs/photos/logo/logo.png +0 -0
- package/docs/photos/terminal/final_result.png +0 -0
- package/package.json +73 -0
- package/scripts/postinstall.cjs +13 -0
- package/types/index.d.ts +9 -0
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@simonesiega/codex-limits",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Check Codex usage limits, reset times, and reset-credit coupons from a fast, read-only terminal dashboard.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"codex-limits": "dist/cli.js"
|
|
8
|
+
},
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./types/index.d.ts",
|
|
12
|
+
"import": "./dist/index.js"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"types": "./types/index.d.ts",
|
|
16
|
+
"files": [
|
|
17
|
+
"dist",
|
|
18
|
+
"types",
|
|
19
|
+
"docs/photos",
|
|
20
|
+
"scripts/postinstall.cjs",
|
|
21
|
+
"README.md",
|
|
22
|
+
"CHANGELOG.md",
|
|
23
|
+
".env.example",
|
|
24
|
+
"LICENSE"
|
|
25
|
+
],
|
|
26
|
+
"scripts": {
|
|
27
|
+
"dev": "bun run src/package/cli.ts",
|
|
28
|
+
"build": "bun build src/package/cli.ts --target=node --outfile=dist/cli.js && bun build src/agents/opencode/plugin.tsx --target=node --external \"@opentui/*\" --outfile=dist/index.js",
|
|
29
|
+
"typecheck": "tsc --noEmit",
|
|
30
|
+
"test": "bun test",
|
|
31
|
+
"check": "bun run typecheck && bun test && bun run build",
|
|
32
|
+
"prepack": "bun run check",
|
|
33
|
+
"postinstall": "node ./scripts/postinstall.cjs"
|
|
34
|
+
},
|
|
35
|
+
"keywords": [
|
|
36
|
+
"codex",
|
|
37
|
+
"openai",
|
|
38
|
+
"cli",
|
|
39
|
+
"terminal",
|
|
40
|
+
"typescript",
|
|
41
|
+
"bun",
|
|
42
|
+
"npm",
|
|
43
|
+
"developer-tools",
|
|
44
|
+
"rate-limits",
|
|
45
|
+
"usage-tracker"
|
|
46
|
+
],
|
|
47
|
+
"author": "Simone Siega",
|
|
48
|
+
"license": "MIT",
|
|
49
|
+
"repository": {
|
|
50
|
+
"type": "git",
|
|
51
|
+
"url": "git+https://github.com/simonesiega/codex-limits.git"
|
|
52
|
+
},
|
|
53
|
+
"bugs": {
|
|
54
|
+
"url": "https://github.com/simonesiega/codex-limits/issues"
|
|
55
|
+
},
|
|
56
|
+
"homepage": "https://github.com/simonesiega/codex-limits",
|
|
57
|
+
"engines": {
|
|
58
|
+
"node": ">=20"
|
|
59
|
+
},
|
|
60
|
+
"packageManager": "bun@1.3.14",
|
|
61
|
+
"devDependencies": {
|
|
62
|
+
"@opencode-ai/plugin": "^1.15.4",
|
|
63
|
+
"@types/node": "^22.10.2",
|
|
64
|
+
"@types/react": "^19.2.17",
|
|
65
|
+
"bun-types": "^1.1.42",
|
|
66
|
+
"ink-testing-library": "^4.0.0",
|
|
67
|
+
"typescript": "^5.7.2"
|
|
68
|
+
},
|
|
69
|
+
"dependencies": {
|
|
70
|
+
"ink": "^7.1.0",
|
|
71
|
+
"react": "^19.2.7"
|
|
72
|
+
}
|
|
73
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const { existsSync } = require("node:fs");
|
|
2
|
+
const { join } = require("node:path");
|
|
3
|
+
|
|
4
|
+
const root = process.cwd();
|
|
5
|
+
const isSourceCheckout = existsSync(join(root, "src"));
|
|
6
|
+
const normalizedRoot = root.replace(/\\/g, "/");
|
|
7
|
+
const isOpencodeManagedInstall = normalizedRoot.includes("/.cache/opencode/") || normalizedRoot.includes("/.opencode/node_modules/");
|
|
8
|
+
const isGlobalInstall = process.env.npm_config_global === "true" || process.env.npm_config_location === "global";
|
|
9
|
+
const skip = process.env.CI || process.env.CODEX_LIMITS_SKIP_INIT || isSourceCheckout || isOpencodeManagedInstall;
|
|
10
|
+
|
|
11
|
+
if (!skip && isGlobalInstall) {
|
|
12
|
+
process.stdout.write("codex-limits: installed. Run `codex-limits init` to install optional agent integrations.\n");
|
|
13
|
+
}
|
package/types/index.d.ts
ADDED