File tree Expand file tree Collapse file tree 13 files changed +38
-34
lines changed Expand file tree Collapse file tree 13 files changed +38
-34
lines changed Original file line number Diff line number Diff line change 1+ # Get your v0 API key here: https://v0.dev/chat/settings/keys
2+ V0_API_KEY = your_v0_api_key_here
3+ AI_GATEWAY_API_KEY = your_ai_gateway_api_key_here
Original file line number Diff line number Diff line change @@ -11,11 +11,10 @@ This example demonstrates how to use `@v0-sdk/ai-tools` with the AI SDK to inter
1111 ```
1212
13132 . ** Set up environment variables:**
14- Create a ` .env ` file in this directory:
14+ Create a ` .env.local ` file in the root directory:
1515
16- ``` env
17- V0_API_KEY=your_v0_api_key_here
18- AI_GATEWAY_API_KEY=your_ai_gateway_api_key_here
16+ ``` bash
17+ cp .env.example .env.local
1918 ```
2019
21203 . ** Get your API keys:**
Original file line number Diff line number Diff line change 1+ # Get your v0 API key here: https://v0.dev/chat/settings/keys
2+ V0_API_KEY = your_v0_api_key_here
Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ yarn-error.log*
3232
3333# env files (can opt-in for committing if needed)
3434.env *
35+ ! .env.example
3536
3637# vercel
3738.vercel
Original file line number Diff line number Diff line change @@ -43,10 +43,10 @@ A faithful recreation of the original v0.dev interface using the v0-sdk. This ex
4343 pnpm install
4444 ```
4545
46- 3 . Set up environment variables :
46+ 3 . Create a ` .env.local ` file in the root directory :
4747
4848 ``` bash
49- export V0_API_KEY=your_api_key_here
49+ cp .env.example .env.local
5050 ```
5151
52524 . Run the development server:
Original file line number Diff line number Diff line change 11# Get your v0 API key here: https://v0.dev/chat/settings/keys
2- V0_API_KEY = " your_v0_api_key "
2+ V0_API_KEY = your_v0_api_key_here
33
44# Optional: for rate limiting
55KV_REST_API_URL = your_upstash_redis_rest_url
Original file line number Diff line number Diff line change @@ -21,12 +21,8 @@ You can deploy your own version of Simple v0 to Vercel with one click:
21212 . ** Configure environment:**
2222 Create a ` .env.local ` file in the root directory:
2323
24- ``` env
25- V0_API_KEY=your_api_key_here
26-
27- # Optional: For rate limiting (if not provided, rate limiting is disabled)
28- KV_REST_API_URL=your_kv_rest_api_url
29- KV_REST_API_TOKEN=your_kv_rest_api_token
24+ ``` bash
25+ cp .env.example .env.local
3026 ```
3127
3228 - Get your v0 API key from [ v0.dev/settings] ( https://v0.dev/settings )
Original file line number Diff line number Diff line change 1+ # Auth Secret - Generate a random string for production
2+ # Generate with: openssl rand -base64 32
3+ # Or visit: https://generate-secret.vercel.app/32
4+ AUTH_SECRET = your-auth-secret-here
5+
6+ # Database URL - PostgreSQL connection string
7+ POSTGRES_URL = postgresql://user:password@localhost:5432/v0_clone
8+ # For Vercel Postgres, use the connection string from your dashboard
9+
10+ # Get your API key from https://v0.dev/chat/settings/keys
11+ V0_API_KEY = your_v0_api_key_here
12+
13+ # Optional: Use a custom API URL
14+ # V0_API_URL=http://localhost:3001/v1
Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ yarn-error.log*
3232
3333# env files (can opt-in for committing if needed)
3434.env *
35+ ! .env.example
3536
3637# vercel
3738.vercel
Original file line number Diff line number Diff line change @@ -29,23 +29,10 @@ You can deploy your own version of the v0 clone to Vercel with one click:
2929
3030### Environment Variables
3131
32- Create a ` .env ` file with all required variables :
32+ Create a ` .env.local ` file in the root directory :
3333
3434``` bash
35- # Auth Secret - Generate a random string for production
36- # Generate with: openssl rand -base64 32
37- # Or visit: https://generate-secret.vercel.app/32
38- AUTH_SECRET=your-auth-secret-here
39-
40- # Database URL - PostgreSQL connection string
41- POSTGRES_URL=postgresql://user:password@localhost:5432/v0_clone
42- # For Vercel Postgres, use the connection string from your dashboard
43-
44- # Get your API key from https://v0.dev/chat/settings/keys
45- V0_API_KEY=your_v0_api_key_here
46-
47- # Optional: Use a custom API URL
48- # V0_API_URL=http://localhost:3001/v1
35+ cp .env.example .env.local
4936```
5037
5138### Database Setup
@@ -116,7 +103,7 @@ This v0 clone includes:
116103
117104### Setup
118105
119- 1 . Set up all environment variables in ` .env `
106+ 1 . Set up all environment variables in ` .env.local `
1201072 . Run database migrations with ` pnpm db:migrate `
1211083 . Start the development server with ` pnpm dev ` or production server with ` pnpm start `
122109
You can’t perform that action at this time.
0 commit comments