get your claude code tokens here

chore: add a bun needed warning

dunkirk.sh bb1ecf47 17e70ba0

verified
+14 -2
+2 -2
package.json
··· 1 1 { 2 2 "name": "anthropic-api-key", 3 - "version": "0.1.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 - "anthropic": "dist/index.js" 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 + // Detect if running under Node.js instead of Bun 4 + if ( 5 + typeof Bun === "undefined" || 6 + // @ts-ignore 7 + (typeof process !== "undefined" && process.release?.name === "node") 8 + ) { 9 + console.error( 10 + "❌ This CLI requires Bun. Please install Bun from https://bun.sh/", 11 + ); 12 + process.exit(1); 13 + } 14 + 3 15 import { serve } from "bun"; 4 16 import { 5 17 bootstrapFromDisk,