Skip to content

Commit ee2c2dc

Browse files
authored
[Open Source] Add getting started section to readme (#857)
Adds instructions for running Chef locally.
1 parent ef22985 commit ee2c2dc

File tree

1 file changed

+63
-0
lines changed

1 file changed

+63
-0
lines changed

README.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,69 @@ This project was made in collaboration with the [Bolt](https://bolt.new/) team a
1919

2020
## Getting Started
2121

22+
Visit our [documentation](https://docs.convex.dev/chef) to learn more about Chef and check out our prompting [guide](https://stack.convex.dev/chef-cookbook-tips-working-with-ai-app-builders).
23+
24+
The easiest way to build with Chef is through our hosted [webapp](https://chef.convex.dev), which includes a generous free tier. If you want to
25+
run Chef locally, you can follow the guide below.
26+
27+
### Running Locally
28+
29+
Note: This will use our control plane to provision Convex projects. However, Chef tokens used in this enviroment will not count towards usage in your Convex account.
30+
31+
**1. Set up local environment**
32+
33+
Run the following commands in your terminal:
34+
35+
```bash
36+
nvm install
37+
nvm use
38+
npm install -g pnpm
39+
pnpm i
40+
echo 'VITE_CONVEX_URL=placeholder' >> .env.local
41+
npx convex dev --once # follow the steps to create a convex project in your team
42+
```
43+
44+
**2. Set up Chef OAuth application**
45+
46+
Go to the Convex [dashboard](https://dashboard.convex.dev/team/settings/applications/oauth-apps) and create an OAuth application. Redirect URIs will not matter for Chef, but you can set one to http://127.0.0.1:5173 (or whatever port you’ll run the Chef UI on) so that the form can be submitted. To develop using Chef locally, your OAuth app will need to be verified by the Convex team. Contact a Convex team member or click the “Request Verification” menu option to continue.
47+
48+
**3. Set up Convex deployment**
49+
50+
Open the Convex dashboard and go to Settings → Environment Variables. Then, set the following environment variables:
51+
52+
```env
53+
BIG_BRAIN_HOST=https://api.convex.dev
54+
CONVEX_OAUTH_CLIENT_ID=<value from oauth setup>
55+
CONVEX_OAUTH_CLIENT_SECRET=<value from oauth setup>
56+
```
57+
58+
**4. Add API keys for model providers**
59+
60+
Add any of the following API keys in order to enable code generation:
61+
62+
```env
63+
ANTHROPIC_API_KEY=<your api key>
64+
GOOGLE_API_KEY=<your api key>
65+
OPENAI_API_KEY=<your api key>
66+
XAI_API_KEY=<your api key>
67+
```
68+
69+
Note: you can also add your own API keys through the settings page.
70+
71+
**4. Run Chef backend and frontend**
72+
73+
Run the following commands in your terminal:
74+
75+
```bash
76+
pnpm i
77+
pnpm run dev
78+
79+
## in another terminal
80+
npx convex dev
81+
```
82+
83+
Congratulations, you now have Chef running locally! You can log in to Chef with your existing Convex account.
84+
2285
## Repository Layout
2386

2487
- `app/` contains all of the client side code and some serverless APIs.

0 commit comments

Comments
 (0)