get your claude code tokens here

docs: add readme

dunkirk.sh 7138ba24 a09cdafa

verified
Changed files
+63 -5
+27
LICENSE.md
···
··· 1 + The MIT License (MIT) 2 + ===================== 3 + 4 + Copyright © `2025` `Kieran Klukas` 5 + 6 + Permission is hereby granted, free of charge, to any person 7 + obtaining a copy of this software and associated documentation 8 + files (the “Software”), to deal in the Software without 9 + restriction, including without limitation the rights to use, 10 + copy, modify, merge, publish, distribute, sublicense, and/or sell 11 + copies of the Software, and to permit persons to whom the 12 + Software is furnished to do so, subject to the following 13 + conditions: 14 + 15 + The above copyright notice and this permission notice shall be 16 + included in all copies or substantial portions of the Software. 17 + 18 + THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, 19 + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 20 + OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 21 + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 22 + HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 23 + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 24 + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 25 + OTHER DEALINGS IN THE SOFTWARE. 26 + 27 +
+36 -5
README.md
··· 1 - # anthropic-api-key 2 3 - To install dependencies: 4 5 ```bash 6 bun install 7 ``` 8 9 - To run: 10 11 ```bash 12 - bun run index.ts 13 ``` 14 15 - This project was created using `bun init` in bun v1.2.19. [Bun](https://bun.com) is a fast all-in-one JavaScript runtime.
··· 1 + # Anthropic API key fetcher 2 + 3 + simple cli to fetch an anthropic access token using oauth (pkce), built with bun 4 + 5 + <p align="center"> 6 + <img src="https://raw.githubusercontent.com/taciturnaxolotl/carriage/master/.github/images/line-break.svg" /> 7 + </p> 8 9 + ## install 10 11 ```bash 12 bun install 13 ``` 14 15 + ## usage 16 17 ```bash 18 + # one-off via bunx (recommended) 19 + bunx anthropic 20 + 21 + # or via npx 22 + npx anthropic 23 + 24 + # override port 25 + PORT=9999 bunx anthropic 26 + 27 + # help 28 + bunx anthropic --help 29 ``` 30 31 + ## what it does 32 + 33 + - starts a local server and auto-opens your browser 34 + - guides you through anthropic oauth (pkce) 35 + - prints an access token to stdout and exits 36 + - caches tokens at `~/.config/crush/anthropic` and reuses them on later runs 37 + - if a cached token is still valid, it prints immediately and exits 38 + - if expired and a refresh token exists, it refreshes, saves, prints, and exits 39 + 40 + <p align="center"> 41 + <i><code>&copy 2025-present <a href="https://github.com/taciturnaxolotl">Kieran Klukas</a></code></i> 42 + </p> 43 + 44 + <p align="center"> 45 + <a href="https://github.com/taciturnaxolotl/anthropic-api-key/blob/master/LICENSE"><img src="https://img.shields.io/static/v1.svg?style=for-the-badge&label=License&message=MIT&logoColor=d9e0ee&colorA=363a4f&colorB=b7bdf8"/></a> 46 + </p>