Skip to content

Commit

Permalink
devex: use dotenv
Browse files Browse the repository at this point in the history
  • Loading branch information
tomholford committed Oct 23, 2024
1 parent 9f1f787 commit d05333e
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 8 deletions.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ANTHROPIC_API_KEY=
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ I wanted to see how good Claude's new [computer use](https://www.anthropic.com/n
1. `git clone https://github.com/corbt/agent.exe`
2. `cd agent.exe`
3. `npm install`
4. `ANTHROPIC_API_KEY="<your-anthropic-api-key>" npm start`
5. Prompt the model to do something interesting on your computer!
4. Rename `.env.example` --> `.env` and add your Anthropic API Key
5. `npm start`
6. Prompt the model to do something interesting on your computer!

### Supported systems

Expand Down
23 changes: 17 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
"@emotion/react": "^11.13.3",
"@emotion/styled": "^11.13.0",
"@nut-tree-fork/nut-js": "^4.2.2",
"dotenv": "^16.4.5",
"electron-debug": "^3.2.0",
"electron-log": "^4.4.8",
"electron-updater": "^6.1.4",
Expand Down
3 changes: 3 additions & 0 deletions src/main/store/anthropic.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import Anthropic from '@anthropic-ai/sdk';
import dotenv from 'dotenv';

dotenv.config();

export const anthropic = new Anthropic({
apiKey: process.env.ANTHROPIC_API_KEY,
Expand Down

0 comments on commit d05333e

Please sign in to comment.