tangled
alpha
login
or
join now
dunkirk.sh
/
anthropic-api-key
0
fork
atom
get your claude code tokens here
0
fork
atom
overview
issues
pulls
pipelines
chore: add a bun needed warning
dunkirk.sh
7 months ago
bb1ecf47
17e70ba0
verified
This commit was signed with the committer's
known signature
.
dunkirk.sh
SSH Key Fingerprint:
SHA256:DqcG0RXYExE26KiWo3VxJnsxswN1QNfTBvB+bdSpk80=
+14
-2
2 changed files
expand all
collapse all
unified
split
package.json
src
index.ts
+2
-2
package.json
···
1
1
{
2
2
"name": "anthropic-api-key",
3
3
-
"version": "0.1.3",
3
3
+
"version": "0.1.4",
4
4
"description": "CLI to fetch Anthropic API access tokens via OAuth with PKCE using Bun.",
5
5
"type": "module",
6
6
"private": false,
···
15
15
},
16
16
"homepage": "https://github.com/taciturnaxolotl/anthropic-api-key#readme",
17
17
"bin": {
18
18
-
"anthropic": "dist/index.js"
18
18
+
"anthropic-api-key": "dist/index.js"
19
19
},
20
20
"exports": {
21
21
".": "./dist/index.js",
+12
src/index.ts
···
1
1
#!/usr/bin/env bun
2
2
3
3
+
// Detect if running under Node.js instead of Bun
4
4
+
if (
5
5
+
typeof Bun === "undefined" ||
6
6
+
// @ts-ignore
7
7
+
(typeof process !== "undefined" && process.release?.name === "node")
8
8
+
) {
9
9
+
console.error(
10
10
+
"❌ This CLI requires Bun. Please install Bun from https://bun.sh/",
11
11
+
);
12
12
+
process.exit(1);
13
13
+
}
14
14
+
3
15
import { serve } from "bun";
4
16
import {
5
17
bootstrapFromDisk,